Evaluating the integral of a Fourier Series I've been trying for quite a while to show that $$\int_0^\pi\left (\sum_{n=1}^\infty \frac{\sin(nx)}{n^3} \right) \, dx$$ 
$$=$$ $$2\sum_{n=1}^\infty \frac{1}{(2n-1)^4} $$
I can't quite seem to get it. It's in an intro Real Analysis, and we're learning about uniform convergence. I've worked with derivatives of series but not an integral. How can I go about solving this? 
I know that $$\frac{d}{dx} \sum_{n=1}^\infty f_n (x) = \sum_{n=1}^\infty \frac{d}{dx}(f_n(x))$$ under the right conditions -- Can I use this with integrals? If so, how could I apply it?
Thanks
 A: Show that the series converges uniformly on $[0,\pi]$ (use the Weierstrass $M$-test). This justifies integrating the series term-by-term over $[0,\pi]$. Then you compute 
$$\sum_{n = 1}^\infty\frac{1}{n^3}\int_0^\pi \sin(nx)\, dx = \sum_{n = 1}^\infty \frac{1}{n^3}\cdot\frac{1 - \cos(n\pi)}{n} = \sum_{n = 1}^\infty \frac{1 - (-1)^n}{n^4} =2\sum_{n = 1}^\infty \frac{1}{(2n-1)^4}$$
since $1 - (-1)^n$ is $0$ for even $n$ and $2$ for odd $n$.
A: To integrate a series term-by-term over a finite interval, it is sufficient that the series converges uniformly on the interval of integration. In this case we're fine, because
$$ \left\lvert \frac{\sin{nx}}{n^3} \right\rvert \leqslant \frac{1}{n^3}, $$
which is a convergent series. Therefore we just have to compute the integral of each term,
$$ \int_0^{\pi} \sum_{n=1}^{\infty} \frac{\sin{nx}}{n^3} \, dx = \sum_{n=1}^{\infty} \frac{1}{n^3} \int_0^{\pi} \sin{nx} \, dx, $$
and the last integral is $\frac{1}{n}(1-\cos{n\pi})$, which is $2/n$ if $n$ is odd and $0$ if $n$ is even. Reindexing the series then gives the result you want.
