Use the sine Fourier series for $x$ and $x^2$ to show $1-\frac{1}{3^3} + \frac{1}{5^3} - \frac{1}{7^3} + ... = \frac{\pi ^3}{32}$ We were given that $x=2(\sin x - \frac{\sin 2x}{2}+ \frac{\sin 3x}{3}-\dots)$ and I computed that $x^2=\sum_{n=1}^{\infty}\frac{(-1)^n(4-2\pi ^2 n^2)-4}{\pi n^3}\sin(nx)$.
How can I use these two to show that  $1-\frac{1}{3^3} + \frac{1}{5^3} - \frac{1}{7^3} + \dots = \frac{\pi ^3}{32}$
 A: HINT:
First show that the function $f(x)=x^3-\pi^2 x$ has Fourier Series representation for $x\in [-\pi,\pi]$
$$x^3-\pi^2 x=12 \sum_{n=1}\frac{(-1)^n}{n^3}\sin(nx) \tag 1$$
Then, let $x=\pi/2$.

SPOILER ALERT:  Scroll over the highlighted area to reveal the solution

We can find the Fourier series for $x^3$ by integrating the given Fourier Series for $x$.  To that end, we proceed.  First, note that the Fourier Series representation of $x$ on $[-\pi,\pi]$ is $$x=2\sum_{n=1}^\infty \frac{(-1)^{n-1}}{n}\,\sin(nx) \tag 1$$Integrating $(1)$ we find that $$\frac12 x^2 =2\sum_{n=1}^\infty \frac{(-1)^{n-1}}{n^2}\, (1-\cos(nx)) \tag 2$$Integrating $(2)$, we find that $$\frac16 x^3=2x\sum_{n=1}^\infty \frac{(-1)^{n-1}}{n^2}\,  -2\sum_{n=1}^\infty \frac{(-1)^{n-1}}{n^3}\, \sin(nx) $$Recall that $\sum_{n=1}^\infty \frac{(-1)^{n-1}}{n^2}=\frac{\pi^2}{12}$ (this can easily be shown by looking at the even and odd components of the Basel Series $\sum_{n=1}^\infty\frac1{n^2}$).  Then, rearranging terms yields $(1)$.  Letting $x=\pi/2$, we obtain the coveted identity $$\sum_{n=1}^\infty \frac{(-1)^{n-1}}{(2n-1)^3}=\frac{\pi^3}{32}$$ 

