Hi!(adsbygoogle = window.adsbygoogle || []).push({});

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?

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Homework Help: Fourier series

**Physics Forums | Science Articles, Homework Help, Discussion**