TITLE: $\sum_{n=-\infty}^{\infty}\frac{1}{(u +n)^2}=\frac{\pi^2}{(\sin \pi u)^2}$
QUESTION [5 upvotes]: I've already see a proof by Marko Riedel which I list it follows:

The standard way to treat these sums is to integrate
  $$ f(z) = \frac{1}{(z+\alpha)^2} \pi \cot(\pi z)$$
  along a contour consisting of a circle of radius $R$ and with $R$ going to infinity and hence being larger than $\alpha$, where the circle does not pass through the poles on the real axis.
  Now along the semicircle in the upper half plane we have
  $$|f(z)| \le \frac{1}{(R-|\alpha|)^2}\pi
\left|\frac{e^{i\pi R\exp(i\theta)} + e^{-i\pi R\exp(i\theta)}}
{e^{i\pi R\exp(i\theta)} - e^{-i\pi R\exp(i\theta)}}\right|=
\frac{1}{(R-|\alpha|)^2} \pi 
\left|\frac{e^{2i\pi R\exp(i\theta)}+1}{e^{2i\pi R\exp(i\theta)}-1}\right| <
\frac{1}{(R-|\alpha|)^2} \pi  
\frac{1+e^{-2\pi R\sin(\theta)}e^{2i\pi R\cos(\theta)}}
{1-e^{-2\pi R\sin(\theta)}e^{2i\pi R\cos(\theta)}}$$
  This last term is clearly $O(1/R^2)$ as $R$ goes to infinity as the quotient of the two exponentials goes to one since $\exp(-R)$ vanishes and there is no singularity when $\theta = 0$ or $\theta = \pi$ as $R\cos\theta = \pm R$, which is not an integer by the assumption that the circle avoids the poles and hence cannot be one.  

My question:
It is clear that for each $z=Re^{i \theta}$ , $f(z)=O(1/R^2)$ ，but can this guarantee that the last term on RHS is uniform bounded ? Since $\theta$ varies on a compact interval $[0, \pi]$ , I want to show that for each $ \theta \in [0, \pi]$ , and a fixed positive number $M \gt 1 $ there exist an open ball contains $\theta$ and a fixed $R_{\theta}\gt 0$ , for every $R \ge R_{\theta}$ and $x \in $ the open ball $$\frac{1+e^{-2\pi R\sin(x)}e^{2i\pi R\cos(x)}}
{1-e^{-2\pi R\sin(x)}e^{2i\pi R\cos(x)}} \le M$$  For $\theta \neq 0,\pi$ , it is easy to find the desired $R_{\theta}$ and the open ball , but if $\theta = 0$ or $ \theta = \pi$ , for every open ball containing $\theta$ , it behave erratically near $\theta$ , I have no idea how to deal with this .

REPLY [5 votes]: With the  quoted proof  being unsatisfactory we  try again.   With the
goal of evaluating
$$\sum_{n=-\infty}^\infty \frac{1}{(u+n)^2}$$
where $u$ is not an integer we study the function
$$f(z) = \frac{1}{(u+z)^2} \pi\cot(\pi z).$$
which has the property that with $S$ being our sum,
$$S = \sum_n \mathrm{Res}_{z=n} f(z) = \sum_n \frac{1}{(u+n)^2}.$$
We examine what  happens when we integrate $f(z)$  along the rectangle
$$\Gamma  =\pm   (N+1/2)  \pm  i   N$$  with  $N$  a   large  positive
integer.
There   are   no    poles   on   this   contour    and   seeing   that
$\frac{1}{(u+z)^2}\in\Theta(1/N^2)$  on  the   contour,  the  integral
$$\int_\Gamma f(z)  dz$$ goes to  zero as  $N$ goes to  infinity. This
will be shown below.

This implies that  the sum of the  residues at the poles  of $f(z)$ is
zero, giving
$$S + \mathrm{Res}_{z=-u} \frac{1}{(u+z)^2} \pi\cot(\pi z) = 0.$$
The residue at the double pole at $z=u$ is given by
$$\left.(\pi \cot(\pi z))'\right|_{z=-u} =
\left. - \frac{\pi^2}{\sin(\pi z)^2} \right|_{z=-u}$$
so that we have
$$\bbox[5px,border:2px solid #00A000]{
\sum_n \frac{1}{(u+n)^2} = \frac{\pi^2}{\sin(\pi u)^2}.}$$
To convince yourself that the integral really does vanish consider the
two  lines $\Gamma_1$  which  is $N+1/2\pm  iN$  (right vertical)  and
$\Gamma_2$ which is $\pm N+1/2+iN$ (top horizontal). With $N$ going to
infinity we  may suppose that  $N\gt 1$ and also  $N\gt \max(|\Re(u)|,
|\Im(u)|).$
We parameterize $\Gamma_1$ with $z=N+1/2+it$ so that
$$\left|\int_{\Gamma_1} f(z) dz \right|
= \left|\int_{-N}^N f(N+1/2+it) i dt\right|.$$
The norm of  the fractional term attains its maximum  at $t=0$ when we
cross the real axis where $|u+z|$  is minimized, giving an upper bound
on the norm which is
$$\frac{1}{(\Re(u)+N+1/2)^2}
= \frac{1}{N^2} \frac{1}{(1+(\Re(u)+1/2)/N)^2}.$$
For the norm of the trigonometric term we get
$$|\pi\cot(\pi (N+1/2) + \pi it)|
=\pi\left|\frac{e^{i\pi (N+1/2) - \pi t}+e^{-i\pi (N+1/2) + \pi t}}
{e^{i\pi (N+1/2) - \pi t}-e^{-i\pi (N+1/2) + \pi t}}\right|
\\ = \pi\left|\frac{i(-1)^N e^{- \pi t} - i(-1)^N e^{\pi t}}
{i(-1)^N e^{- \pi t} + i(-1)^N e^{\pi t}}\right|
= \pi|\tanh(\pi t)|.$$
Observe that  with $t$ real  $\pi \tanh(\pi t)$  has no poles  and its
norm is  bounded by $\pi$.  Therefore the  norm of the  integral along
$\Gamma_1$ is bounded by
$$2N \times \frac{\pi}{(\Re(u)+N+1/2)^2}
\in 2N \times \Theta(1/N^2) = \Theta(1/N)$$
and the integral vanishes as $N$ goes to infinity as claimed.
For $\Gamma_2$ we parameterize with $z = t + i N$ so that
$$\left|\int_{\Gamma_2} f(z) dz \right|
= \left|\int_{-(N+1/2)}^{N+1/2} f(t+iN) dt\right|.$$
The  norm of  the  fractional  term is  minimized  when  we cross  the
imaginary axis, giving an upper bound on the norm which is
$$\frac{1}{(\Im(u)+N)^2}
= \frac{1}{N^2} \frac{1}{(1+\Im(u)/N)^2}.$$
For the norm of the trigonometric term we get
$$|\pi\cot(\pi t + \pi i N)|
= \pi\left|\frac{e^{i\pi t - \pi N} + e^{-i\pi t + \pi N}}
{e^{i\pi t - \pi N} - e^{-i\pi t + \pi N}}\right|
\le \pi\left|\frac{e^{\pi N}+e^{-\pi N}}{e^{\pi N}-e^{-\pi N}}\right|
=\pi|\coth(\pi N)|.$$
There aren't any  poles here either and this term  is bounded above by
$\pi\coth(\pi)$ because $N>1.$  This gives the following  bound on the
norm of the integral along $\Gamma_2:$
$$(2N+1) \times \frac{\pi\coth(\pi)}{(\Im(u)+N)^2}
\in (2N+1) \times \Theta(1/N^2) = \Theta(1/N)$$
and this integral also vanishes as $N$ goes to infinity as claimed.
The other two line segments can be bounded by the same technique.