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? 

$$\sum_{r=1}^{2k}(-1)^{r-1}r^2=\sum_{r=1}^k\{(2r-1)^2-(2r)^2\}=\sum_{r=1}^k(1-4r)$$
Using the summation formula of Arithmetic Series, 
$$\sum_{r=1}^k(1-4r)=\dfrac k2\{2(1-4)+(k-1)(-4)\}=-k(2k+1)$$
Put $2k=n$
$$\sum_{r=1}^{2k+1}(-1)^{r-1}r^2=\sum_{r=1}^{2k}(-1)^{r-1}r^2+(-1)^{2k+1-1}(2k+1)^2$$ $$=-k(2k+1)+(2k+1)^2=(2k+1)\{(2k+1-k)\}=?$$
Put $2k+1=n\iff k=\dfrac{n-1}2$
