Q. If f(1)=4,f(2)=5 and f(n)=2f(n−1)+2f(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)=2f(n−1)+2f(n−2). We know f(1)=4 and f(2)=5. Calculate f(3) using the formula. f(3)=2f(2)+2f(1)=2×5+2×4=10+8=18.
Calculate f(4): Use the recursive formula to find f(4). We now have f(2)=5 and f(3)=18. Calculate f(4) using the formula. f(4)=2f(3)+2f(2)=2×18+2×5=36+10=46.
Determine f(5): Use the recursive formula to find f(5). We now have f(3)=18 and f(4)=46. Calculate f(5) using the formula. f(5)=2f(4)+2f(3)=2×46+2×18=92+36=128.
More problems from Write and solve direct variation equations