# Sum of Reciprocals of Squares Alternating in Sign/Proof 3

## Theorem

 $\displaystyle \dfrac {\pi^2} {12}$ $=$ $\displaystyle \sum_{n \mathop = 1}^\infty \dfrac {\left({-1}\right)^{n + 1} } {n^2}$ $\displaystyle$ $=$ $\displaystyle \frac 1 {1^2} - \frac 1 {2^2} + \frac 1 {3^2} - \frac 1 {4^2} + \cdots$

## Proof

Let $f \left({x}\right)$ be the real function defined on $\left({-\pi \,.\,.\, \pi}\right)$ as:

$f \left({x}\right) = \pi^2 - x^2$
$\displaystyle \pi^2 - x^2 \sim \frac {2 \pi^2} 3 + 4 \sum_{n \mathop = 1}^\infty \left({-1}\right)^{n - 1} \frac {\cos n x} {n^2}$

for $x \in \left({-\pi \,.\,.\, \pi}\right)$.

Setting $x = 0$:

 $\displaystyle \pi^2 - 0^2$ $=$ $\displaystyle \frac {2 \pi^2} 3 + 4 \sum_{n \mathop = 1}^\infty \left({-1}\right)^{n - 1} \frac {\cos 0} {n^2}$ $\displaystyle$ $=$ $\displaystyle \frac {2 \pi^2} 3 + 4 \sum_{n \mathop = 1}^\infty \left({-1}\right)^{n - 1} \frac 1 {n^2}$ Cosine of Zero is One $\displaystyle \leadsto \ \$ $\displaystyle \frac {\pi^2} {12}$ $=$ $\displaystyle \sum_{n \mathop = 1}^\infty \left({-1}\right)^{n - 1} \frac 1 {n^2}$ simplification $\displaystyle$ $=$ $\displaystyle \sum_{n \mathop = 1}^\infty \frac {\left({-1}\right)^{n + 1} } {n^2}$ rearrangement

$\blacksquare$