A closed form for $1^{2}-2^{2}+3^{2}-4^{2}+ \cdots + (-1)^{n-1}n^{2}$ Please look at this expression:

$$1^{2}-2^{2}+3^{2}-4^{2} + \cdots + (-1)^{n-1} n^{2}$$

I found this expression in a math book. It asks us to find a general formula for calculate it with $n$.
The formula that book suggests is this: 

$$-\frac{1}{2}\times (-1)^{n} \times n(n+1)$$

Would you mind explaining to me how we get this formula? 

We wish to show that
$$
1^{2}-2^{2}+3^{2}-4^{2} + \dotsb + (-1)^{n-1} n^{2}=
(-1)^{n+1}\frac{n(n+1)}{2}\tag{1}
$$
To do so, induct on $n$. 
The base case $n=1$ is simple to verify.
Now, suppose that $(1)$ holds. Then
\begin{align*}
1^{2}-2^{2}+3^{2}-4^{2} + \dotsb + (-1)^{n} (n+1)^{2}
&= (-1)^{n+1}\frac{n(n+1)}{2}+(-1)^{n} (n+1)^{2} \\
&= (-1)^n\left\{
-\frac{1}{2}\,n^2-\frac{1}{2}\,n+n^2+2\,n+1
\right\} \\
&= (-1)^{n+2}\left\{
\frac{1}{2}\,n^2+\frac{3}{2}\,n+1
\right\} \\
&= (-1)^{n+2}\frac{1}{2}\left\{
n^2+3\,n+2
\right\} \\
&= (-1)^{n+2}\frac{(n+1)(n+2)}{2}\\
\end{align*}
This closes the induction.
