I have to show that
$$\sum_{n=1}^{\infty} \frac{6((2-n^2\pi^2)(-1)^n-2)}{(n\pi)^4} = \frac{1}{4}.$$
The hint I have been given is to find the fourier sine series for the function $f(x) = x^2 $, then integrate the Fourier sine series to get the Fourier cosine series of $f(x) = x^3$ where $L = \pi$.
The formula for the Fourier sine series is $\sum_{n=1}^\infty a_n \sin( n x)$, where $a_n = \frac{2}{\pi} \int_0^\pi x^2 \sin( n x) \mathrm{d} x$. Now
$$ \frac{\pi}{2} a_n = \left. (-\frac{x^2}{n} \cos(n x)) \right\vert_{0}^{\pi} + \int_0^\pi ( \frac{2}{n} x) \cos(n x) \mathrm{d} x \\ = \left. (-\frac{x^2}{n} \cos(n x)) \right\vert_{0}^{\pi} + \left. (\frac{2 x}{n^2} \sin(n x)) \right\vert_{0}^{\pi} - \int_0^\pi \frac{2}{n^2} \sin( n x) \mathrm{d} x \\ = \left. \left( (-\frac{x^2}{n} \cos(n x)) + (\frac{2 x}{n^2} \sin(n x)) + \frac{2}{n^3} \cos(n x) \right) \right\vert_{0}^{\pi} \\ = (-1)^n \left(\frac{2}{n^3} -\frac{\pi^2}{n} \right) - \frac{2}{n^3}$$
Hence,
$$x^2 = \frac{2}{\pi} \sum_{n=1}^\infty \left( (-1)^n \left(\frac{2}{n^2} - \pi^2 \right) - \frac{2}{n^2} \right) \frac{\sin(n x)}{n} \\ = \frac{2}{\pi} \sum_{n=1}^\infty \left( \pi^2 - \frac{4}{(2n-1)^2}\right) \frac{\sin((2n-1)x}{2n-1} -\pi \sum_{n=1}^\infty \frac{\sin(2 n x)}{n} $$
So how can I integrate that to get the Fourier cosine series for $x^3$, and then finally solve my original question?