Fourier Series/Identity Function over Minus Pi to Pi

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

Proof
By the definition of a Fourier Series, for $x \in \left[{- \pi \,.\,.\, \pi}\right]$:


 * $(1): \quad \displaystyle x = \frac {a_0} 2 + \sum_{n \mathop = 1}^\infty \left(a_n \cos nx + b_n \sin nx\right)$

where:


 * $\displaystyle a_n = \frac 1 \pi \int_{-\pi}^\pi x \cos \left( {n x} \right) \mathrm d x$
 * $\displaystyle b_n = \frac 1 \pi \int_{-\pi}^\pi x \sin \left( {n x} \right) \mathrm d x$

From Odd Power is Odd Function, $x$ is a Odd Function.

Then:
 * by Sine Function is Odd, $\sin \left({n x}\right)$ is an odd function

and
 * by Cosine Function is Even, $\cos \left({n x}\right)$ is an even function.

By Odd Function Times Even Function is Odd:
 * $x \cos \left({n x}\right)$ is an odd function.

Hence by Definite Integral of Odd Function:
 * $a_n = 0$

for all $n$.

By Odd Function Times Odd Function is Even:
 * $x \sin \left({n x}\right)$ is an even function.

Hence:

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


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

as required.