Originally Posted by

**craig** Think this is a pretty simple question, just getting stuck on the last section, here's what I've got:

Let $\displaystyle f$ be a periodic function with period 6, such that $\displaystyle f(x) = x \: \text{for} \: -3 < x \leq 3$. Calculate the Fourier series of $\displaystyle f$.

Odd function, so we know $\displaystyle a_0 = a_n = 0$.

$\displaystyle b_n = \frac{2}{3} \int_0^3 x \cos{\frac{\pi n}{3} x} \: dx$

...

$\displaystyle = \frac{6}{\pi^2n^2}(\cos{\pi n} - \cos{0})$

$\displaystyle = \frac{6}{\pi^2n^2}((-1)^n - 1)$.

However in the answer they've got:

$\displaystyle \frac{6}{\pi} \displaystyle\sum\limits_{n=1}^{\infty} \frac{(-1)^{n+1}}{n}\sin{\frac{\pi n}{3} x}$.

Just wondering how they get to the $\displaystyle \frac{6}{\pi} \frac{(-1)^{n+1}}{n}$, as far as I can see my integration's correct?

Thanks in advance for the help