I am trying to solve the following,
Find the Fourier series of $h(x) = \text{e}^x, x \in [0,\pi)$.
I'm not sure how to approach it since the question does not specify whether to use an even or an odd extension.
Any help would be much appreciated!
I am trying to solve the following,
Find the Fourier series of $h(x) = \text{e}^x, x \in [0,\pi)$.
I'm not sure how to approach it since the question does not specify whether to use an even or an odd extension.
Any help would be much appreciated!
You may use an even extension or an odd extension. Since:
$$ \int_{0}^{\pi}e^{x}\cos(nx)\,dx = \frac{1}{n^2+1}\left(-1+(-1)^n e^{\pi}\right), $$ $$ \int_{0}^{\pi}e^{x}\sin(nx)\,dx = \frac{n}{n^2+1}\left(1-(-1)^n e^{\pi}\right) $$ that are both consequences (take the real or imaginary part) of $$ \int_{0}^{\pi} e^{x} e^{nix}\,dx = \left.\frac{e^{(1+ni)x}}{1+ni}\right|_{0}^{\pi},$$ by considering the Fourier cosine series of $e^{|x|}$ over $(-\pi,\pi)$ we have: $$ e^x = \frac{e^\pi-1}{\pi}+\frac{2}{\pi}\sum_{n\geq 1}\left((-1)^n e^\pi-1\right)\frac{\cos(nx)}{n^2+1}$$ and by considering the Fourier sine series of $\text{sign}(x)\,e^{|x|}$ over $(-\pi,\pi)$ we have: $$ e^x = \frac{2}{\pi}\sum_{n\geq 1}\left(1-(-1)^n e^{\pi}\right)\frac{n\sin(nx)}{n^2+1}.$$ However, the last series converges to zero for $x=0$, so, if we want a pointwise convergent representation over $[0,\pi)$, it is best to take the even one (also because it converges faster, since $e^{|x|}$ is a way more regular function than $\text{sign}(x)\,e^{|x|}$).