Q. If f(1)=1,f(2)=3 and f(n)=f(n−1)+3f(n−2) then find the value of f(4).Answer:
Calculate f(3): To find f(4), we need to use the recursive formula f(n)=f(n−1)+3f(n−2). We already know f(1) and f(2), so we can find f(3) first.Calculation: f(3)=f(3−1)+3f(3−2)=f(2)+3f(1)=3+3(1)=3+3=6.
Calculate f(4): Now that we have f(3), we can find f(4) using the same recursive formula.Calculation: f(4)=f(4−1)+3f(4−2)=f(3)+3f(2)=6+3(3)=6+9=15.
More problems from Find the roots of factored polynomials