<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] This would be one way of going about it but using a different fourier series:
$$f(x)\ = 1+\sum_{n=1}^{\infty}\frac{4\left(\left(-1\right)^{n}-1\right)}{n^{2}\pi^{2}}\cos\left(\frac{\pi nx}{2}\right)$$
Notice how $$\frac{4\left(\left(-1\right)^{n}-1\right)}{n^{2}\pi^{2}}$$ is 0 when n is even, so we can just  use odd numbers instead with $(2n+1)$.
So we can make a new formula with only odds and we can do this by letting $n =(2n+1)$, and because we don't want the even results we can resolve the numerator to be equal to $2$.
$$f(x)\ =\ 1\ -\ \frac{8}{\pi^{2}}\sum_{n=0}^{\infty}\frac{1}{\left(2n+1\right)^{2}}\cos\left(n\pi x\ +\frac{\pi x}{2}\right)$$
Then setting $x = 0$ gives:
$$0=\ 1\ -\ \frac{8}{\pi^{2}}\sum_{n=0}^{\infty}\frac{1}{\left(2n+1\right)^{2}}$$
After rearranging:
$$\frac{\pi^{2}}{8}=\sum_{n=0}^{\infty}\frac{1}{\left(2n+1\right)^{2}}$$
</s>