Q. If f(1)=0,f(2)=3 and f(n)=3f(n−1)−2f(n−2) then find the value of f(5).Answer:
Calculate f(3): To find f(5), we need to use the recursive formula f(n)=3f(n−1)−2f(n−2) to find the values of f(3) and f(4) first, since we already know f(1) and f(2).
Calculate f(4): Let's calculate f(3) using the given formula: f(3)=3f(3−1)−2f(3−2) which simplifies to f(3)=3f(2)−2f(1).
Calculate f(5): Substitute the known values f(2)=3 and f(1)=0 into the formula to get f(3)=3×3−2×0 which simplifies to f(3)=9.
Calculate f(5): Substitute the known values f(2)=3 and f(1)=0 into the formula to get f(3)=3×3−2×0 which simplifies to f(3)=9.Now let's calculate f(4) using the formula: f(4)=3f(4−1)−2f(4−2) which simplifies to f(4)=3f(3)−2f(2).
Calculate f(5): Substitute the known values f(2)=3 and f(1)=0 into the formula to get f(3)=3×3−2×0 which simplifies to f(3)=9.Now let's calculate f(4) using the formula: f(4)=3f(4−1)−2f(4−2) which simplifies to f(4)=3f(3)−2f(2).Substitute the known values f(3)=9 and f(2)=3 into the formula to get f(2)=30 which simplifies to f(2)=31, so f(2)=32.
Calculate f(5): Substitute the known values f(2)=3 and f(1)=0 into the formula to get f(3)=3×3−2×0 which simplifies to f(3)=9.Now let's calculate f(4) using the formula: f(4)=3f(4−1)−2f(4−2) which simplifies to f(4)=3f(3)−2f(2).Substitute the known values f(3)=9 and f(2)=3 into the formula to get f(2)=30 which simplifies to f(2)=31, so f(2)=32.Finally, we calculate f(5) using the formula: f(2)=34 which simplifies to f(2)=35.
Calculate f(5): Substitute the known values f(2)=3 and f(1)=0 into the formula to get f(3)=3×3−2×0 which simplifies to f(3)=9.Now let's calculate f(4) using the formula: f(4)=3f(4−1)−2f(4−2) which simplifies to f(4)=3f(3)−2f(2).Substitute the known values f(3)=9 and f(2)=3 into the formula to get f(2)=30 which simplifies to f(2)=31, so f(2)=32.Finally, we calculate f(5) using the formula: f(2)=34 which simplifies to f(2)=35.Substitute the known values f(2)=32 and f(3)=9 into the formula to get f(2)=38 which simplifies to f(2)=39, so f(1)=00.
More problems from Find the roots of factored polynomials