I wish to find the Fourier series for $f(x)=e^{3|x|}$ for $x\in[-\pi,\pi]$.
My solution: $f(x)$ is an even function so the $b_n$ coefficients are zero. As such we need only find $a_n$ and $\frac{a_0}{2}$. Using the usual formulae for these coefficients, I found the following:
$$S(x)=\frac{e^{3\pi}-2}{3\pi}+\sum_{n=1}^{\infty}\frac{6e^{3\pi}(-1)^n-3-3e^{3\pi}(n^2+9)}{n^2+9}\cos(nx)$$
I do not think my solution for $\frac{a_0}{2}$ is correct ; apart from this, is the remainder of the solution correct?
When it comes to $\frac{a_{0}}{2}$ we get:
$$ a_{0}= \frac{1}{\pi} \int_{- \pi}^{0} e^{-3x} dx + \frac{1}{\pi} \int_{0}^{\pi} e^{3x} dx = \frac{2}{3\pi} ( e^{3 \pi}-1)$$
Therefore, $$\frac{a_{0}}{2}= \frac{1}{3\pi} ( e^{3 \pi}-1)$$
So you might want to double-check how you computed those integrals.
Now, when it comes to the coefficients for the cosine series, we have:
$$ a_{n}= \int_{-\pi}^{0} e^{-3x}\cos(nx)dx + \int_{0}^{\pi} e^{3x}\cos(nx)dx$$
When you work this out you get:
$$ \frac{3(-1)^ne^{3\pi}-3} {n^2+9} + \frac{3(-1)^ne^{3\pi}-3} {n^2+9}=\frac{6(-1)^ne^{3\pi}-6} {n^2+9} $$
Thus, your Fourier series should look like this:
$$ \frac{1}{3\pi} ( e^{3 \pi}-1) + \sum_{n=1}^{\infty} \frac{6(-1)^ne^{3\pi}-6} {n^2+9} \cos(nx)$$
Please remember to accept the answer if it is helpful.