Fourier Series/x squared over Minus Pi to Pi

Theorem
For $x \in \left[{- \pi \,.\,.\, \pi}\right]$:
 * $\displaystyle x^2 = \frac {\pi^2} 3 + \sum_{n \mathop = 1}^\infty \left({\left({-1}\right)^n \frac 4 {n^2} \cos n x}\right)$

Proof
From Even Power is Even Function, $x^2$ is an even function.

By Fourier Series for Even Function over Symmetric Range, we have:


 * $\displaystyle x^2 \sim \frac {a_0} 2 + \sum_{n \mathop = 1}^\infty a_n \cos n x$

where:

Then:

Substituting for $a_n$ in $(1)$:


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

as required.