Induction of recursive definition of $f(n)=1+(-1)^n$ for $n≥1$

87 Views Asked by At

The recursive definition of $f(n)=1+(-1)^n$ for $n≥1$ is:

1) $f(1)=0$

2) $f(n)=f(n-1)-2(-1)^{n-1}$ for $n≥2$

Now how can I prove that the definition is true by induction?

My attempt:

Given $g(1)=0$ and $g(n)=g(n-1)-2(-1)^{n-1}$

The base is $g(1)=0=f(1)$

The hypothesis is $g(n)=f(n)=1+(-1)^n$

The inductive passage is:

$g(n+1)=g(n)-2(-1)^{n-1}=1+(-1)^n-2(-1)^{n-1}=1-(-1)^{n-1}-2(-1)^{n-1}=1-2(-1)^{n-1}....$

Now I don't know how to continue so that I get $f(n+1)$.

4

There are 4 best solutions below

0
On BEST ANSWER

It's $g(n+1)=g(n) -2(-1)^{\bf n}$ and then it will follow.

0
On

Note that\begin{align}g(n+1)&=g(n)-2(-1)^n\\&=f(n)-2(-1)^n\\&=1-(-1)^n\\&=1+(-1)^{n+1}\\&=f(n+1).\end{align}

0
On

Your expression $$g(n+1)=g(n)-2(-1)^{n-1}=1+(-1)^n-2(-1)^{n-1}=1-(-1)^{n-1}-2(-1)^{n-1}=1-2(-1)^{n-1}....$$

Should have been

$$g(n+1)=g(n)-2(-1)^{n}=1+(-1)^n-2(-1)^{n}=1-(-1)^{n}=1+(-1)^{n+1} = f(n+1)$$

0
On

You made a mistake right at the beginning:

$g(n+1)=g(n)-2(-1)^\color{red}{n-1}...$

That should be:

$g(n+1)=g(n)-2(-1)^\color{red}{n}...$