Fourier Series/Exponential of x over Minus Pi to Pi

Theorem
Let $f \left({x}\right)$ be the real function defined on $\R$ as:


 * $f \left({x}\right) = \begin{cases}

e^x & : -\pi < x \le \pi \\ f \left({x + 2 \pi}\right) & : \text{everywhere} \end{cases}$

Then its Fourier series can be expressed as:


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

Proof
By definition of Fourier series:


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

where for all $n \in \Z_{> 0}$:

Thus by definition of $f$:

For $n > 0$:

Now for the $\sin n x$ terms:

Finally: