The following is a question from a past exam in my university in a course called "Mathematical Methods for Statistics". It consists of two subquestions that may or may not be related (there is a high chance they are related based on similar exams by the same professor).
(a) Write the Fourier series for the function $f(x) := x(\pi - |x|)$ in the interval $[-\pi, \pi]$.
(b) Calculate the sum of the following series: $$ S :=\sum_{n = 0}^\infty \frac{1}{(2n + 1)^6} $$
Attempted solution
(a) $$ f(x) \sim \frac{8}{\pi} \sum_{n = 0}^\infty \frac{\sin((2n + 1) x)}{(2n + 1)^3} $$
(b) Based on past exams, I expect the result to follow from part (a) by evaluating $f(x)$ at some appropriately chosen $x$, but I can't figure out what this $x$ might be. The best I got was by assigning $x := \frac{\pi}{2}$, which yields: $$ f(\frac{\pi}{2}) = \frac{8}{\pi}\sum_{n = 0}^\infty (-1)^n \frac{1}{(2n + 1)^3} $$
If we define $a_n := \frac{(-1)^n}{(2n + 1)^3}$, we have that $S = \sum_{n = 0}^\infty a_n^2$. But how do I proceed from here?
Another possibility is that my answer to part (a) is wrong.