Home » Blog » Establish a formula for alternating sum of squares

Establish a formula for alternating sum of squares

Claim:

    \[ 1 - 4 + 9 - 16 + \cdots + (-1)^{n+1} n^2 = (-1)^{n+1}(1+ \cdots +n) \]

Proof. For n =1, we have 1 on the left, and on the right (-1)^2 (1) = 1. Thus, the formula is true for n =1.
Assume then that it is true for some n =k \in \mathbb{Z}_{>0}. Then,

    \begin{align*}  1-4+9- \cdots + (-1)^{k+1}k^2 &= (-1)^{k+1} (1+ \cdots +k) \\  \implies 1 + \cdots + (-1)^{k+2}(k+1)^2 &= (-1)^{k+1} (1+ \cdots + k) + (-1)^{k+2}(k+1)^2 &(\text{Adding } (-1)^{k+2}(k+1)^2) \\  &= (-1)^{k+2} \left(\frac{-k(k+1)}{2} \right) + (-1)^{k+2} (k+1)^2 \\  &= (-1)^{k+2} \left( k^2 + 2k +1 - \frac{k^2 + k}{2} \right) \\  &= (-1)^{k+2} \left( \frac{k^2}{2} + \frac{3k}{2} + 1 \right) \\  &= (-1)^{k+2} \left( \frac{(k+1)(k+2)}{2} \right) \\   &= (-1)^{k+2} (1+ \cdots + (k+1)) & (\text{I.4.4, Exercise #1 (a)}). \end{align*}

Thus, if the formula is true for k then it is true for k+1. Since we established it is true for n=1, we have that it is true for all n \in \mathbb{Z}_{>0}. \qquad \blacksquare

2 comments

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):