<s>[INST] Prove that $\pi^2/8 = 1 + 1/3^2 + 1/5^2 + 1/7^2 + \cdots$ Attempt: I found the Fourier series for $f(x) = \begin{cases} 0,& -\pi < x < 0 \\ x/2,& 0 < x < \pi \end{cases}$
a) $a_0 = \frac{1}{2\pi}\int_0^{\pi} r\,dr = \pi/4$
$a_n =  \frac{1}{2\pi}\int_0^r \frac{r\cos(nr)}{2}dr = \frac{(-1)^n - 1}{2\pi n^2}$
$b_n =  \frac{1}{2\pi}\int_0^r r\sin(nr)\,dr = \frac{(-1)^n + 1}{2n}$
$f(x) = \frac{\pi}{8} - \sum_n [\frac{((-1)^n - 1)\cos(nx)}{2\pi n^2} + \frac{((-1)^n + 1)\sin(nx)}{2n}]$
The prof asked us to use this Fourier series to prove that $\pi^2/8 = 1+1/3^2+1/5^2+1/7^2+\cdots$. How do I do this?
 [/INST] First of all your $b_k$ are wrong, they should be:
$$b_k= \frac{(-1)^{k+1}}{2k}$$
Not that it matters beacause of the following. Second of all notice that $f(x)$ is continuos at zero, which is to say $f(0^+)= f(0^-)=0$. Once you get the expansion right is not that hard, just make $x=0$, easy peasy.
</s>