- #1

- 257

- 0

I have to calculate the Fourier coefficients [tex] c_n = \frac{1}{2\pi}\int_{-\pi}^{\pi}f(x)e^{-inx}dx [/tex] and the Fourier series for the following function:

[tex]

f(x)=

\begin{cases}

\frac{2}{\pi}x + 2 & \text{for } x\in \left[-\pi,-\pi/2\right]\\

-\frac{2}{\pi}x & \text{for } x\in \left[-\pi/2,\pi/2\right]\\

\frac{2}{\pi}x - 2 & \text{for } x\in \left[\pi/2,\pi\right]

\end{cases}

[/tex]

Since this function is odd the Fourier series should only contain [tex]\sin{x} [/tex] (right?), but I keep getting a series containing both sine and cosine. Furthermore I'm having big trouble with the integrals; are there any "tricks" when doing such integrals?