Q. If f(1)=4 and f(n)=nf(n−1)−2 then find the value of f(5).Answer:
Given Information: We are given that f(1)=4. To find f(5), we need to use the recursive formula f(n)=nf(n−1)−2, starting with n=2 and working our way up to n=5.
Calculate f(2): First, let's find f(2) using the formula:f(2)=2f(2−1)−2f(2)=2f(1)−2f(2)=2(4)−2f(2)=8−2f(2)=6
Calculate f(3): Next, we find f(3) using the value of f(2) we just calculated:f(3)=3f(3−1)−2f(3)=3f(2)−2f(3)=3(6)−2f(3)=18−2f(3)=16
Calculate f(4): Now, we calculate f(4) using the value of f(3): f(4)=4f(4−1)−2 f(4)=4f(3)−2 f(4)=4(16)−2 f(4)=64−2 f(4)=62
Calculate f(5): Finally, we find f(5) using the value of f(4): f(5)=5f(5−1)−2 f(5)=5f(4)−2 f(5)=5(62)−2 f(5)=310−2 f(5)=308