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

## 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({0 \,.\,.\, 2 \pi}\right)$ as:

$f \left({x}\right) = \begin{cases} \left({x - \pi}\right)^2 & : 0 < x \le \pi \\ \pi^2 & : \pi < x < 2 \pi \end{cases}$

From Fourier Series: Square of x minus pi, Square of pi, its Fourier series can be expressed as:

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

We have that:

 $\displaystyle f \left({\pi - 0}\right)$ $=$ $\displaystyle \left({\pi - \pi}\right)^2$ $\displaystyle$ $=$ $\displaystyle 0$ $\displaystyle f \left({\pi + 0}\right)$ $=$ $\displaystyle \pi^2$

where $f \left({\pi - 0}\right)$ and $f \left({\pi + 0}\right)$ denote the limit from the left and limit from the right respectively of $f \left({\pi}\right)$.

It is apparent that $f \left({x}\right)$ satisfies the Dirichlet conditions:

$(\mathrm D 1): \quad f$ is bounded on $\left({0 \,.\,.\, 2 \pi}\right)$
$(\mathrm D 2): \quad f$ has a finite number of local maxima and local minima.
$(\mathrm D 3): \quad f$ has $1$ of discontinuity, which is finite.

Hence from Fourier's Theorem:

 $\displaystyle f \left({\pi}\right)$ $=$ $\displaystyle \frac {f \left({\pi - 0}\right) + f \left({\pi + 0}\right)} 2$ $\displaystyle$ $=$ $\displaystyle \frac {0 + \pi^2} 2$ $\displaystyle$ $=$ $\displaystyle \frac {\pi^2} 2$

Thus setting $x = \pi$ in $(1)$:

 $\displaystyle f \left({\pi}\right)$ $=$ $\displaystyle \frac {2 \pi^2} 3 + \sum_{n \mathop = 1}^\infty \left({\frac {2 \cos n \pi} {n^2} + \left({\frac {\left({-1}\right)^n \pi} n + \frac {2 \left({\left({-1}\right)^n - 1}\right)} {\pi n^3} }\right) \sin n \pi}\right)$ $\displaystyle \leadsto \ \$ $\displaystyle \frac {\pi^2} 2$ $=$ $\displaystyle \frac {2 \pi^2} 3 + 2 \sum_{n \mathop = 1}^\infty \frac {\cos n \pi} {n^2}$ Sine of Multiple of Pi $\displaystyle \leadsto \ \$ $\displaystyle \frac {\pi^2} 4$ $=$ $\displaystyle \frac {\pi^2} 3 + \sum_{n \mathop = 1}^\infty \frac {\left({-1}\right)^n} {n^2}$ Cosine of Multiple of Pi and simplification $\displaystyle \leadsto \ \$ $\displaystyle -\frac {\pi^2} {12}$ $=$ $\displaystyle \sum_{n \mathop = 1}^\infty \frac {\left({-1}\right)^n} {n^2}$ $\displaystyle \leadsto \ \$ $\displaystyle \frac {\pi^2} {12}$ $=$ $\displaystyle \sum_{n \mathop = 1}^\infty \frac {\left({-1}\right)^{n + 1} } {n^2}$ changing sign and subsuming into powers of $-1$

$\blacksquare$