Let $f(x)$ be a periodic function such that $f(x+\pi)=f(x)$ and $f(x)=\cos{x}$ for $0 < x < \pi$, I need to calculate the series $$\sum_{n=1}^\infty \frac{n^2}{(4n^2-1)^2}$$ using $f(x)$'s Fourier series.
I defined a new function $g(x)$ such that $g(x)=0$ if $x=n\pi$ else $g(x)=f(x)$ from $f(x)$ definition we get that $g(x)$ is a periodic function with $\pi$ period and it's an odd function, thus $$ b_n=\frac{2}{\pi/2}\int^{\pi/2}_0 g(x)\sin{\frac{n\pi x}{\pi/2}}dx=\frac{4}{\pi}\int^{\pi/2}_0 \cos{x}\sin{2nx}dx = \frac{4}{\pi}(\frac{-\sin{n\pi}-2n}{4n^2-1})=-\frac{8}{\pi}(\frac{n}{4n^2-1}) $$ $$ f(x)=-\frac{8}{\pi}\sum_{n=1}^\infty \frac{n}{4n^2-1}\sin{2nx} $$ but I don't see how I can get rid of $\sin{2nx}$ or have $\frac{n}{4n^2-1}$ in power of 2