<s>[INST] Mathematical induction proof that $f(n)=\frac{1}{2}+\frac{3}{2}(-1)^n$ 
The function $f(n)$ for $n=0,1...$ has the recursive definition $$f(n)= \begin{cases} 2 & \text {for n=0} \\ -f(n-1)+1 & \text{for n=1,2...} \end{cases}$$
  Prove by induction that the following equation holds: $$f(n)=\frac{1}{2}+\frac{3}{2}(-1)^n$$

So, I begin by checking that the basic step holds


*

*$f(0)=\frac{1}{2}+\frac{3}{2}(-1)^0=2$ OK

*Assume that the equation holds for a given $n$

*Show that n+1 holds: $f(n+1)=\frac{1}{2}+\frac{3}{2}(-1)^{n+1} \Rightarrow f(n+1)=\frac{1}{2}+\frac{3}{2}(-1)^{n} \cdot (-1) = -f(n)-\frac{1}{2}$


I get kind of stuck here. Any advice on how I should approach this?
 [/INST] $f(n)=1-f(n-1)$. We want to show that 
$$f(n+1)=1-f(n)=1-[1-f(n-1)]=f(n-1)$$
$f(n+1)=\frac{1}{2} - \frac{3}{2}(-1)^n $ 
$f(n-1)= \frac{1}{2} + \frac{3}{2}(-1)^{n-1}$. Multiply this equality $-1$,then 
$-f(n-1)= [\frac{1}{2} + \frac{3}{2}(-1)^{n-1}](-1)=-\frac{1}{2}+\frac{3}{2}(-1)^n$. Hence we obtain 
$f(n-1)=\frac{1}{2} - \frac{3}{2}(-1)^n=f(n+1)$ 
</s>