= Cotangent contour summation
{title2=$\operatorname{Res}_{z=n}[\pi\cot(\pi z)h(z)]=h(n)$}
The <cotangent> kernel $\pi\cot(\pi z)$ has a simple pole of residue one at every integer. If a meromorphic $h$ is regular at the integers, these residues sample its integer values. Integrating around squares of half-side $N+1/2$ and applying the <residue theorem> converts a finite sum of samples into residues at the other poles. When the contour integral tends to zero and $h$ has only finitely many other poles, the limiting sum is the negative sum of those off-integer residues of $\pi\cot(\pi z)h(z)$. A uniform cotangent bound and sufficiently rapid decay of $h$ justify the vanishing contour term. At an integer where $h$ itself has a pole, use the full <Laurent series> to find the combined residue instead of substituting a divergent sample; the <Basel problem> calculation with $h(z)=z^{-2}$ illustrates this exception.
Back to article page