
David W. answered 04/09/17
Tutor
4.7
(90)
Experienced Prof
Since the function is defined recursively, a recursive solution is appropriate.
f(2) = -f(1) + 5 [for n=1; recursive case]
f(2) = -( -f(0) + 5 ) + 5 [expand for n=0; recursive case]
f(2) = -( -3 + 5 ) + 5 [given f(0)=3; base case]
f(2) = -(2) + 5
f(2) = 3