Fourier Series/Triangle Wave

Theorem
Let $\map f x$ be the real function defined on the open interval $\openint {-l} l$ as:


 * $\map f x = \size x$

Then its Fourier series can be expressed as:

Proof
By definition, the absolute value function is an even function:


 * $\size {-x} = x = \size x$

Thus by Fourier Series for Even Function over Symmetric Range, $\size x$ can be expressed as:


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

where for all $n \in \Z_{\ge 0}$:
 * $a_n = \displaystyle \frac 2 l \int_0^l \size x \dfrac {n \pi x} l \rd x$

On the real interval $\closedint 0 l$:
 * $\size x = x$

and so for all $n \in \Z_{\ge 0}$:
 * $a_n = \displaystyle \frac 2 \pi \int_0^\pi x \dfrac {n \pi x} l \rd x$

Thus Fourier Cosine Series for $x$ can be applied directly.

So for $x \in \closedint {-l} l$:


 * $\displaystyle \size x = \frac l 2 - \frac {4 l} {\pi^2} \sum_{n \mathop = 0}^\infty \frac 1 {\paren {2 n + 1}^2} \cos \dfrac {\paren {2 n + 1} \pi x} l$