<s>[INST] Evaluating a summation of inverse squares over odd indices $$ \sum_{n=1}^\infty \frac{1}{n^2}  = \frac{\pi^2}{6}$$
I want to evaluate this sum when $n$ takes only odd values.
 [/INST] This can be shown in a similar way to Euler's proof of $\zeta(2) = \frac{\pi^2}{6}$, which starts with the function $\frac{\sin(x)}{x}$
(i.e. the sinc function). Here we start with the cosine function which can be expressed as the infinite product
\begin{align}
\cos(x) &= \prod_{n=1}^\infty \left(1-\frac{4x^2}{\pi^2(2n-1)^2}\right) \\
 &= \left(1- \frac{4x^2}{\pi^2}\right)\left(1- \frac{4x^2}{9\pi^2}\right)\left(1- \frac{4x^2}{25\pi^2}\right) ... \\
&=1-x^2\left(\frac{4}{\pi^2}+\frac{4}{9\pi^2}+\frac{4}{25\pi^2}+...\right)+...
\end{align}
$\cos(x)$ can also be expressed by the following Maclaurin series expansion:
$$\cos(x) = \sum_{n=1}^\infty \frac{(-1)^n}{(2n)!}x^{2n} = 1-\frac{x^2}{2!}+\frac{x^4}{4!}-\frac{x^6}{6!} +...$$ 
Comparing the $x^2$ coefficients gives:
$$-\frac{1}{2!} = -\frac{4}{\pi^2}\left(1+\frac{1}{9} + \frac{1}{25} + ...\right)$$
Thus,
$$\sum_{n=1}^\infty \frac{1}{(2n-1)^2} = \frac{\pi^2}{8}$$
</s>