Calculate the Fourier series for $e^{-|x|}$ over $[-\pi,\pi]$.
I know this function is even, there will no terms relate with $\sin$. To find $a_o$ and $a_k$, I need to calculate these two integrals $$\frac{1}{2\pi}\int_{-\pi}^{\pi}e^{-|x|}\,dx\qquad\text{and}\qquad\frac{1}{\pi}\int_{-\pi}^{\pi}e^{-|x|}\cos(kx)dx$$ My problem is I don't know how to integrate $e^{-|x|}$, can someone show me how to calculate that or give me a hint to start? Thanks
You already commented that these are even so rewrite your integrals as:
$$\frac{1}{\pi}\int_{0}^{\pi}e^{-x}\,dx\qquad\text{and}\qquad\frac{2}{\pi}\int_{0}^{\pi}e^{-x}\cos(kx)dx$$
Evaluating these will give you:
$$\frac{1}{\pi}\left(1-e^{-\pi}\right)\qquad\text{and}\qquad\frac{1-e^{-\pi}\cos(k\pi)+ke^{-\pi}\sin(k\pi)}{(1+k^2)\pi}$$