Is there a closed form for this infinite sum? I am wondering is there a closed form for this infinite sum.
$$R(\beta)=\beta^2\sum_{k=1}^\infty \frac{\sin^2(\pi kn/\beta)}{(k^2-\beta^2)^2},$$
where $n\in\mathbb{N},\beta\in\mathbb{R}.$
 A: We may start with the expression obtained using Fourier series for $x\in(-\pi,\pi)$ and $z$ not a positive integer :
$$\tag{1}\cos(x\,z)=\frac{2\,z\sin(\pi z)}{\pi}\;\left(\frac 1{2z^2}-\sum_{k=1}^\infty \;(-1)^k\frac{\cos(k\,x)}{k^2-z^2}\right)$$
that I'll rewrite as :
$$\cos((\pi-a)z)=\frac{2\,z\sin(\pi z)}{\pi}\;\left(\frac 1{2z^2}-\sum_{k=1}^\infty \;(-1)^k\frac{\cos(k\,(\pi-a))}{k^2-z^2}\right)$$
or simply :
$$\tag{2}\frac{\pi}2\frac{\cos((\pi-a)z)}{z\;\sin(\pi z)}=\frac 1{2z^2}-\sum_{k=1}^\infty \;\frac{\cos(k\,a)}{k^2-z^2}$$
Since $\;\displaystyle\sin^2(x)=\frac {1-\cos(2x)}2\;$ and $\;\displaystyle \frac d{dz}\frac 1{k^2-z^2}=\frac {2z}{(k^2-z^2)^2}\;$ we deduce that for :
\begin{align}
R(a,b)&:=2\sum_{k=1}^\infty \frac{\sin^2(k\,a)}{(k^2-b^2)^2}\\
&=\sum_{k=1}^\infty \frac 1{(k^2-b^2)^2}-\sum_{k=1}^\infty \frac {\cos(k\,2a)}{(k^2-b^2)^2}\\
&=\frac 1{2b}\frac d{db}\left[\sum_{k=1}^\infty \frac 1{k^2-b^2}-\sum_{k=1}^\infty \frac {\cos(k\,2a)}{k^2-b^2}\right]\\
&=\frac{\pi}2\frac 1{2b}\frac d{db}\left[-\frac{\cos(\pi b)}{b\;\sin(\pi b)}+\frac{\cos((\pi-2a)b)}{b\;\sin(\pi b)}\right]\\
\end{align}
and thus the wished closed form for $b$ not a positive integer and $\,a\in(0,\pi)\,$ at least :
$$\sum_{k=1}^\infty \frac{\sin^2(k\,a)}{(k^2-b^2)^2}=\frac {\pi}{8\,b^3}\left[\cot(\pi b)+\pi b\csc^2(\pi b)-(1+\pi b\cot(\pi b))\csc(\pi b)\cos((\pi-2a)b)-\\(\pi-2a)b\,\csc(\pi b)\sin((\pi-2a)b)\right]$$
pari/gp scripts used for numerical confirmation :
r(a,b)=2*sumalt(k=0,sin(k*a)^2/(k^2-b^2)^2)
f(a,b)=Pi/(4*b^3)*(1/tan(Pi*b)+Pi*b/sin(Pi*b)^2-(1+Pi*b/tan(Pi*b))/sin(Pi*b)*cos((Pi-2*a)*b)-(Pi-2*a)*b/sin(Pi*b)*sin((Pi-2*a)*b))

