Theorem: Fourier Series/Exponential of x over Minus Pi to Pi

Let $\map f x$ be the real function defined on $\R$ as:
:200pxthumbright$\map f x$ and its $7$th approximation
:$\map f x = \begin{cases}
e^x & : -\pi < x \le \pi \\
\map f {x + 2 \pi} & : \text{everywhere} \end{cases}$
Then its Fourier series can be expressed as:
{{begin-eqn}}
{{eqn | l = \map f x
      | o = \sim
      | r = \frac {\sinh \pi} \pi \paren {1 + 2 \sum_{n \mathop = 1}^\infty \frac {\paren {-1}^n} {1 + n^2} \paren {\cos n x - n \sin n x} }
      | c = 
}}
{{eqn | r = \frac {\sinh \pi} \pi \paren {1 + 2 \paren {-\dfrac {\cos x - \sin x} 2 + \dfrac {\cos 2 x - 2 \sin 2 x} 5 - \dfrac {\cos 3 x - 3 \sin 3 x} {10} + \dotsb} }
      | c = 
}}
{{end-eqn}}

Proof:
By definition of Fourier series:
:$\displaystyle \map f x \sim \frac {a_0} 2 + \sum_{n \mathop = 1}^\infty \paren {a_n \cos n x + b_n \sin n x}$
where for all $n \in \Z_{> 0}$:
{{begin-eqn}}
{{eqn | l = a_n
      | r = \dfrac 1 \pi \int_{-\pi}^\pi \map f x \cos n x \rd x
}}
{{eqn | l = b_n
      | r = \dfrac 1 \pi \int_{-\pi}^\pi \map f x \sin n x \rd x
}}
{{end-eqn}}
Thus by definition of $f$:
{{begin-eqn}}
{{eqn | l = a_0
      | r = \frac 1 \pi \int_{-\pi}^\pi \map f x \rd x
      | c = Cosine of Zero is One
}}
{{eqn | r = \frac 1 \pi \int_{-\pi}^\pi e^x \rd x
      | c = Definition of $f$
}}
{{eqn | r = \frac 1 \pi \bigintlimits {e^x} {-\pi} \pi
      | c = Primitive of Exponential Function
}}
{{eqn | r = \frac 1 \pi \paren {e^\pi - e^{-\pi} }
      | c = 
}}
{{eqn | r = \frac 2 \pi \dfrac {\paren {e^\pi - e^{-\pi} } } 2
      | c = 
}}
{{eqn | r = \frac 2 \pi \sinh \pi
      | c = {{Defof|Hyperbolic Sine}}
}}
{{end-eqn}}
{{qed|lemma}}
For $n > 0$:
{{begin-eqn}}
{{eqn | l = a_n
      | r = \dfrac 1 \pi \int_{-\pi}^\pi \map f x \cos n x \rd x
      | c = 
}}
{{eqn | r = \dfrac 1 \pi \int_{-\pi}^\pi e^x \cos n x \rd x
      | c = Definition of $f$
}}
{{eqn | r = \frac 1 \pi \intlimits {\frac {e^x \paren {\cos n x + n \sin n x} } {1 + n^2} } {-\pi} \pi
      | c = Primitive of $e^x \cos n x$
}}
{{eqn | r = \frac 1 \pi \paren {\frac {e^\pi \paren {\cos n \pi + n \sin n \pi} } {1 + n^2} - \frac {e^{-\pi} \paren {\cos n \paren {-\pi} + n \sin n \paren {-\pi} } } {1 + n^2} }
      | c = 
}}
{{eqn | r = \frac 1 \pi \paren {\frac {e^\pi \cos n \pi} {1 + n^2} - \frac {e^{-\pi} \cos n \paren {-\pi} } {1 + n^2} }
      | c = Sine of Multiple of Pi
}}
{{eqn | r = \frac 1 \pi \paren {\frac {e^\pi \paren {-1}^n - e^{-\pi} \paren {-1}^n} {1 + n^2} }
      | c = Cosine of Multiple of Pi
}}
{{eqn | r = \frac 2 \pi \frac {\paren {-1}^n} {1 + n^2} \frac {e^\pi - e^{-\pi} } 2
      | c = manipulation
}}
{{eqn | r = \frac {2 \paren {-1}^n} {\paren {1 + n^2} \pi} \sinh \pi
      | c = {{Defof|Hyperbolic Sine}}
}}
{{end-eqn}}
{{qed|lemma}}
Now for the $\sin n x$ terms:
{{begin-eqn}}
{{eqn | l = b_n
      | r = \frac 1 \pi \int_{-\pi}^\pi \map f x \sin n x \rd x
      | c = 
}}
{{eqn | r = \frac 1 \pi \int_{-\pi}^\pi e^x \sin n x \rd x
      | c = Definition of $f$
}}
{{eqn | r = \frac 1 \pi \intlimits {\frac {e^x \paren {\sin n x - n \cos n x} } {1 + n^2} } {-\pi} \pi
      | c = Primitive of $e^x \sin n x$
}}
{{eqn | r = \frac 1 \pi \paren {\frac {e^\pi \paren {\sin n \pi - n \cos n \pi} } {1 + n^2} - \frac {e^{-\pi} \paren {\sin n \paren {-\pi} - n \cos n \paren {-\pi} } } {1 + n^2} }
      | c = 
}}
{{eqn | r = \frac 1 \pi \paren {\frac {-e^\pi n \cos n \pi} {1 + n^2} - \frac {-e^{-\pi} n \cos n \paren {-\pi} } {1 + n^2} }
      | c = Sine of Multiple of Pi
}}
{{eqn | r = -\frac 1 \pi \paren {\frac {e^\pi n \paren {-1}^n - e^{-\pi} n \paren {-1}^n} {1 + n^2} }
      | c = Cosine of Multiple of Pi
}}
{{eqn | r = -\frac {2 n} \pi \frac {\paren {-1}^n} {1 + n^2} \frac {e^\pi - e^{-\pi} } 2
      | c = manipulation
}}
{{eqn | r = -\frac {2 n \paren {-1}^n} {\paren {1 + n^2} \pi} \sinh \pi
      | c = {{Defof|Hyperbolic Sine}}
}}
{{end-eqn}}
{{qed|lemma}}
Finally:
{{begin-eqn}}
{{eqn | l = \map f x
      | o = \sim
      | r = \frac {a_0} 2 + \sum_{n \mathop = 1}^\infty \paren {a_n \cos n x + b_n \sin n x}
      | c = 
}}
{{eqn | r = \frac 1 2 \frac 2 \pi \sinh \pi + \sum_{n \mathop = 1}^\infty \paren {\frac {2 \paren {-1}^n} {\paren {1 + n^2} \pi} \sinh \pi \cos n x - \frac {2 n \paren {-1}^n} {\paren {1 + n^2} \pi} \sinh \pi \sin n x}
      | c = substituting for $a_0$, $a_n$ and $b_n$ from above
}}
{{eqn | r = \frac {\sinh \pi} \pi \paren {1 + 2 \sum_{n \mathop = 1}^\infty \frac {\paren {-1}^n} {1 + n^2} \paren {\cos n x - n \sin n x} }
      | c = simplifying
}}
{{end-eqn}}
{{qed}}