Q. If f(1)=2,f(2)=5 and f(n)=f(n−1)+3f(n−2) then find the value of f(5).Answer:
Find f(3): Use the given initial conditions to find f(3). The recursive formula is f(n)=f(n−1)+3f(n−2). We know f(1)=2 and f(2)=5. Now calculate f(3) using the formula. f(3)=f(2)+3f(1)=5+3(2)=5+6=11.
Find f(4): Use the recursive formula to find f(4). We have f(2)=5 and f(3)=11. Now calculate f(4) using the formula. f(4)=f(3)+3f(2)=11+3(5)=11+15=26.
Find f(5): Use the recursive formula to find f(5). We have f(3)=11 and f(4)=26. Now calculate f(5) using the formula. f(5)=f(4)+3f(3)=26+3(11)=26+33=59.
More problems from Write and solve direct variation equations