# $\int\limits_0^{\pi}\sum\limits_{n=1}^{\infty}\frac{\sin(nx)}{n^2}dx=2\sum\limits_{n=1}^{\infty}\frac{1}{(2n-1)^3}$

I am stuck with this simple problem. I am obviously making a stupid mistake somewhere, could anybody help me out? Need to show that:

$$\int_0^{\pi}\sum_{n=1}^{\infty}\frac{\sin(nx)}{n^2}dx=2\sum_{n=1}^{\infty}\frac{1}{(2n-1)^3}$$

Since the sequence is uniformly convergent, I put the integral sign after the sum. but then I get

$$\int_0^{\pi}\sum_{n=1}^{\infty}\frac{\sin(nx)}{n^2}dx=2\sum_{n=1}^{\infty}\frac{1}{n^3}$$

Since $$\int_0^{\pi}\frac{\sin(nx)}{n^2}dx=\frac{-\cos(nx)}{n^3}\Bigg|_0^{\pi}=\frac{2}{n^3}$$

Where is the mistake? Thanks!

-
yes, definitely. fixed that :) – Sarunas Jan 25 '13 at 19:02
What is $\cos(n\pi)$ again? – Stefan Hansen Jan 25 '13 at 19:02

Are you sure that the integral is always $2/n$? What happens when $n$ is even?