I try to set up the Fourier series of $e^x$ in $[-\pi, \pi) $
By definition: $ a_n = \int\limits_{-\pi}^{\pi} e^x* cos(nx) = {e^x (cos(n x)+n* sin(n x)) \over (1+n^2)}|_{-\pi}^{\pi} $
Now I simplify the term as I know $sin(n*\pi) = 0 \ \forall n \in \mathbb{N} $
Similarly $cos(n \pi)$ simplifies to $ (-1)^n $
The values of b_n follow a similar computation and process of simplifying:
$ b_n = (e^x (-n cos(n x)+sin(n x)))/(1+n^2) $
The result for the series then is: $a_0 + {1 \over \pi} \sum\limits_{n = 1}^{N} {e^x (-1)^n(1-n) \over n^2+1} $
However this seems to be utterly wrong as the graphs plotted in Desmos look completely different from the one expected.
I would be really happy, if someone could point at the error and explain its wrongness. Any constructive comment or answer is appreciated.
- I verified them by hand. So why are they wrong?
– Imago Jul 19 '15 at 15:16