The Residue Theorem & the Evaluation of Integrals

the summation of series by residues

Residues do not only evaluate integrals — they also sum infinite series. Sums like the sum over n of 1/n^2 or 1/(n^2 + a^2) can be hard to add directly, but there is a beautiful trick: find a function whose residues at the integers are exactly the terms you want to add, integrate it around a large contour, and let the contour grow until the integral vanishes, forcing the sum of all residues to be zero — which rearranges into the value of your series.

The engine is the function pi cot(pi z). Its magic property: it has a simple pole at every integer n, and the residue of pi cot(pi z) at z = n is exactly 1, for every integer n. So pi cot(pi z) times g(z) has, at each integer n, a residue equal to g(n) (when g is regular there). Now integrate pi cot(pi z) g(z) around a large square contour of half-side N + 1/2 (chosen to avoid the poles). One can show pi cot(pi z) stays bounded on these squares, so for g decaying fast enough the contour integral tends to 0 as N grows. By the residue theorem the integral equals 2 pi i times (the sum of g(n) over all integers plus the residues at the poles of g itself), and setting this to 0 gives: the sum over all integers n of g(n) = minus the sum of residues of pi cot(pi z) g(z) at the poles of g. For alternating sums you use pi csc(pi z) = pi / sin(pi z) instead, whose residue at n is (-1)^n.

This is how one elegantly derives, for instance, the sum over n from 1 to infinity of 1/n^2 = pi^2 / 6, by taking g(z) = 1/z^2 and reading off the residue of pi cot(pi z)/z^2 at the origin. The method is a vivid demonstration that the residue theorem is a general bridge between discrete sums and continuous integrals. The one honest requirement: g must decay fast enough (typically like 1/z^2) for the large contour integral to vanish; otherwise the bookkeeping has an extra surviving term.

With g(z) = 1/z^2, the function pi cot(pi z)/z^2 has at z = 0 a residue of -pi^2/3. Summing all residues to zero forces 2 times the sum over n >= 1 of 1/n^2 plus (-pi^2/3) = 0, giving the sum over n >= 1 of 1/n^2 = pi^2/6.

Use pi cot(pi z) (residue 1 at each integer) or pi csc(pi z) (residue (-1)^n) as the summing kernel.

The kernel pi cot(pi z) gives ordinary sums; pi csc(pi z) gives alternating sums via its (-1)^n residues. The method needs g to decay fast enough that the large square integral tends to zero — without that decay the identity carries an extra term.

Also called
residue summation of seriesevaluating infinite sums by contour integration留數求和法