
Lisa B.
asked 04/07/22What is the value of f(5) if f(1)=3 and f(x)=3-2f(x-1)?
What is the value of f(5) if f(1)=3 and f(x)=3-2f(x-1)?
Please show the steps for this recursive function. I appreciate it.
3 Answers By Expert Tutors

Scott B. answered 04/07/22
Education focused Physics Professor
They kind of needlessly complicated it.
Let's define a new variable, u=x-1, or x=u+1. Putting this in to the recursive definition, we get
f(u+1)=3-2f(u)
Note that the function itself is still the same, it's only the way we give it an input is different. If u=1, it's still true that f(1)=3; it matters not that we relabeled the input to u.
So, we've got f(1), we can get f(2) using
f(2)=f(1+1)=3-2f(1)=3-2(3)=3-6=-3
And then we just keep churning
f(3)=f(2+1)=3-2f(2)=3-2(-3)=3+6=9
f(4)=f(3+1)=3-2f(3)=3-2(9)=3-18=-15
f(5)=f(4+1)=3-2f(4)=3-2(-15)=3+30=33
Lisa B.
Thank you so much! My 16 year old and I appreciate you!04/07/22

David W. answered 04/07/22
Experienced Prof
Using a RECURSIVE definition of a function, we may start with f(1) [or a1], and find values up to f(2) [or a2].
However, most real problems use recursion the other way -- from f(5) to f(1) [or a5 to a1].
So, if the recursive definition is: f(x) = 3 - 2f(x-1) ... and f(1) = 3 , here's how we find f(5):
f(5) = 3 - 2 f(4) [note: x=5]
f(5) = 3 - 2 *( 3 - 2 f(3) ) [use constant 5 on left side and use x-4 on right side]
f(5) = 3 - 2 *( 3 - 2*( 3 - 2f(2) ) ) [replace f(3)]
f(5) = 3 - 2 *( 3 - 2*( 3 - 2*(3 -2f(1)) ) )
f(5) = 3 - 2 *( 3 - 2*( 3 - 2*(3 -2*3) ) )
f(5) = 3 - 2 *( 3 - 2*( 3 - 2*(3 - 6) ) )
f(5) = 3 - 2 *( 3 - 2*( 3 - 2(-3) ) )
f(5) = 3 - 2 *( 3 - 2*( 3 + 6) )
f(5) = 3 - 2 *( 3 - 2*(9) )
f(5) = 3 - 2 *(-15)
f(5) = 3 + 30
f(5) = 33
One of the easy applications of RECURSION is to define the sum of the numbers from 1 to n as n + the sum of the numbers from 1 to (n-1):
S1 = 1 ... the sum fo the numbers from 1 to 1 is 1
Sn = n + S(n-1)
So, the sum of the numbers from 1 to 5 is 5 plus the sum of the numbers from 1 to 4. ... keep going until you get to1, then insert S1= 1 and add up the results.

Mark M. answered 04/07/22
Mathematics Teacher - NCLB Highly Qualified
an = 3 - 2(an-1)
a1 = 3
a2 = 3 - 2(3), a2 = -3
a3 = 3 - 2(-3), a2 = 12
Continue for a4 and a5
Still looking for help? Get the right answer, fast.
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.
Mark M.
Confusing use of f notation!04/07/22