96.5k views
4 votes
If f(1)=3 and f(n)=-2f(n-1)+ 1, then f(5)=

2 Answers

6 votes

f(1)=3\ and\ f(n)=-2f(n-1)+1\\f(2)=-2f(2-1)+1=-2f(1)+1=-2(3)+1=-6+1=\boxed{-5}\\f(3)=-2f(3-1)+1=-2f(2)+1=-2\boxed{(-5)}+1=10+1=\boxed{11}\\f(4)=-2f(4-1)+1=-2f(3)+1=-2\fbox{11}+1=-22+1=\fbox{-21}\\f(5)=-2f(5-1)+1=-2f(4)+1=-2\fbox{(-21)}+1=42+1=\boxed{\boxed{43}}
User Vivek V K
by
7.9k points
6 votes
Our function is
f(n)=-2f(n-1)+1.
We want to find f(5).
Let's substitute 5 for n.
f(5) = -2f(5-1) + 1
f(5) = -2f(4) + 1
We need to know f(4).
f(4) = -2f(4-1) + 1
f(4) = -2f(3) + 1
We need to know f(3).
f(3) = -2f(3-1) + 1
f(3) = -2f(2) + 1
We need to know f(2).
f(2) = -2f(2-1) + 1
f(2) = -2f(1) + 1
We know that f(1) = 3
f(2) = -2(3) + 1
f(2) = -6 + 1
f(2) = -5
Now we can use f(2) = -5 to find f(3)...
f(3) = -2(-5) + 1
f(3) = 10 + 1
f(3) = 11
Now we can use f(3) = 11 to find f(4)...
f(4) = -2(11) + 1
f(4) = -22 + 1
f(4) = -21
Now we can use f(4) = -21 t find f(5)!
f(5) = -2(-21) + 1
f(5) = 42 + 1
f(5) = 43
User Brian Schroeter
by
8.4k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.

9.4m questions

12.2m answers

Categories