Calculate $\sum_{n=-\infty}^{\infty}\frac{1-\cos(an)}{(an)^2}$ After playing with some series in a numerical math website, it seems to me like the following identity holds:
$$\sum_{n=-\infty}^{\infty}\frac{1-\cos(an)}{(an)^2}=\frac{\pi}{a}$$
It seems a little bit surprising to me, and I was wondering if there is an elementary way to see it. Convergence is trivial due to comparison with $\frac{1}{n^2}$, but the specific value is interesting. I would think that some Fourier analysis might be applicable, mainly because $\pi$ appeared here, but couldn't make it work.
P.S: Even a way to see the behavior $\sum_{k=-\infty}^{\infty}\frac{1-\cos(an)}{(an)^2}\propto \frac{1}{a}$ is interesting to me, and presumably simpler. 
P.S2: It seems that for large $a$ (possibly just $a>2\pi$) the claim is incorrect, see comment. Still, it is interesting to calculate, even if only for $|a|<2\pi$.
 A: Define
$$f(x)=\sum_{n=-\infty}^{\infty}\frac{1-\cos(nx)}{(nx)^2}$$
for $x\in (0,2\pi]$. We can differentiate this function to get
$$f'(x)=\frac{d}{dx}\left(\sum_{n=-\infty}^{\infty}\frac{1-\cos(nx)}{(nx)^2}\right)=\sum_{n=-\infty}^{\infty}\frac{d}{dx}\left(\frac{1-\cos(nx)}{(nx)^2}\right)$$
$$=\sum_{n=-\infty}^{\infty}\left(\frac{\sin (n x)}{n x^2}-\frac{2 (1-\cos (n x))}{n^2 x^3}\right)=\frac{1}{x^2}\sum_{n=-\infty}^{\infty}\frac{\sin(nx)}{n}-\frac{2}{x}f(x).$$
From the answer to this question, we know that for $x\in (0,2\pi)$
$$\sum_{n=1}^\infty \frac{\sin(nx)}{n}=\frac{\pi-x}{2}.$$
Since $\lim_{n\to 0}{\frac{\sin(nx)}{n}}=x$ and $\frac{\sin(nx)}{n}$ is even, this implies
$$\frac{1}{x^2}\sum_{n=-\infty}^\infty \frac{\sin(nx)}{n}=\frac{1}{x^2}\left(x+2\sum_{n=1}^\infty \frac{\sin(nx)}{n}\right)=\frac{1}{x^2}(x+\pi-x)=\frac{\pi}{x^2}.$$
This then gives us the ODE
$$f'(x)=\frac{\pi}{x^2}-\frac{2}{x}f(x).$$
Solving this, we get that
$$f(x)=\frac{\pi}{x}+\frac{C}{x^2}$$
for some constant $C$. We can find this by noting that
$$f(\pi)=\sum_{n=-\infty}^{\infty}\frac{1-\cos(nx)}{(nx)^2}=\frac{1}{2}+\frac{2}{\pi^2}\sum_{n=1}^\infty \frac{2}{(2n-1)^2}=\frac{1}{2}+\frac{2}{\pi^2}\frac{\pi^2}{4}=1.$$
Then $C=0$, and we get $f(x)=\frac{\pi}{x}$ for $x\in (0,2\pi)$. To finish the proof, note that
$$f(2\pi)=\sum_{n=-\infty}^{\infty}\frac{1-\cos(n2\pi)}{(n2\pi)^2}=...+0+0+\frac{1}{2}+0+0+...=\frac{1}{2}$$
as expected.
