= Solution
For fixed $z\notin\mathbb Z$, integrate
$$
F(w)=\frac{\pi\cot(\pi w)}{w^2-z^2}
$$
counterclockwise around the specified square of half-side $R_N=N+1/2$, choosing $N>|z|$. The integer poles inside it are $-N,\ldots,N$, and their residues are $1/(n^2-z^2)$ because $\pi\cot(\pi w)$ has <residue> one at each integer.
The two other possible poles are $w=z$ and $w=-z$. Their residues are each $\pi\cot(\pi z)/(2z)$, hence sum to $\pi\cot(\pi z)/z$. This formula still applies when the numerator vanishes and a possible <pole> is removable. The <residue theorem> gives
$$
\frac1{2\pi i}\int_{\Gamma_N}F(w)\,dw
=\sum_{n=-N}^N\frac1{n^2-z^2}+\frac{\pi\cot(\pi z)}z.
$$
On the square, $|w|\geq R_N$, its perimeter is $8R_N$, and the supplied cotangent bound gives
$$
\left|\int_{\Gamma_N}F(w)\,dw\right|
\leq\frac{8CR_N}{R_N^2-|z|^2}\longrightarrow0.
$$
The series converges absolutely by part (b), so its symmetric partial sums have the same limit as the full sum. Therefore
$$
\boxed{\sum_{n=-\infty}^{\infty}\frac1{n^2-z^2}=-\frac{\pi\cot(\pi z)}z=-\frac\pi{z\tan(\pi z)},\qquad z\notin\mathbb Z.}
$$
At half-integers the cotangent form makes the value zero explicit; the reciprocal-tangent notation is understood by its <continuous> extension there. The <cotangent contour summation> rests on the <contour> estimate, not only on formally matching poles.
Back to article page