Mathematical Induction for an alternating series It's been a while since I have done a problem like this. I have this problem
$$\sum_{i=0}^n (-1)^{i+1} i^2 = \frac {(-1)^{n+1}n(n+1)}{2}$$
So I have gotten this far:
Base Case: 
$$n=1$$
$$(-1)^2+1^2 = \frac{ (-1)^2 1(2) }{2}$$
$$ 1 = 1$$
Assume:
$$\sum_{i=0}^n (-1)^{i+1} i^2 = \frac {(-1)^{n+1}n(n+1)}{2}$$
Prove:
$n = n+1$
$$\sum_{i=0}^n+1 (-1)^ {i+1} i^2 = \frac {(-1)^{n+2}(n+1)(n+2)}{2} $$
I think that I can just replace the i's with (n+1) too
Which would be this
$$\sum_{i=0}^{n+1} (-1)^ {n+2} (n+1)^2 = \frac {(-1)^{n+2}(n+1)(n+2)}{2} $$
I don't remember where to go from here. 
 A: You can most certainly not replace $i$s with $n$s. That's a major mistake. For example
$$\sum_{i=1}^n i = \frac{n(n+1)}{2}$$
while 
$$\sum_{i=1}^n n = n^2$$ and those are certainly not the same thing.

What you do have to do is replace $n$ with $n+1$ everywhere, including the sum, so what you have to prove is 
$$\sum_{i=0}^{n+1} (-1)^{i+1} i^2 = \frac {(-1)^{n+2}(n+1)(n+2)}{2}$$
while you can assume that 
$$\sum_{i=0}^n (-1)^{i+1} i^2 = \frac {(-1)^{n+1}n(n+1)}{2}$$
is true.
To prove the above equation, remember that 
$$\sum_{i=0}^{n+1} a_i = \left[\sum_{i=0}^{n}a_i\right] + a_{n+1}$$
and now use this fact on your particular sum, then use the induction assumption that tells you something about the sum in parentheses.
A: You have shown it is true for the base case. Now, let's move on to the inductive step: Note that you should be using $n=k$ and $n=k+1$ instead of $n=n$ and $n=n+1$.

Assume true for $n=k$:
$$\sum_{i=0}^{k} (-1)^{i+1} i^2=\frac{(-1)^{k+1} k(k+1)}{2} \tag{1}$$
For $n=k+1$:
$$\sum_{i=0}^{k+1} (-1)^{i+1} i^2=\frac{(-1)^{k+2} (k+1)(k+2)}{2} \tag{2}$$
Now, add the $k+1$ term of the series to equation $(1)$:
$$\sum_{i=0}^{k} (-1)^{i+1} i^2+\color{blue}{(-1)^{k+2}(k+1)^2}=\frac{(-1)^{k+1} k(k+1)}{2}+\color{blue}{(-1)^{k+2}(k+1)^2}$$
$$\Rightarrow \sum_{i=0}^{k+1} (-1)^{i+1} i^2=\frac{(-1)^{k+1} k(k+1)}{2}+\color{blue}{(-1)^{k+2}(k+1)^2}\tag{3}$$
Now, try to make the RHS of equation $(3)$ equal to equation $(2)$.
Can you continue?
A: If $n$ is even, 
$$\begin{align}
\sum_{i=0}^n (-1)^{i+1}i^2&=-0^2+1^2-2^2+3^2-4^2+\cdots+(n-1)^2-n^2\\
&=(1-2)(1+2)+(3-4)(3+4)\cdots+((n-1)-n)((n-1)+n)\\\\
&=-(1+2+3+4+\cdots+(n-1)+n)\\
&=-\frac{n(n+1)}2\end{align}$$
If $n$ is odd, 
$$\begin{align}
\sum_{i=0}^n (-1)^{i+1}i^2&=-0^2+1^2-2^2+3^2-4^2-\cdots-(n-1)^2+n^2\\
&=(-0+1)(0+1)+(-2+3)(2+3)+\cdots+(-(n-1)+n)((n-1)+n)\\\\
&=1+2+3+4+\cdots+(n-1)+n\\
&=\frac{n(n+1)}2\end{align}$$
Hence
$$\sum_{i=0}^n (-1)^{i+1}i^2=(-1)^{n+1}\frac {n(n+1)}2$$
A: See the summation of the n+1 terms is just the summation of n terms (which is known) + $(-1)^{n+2}(n+1)$. Now you see the minus sign $(-1)^{n+1}$can be taken common the remaining term is :
$ \frac{n(n+1)}{2} -(n+1)^2 = (n+1) .\frac{n-2(n+1)}{2} = -\frac{(n+1) (n+2)}{2} $. 
Thus at last the minus sign turns out to e $(-1)^{n+2}$ and hence proved.
