I'm trying to prove by induction the following claim: $$ \sum_{i=1}^{n} i^{2}(-1)^{i+1} = (-1)^{n-1}\frac{n}{2}(n+1) $$
So far for the proof I have the following:
Let n = 1.
$$
\sum_{i=1}^{n} i^{2}(-1)^{i+1}=1^2(-1)^{1+1}=1
$$
and
$$
(-1)^{1-1}\frac{1}{2}(1+1)=1
$$
If we assume true at n=k. Then:
$$
\sum_{i=1}^{k} i^{2}(-1)^{i+1}=k^2(-1)^{k+1}
$$
Now, if we let n = k+1. Then:
$$
\sum_{i=1}^{k+1} i^{2}(-1)^{i+1}= 1-4+9-...\pm k^2(-1)^{k+1} \pm (k+1)^2(-1)^{(k+1)+1}
$$
$$ = (-1)^{k-1}\frac{k}{2}(k+1)+(k+1)^2(-1)^{k+2} $$
This is where I get stuck. I know we want to have this as the final answer, but I can't figure out how to get to this: $$ =(-1)^{(k+1)-1}\frac{k+1}{2}((k+1)+1) $$
HINT: Look at your target: you want the thing to simplify to
$$(-1)^k\frac{k+1}2(k+2)\;,$$
which has a factor of $k+1$. And you have a factor of $k+1$ in your final expression:
$$(-1)^{k-1}\frac{k}2(k+1)+(k+1)^2(-1)^{k+2}=(k+1)\left((-1)^{k-1}\frac{k}2+(-1)^{k+2}(k+1)\right)\;.$$
Since $(-1)^{k-1}=(-1)^{k+1}$, you can also pull out a factor of $(-1)^{k+1}$:
$$(k+1)\left((-1)^{k-1}\frac{k}2+(-1)^{k+2}(k+1)\right)=(-1)^{k+1}(k+1)\left(\frac{k}2-(k+1)\right)\;.$$
If you now simplify the expression in the last pair of parentheses, just a very little more algebra will get you to your goal.