<s>[INST] 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. 
 [/INST] 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$$
</s>