# Fourier series

1. Sep 23, 2010

### rayman123

1. The problem statement, all variables and given/known data
Expand the function in to Fourier series
$$f(x) = coshx, |x|\leq \pi$$

2. Relevant equations

Fourier series will be
$$C_{n}=\frac{1}{2\pi}\int_{-\pi}^{\pi}(\frac{e^{x}+e^{-x}}{2}})e^{-inx}}dx$$

$$\frac{1}{4\pi}\int_{-\pi}^{\pi}({e^{x}e^{-inx})dx+ \frac{1}{4\pi}\int_{-\pi}^{\pi}(e^{-x}e^{-inx})dx$$

3. The attempt at a solution

I calculate both integrals separately

$$\frac{1}{4\pi}\int_{-\pi}^{\pi}({e^{x}e^{-inx})dx=\frac{1}{4\pi}\int_{-\pi}^{\pi}({e^{x-inx})dx=\frac{1}{4\pi}\frac{e^{x-inx}}{1-in}$$

I substitute $$x=\pm\pi \Rightarrow \frac{(-1)^n}{1-in}[e^{\pi}-e^{-\pi}]$$
1. The problem statement, all variables and given/known data

and the other one gives me

$$\frac{(-1)^n}{-1-in}[e^{-\pi}-e^{\pi}]$$

is this correct so far?