The Residue Theorem

A single residue collapses one contour integral around one singularity. The residue theorem assembles those atoms into a global statement: the integral of f around any simple closed contour is just 2\pi i times the sum of the residues at the singularities trapped inside.

Evaluating an integral becomes a checklist: list the singularities, keep the ones inside, add up their residues, multiply by 2\pi i.

Deriving the theorem

Step 1 — isolate each singularity. Around each enclosed z_k draw a tiny circle C_k small enough that the circles are disjoint and lie inside \gamma. The integrand is holomorphic on the region between \gamma and the little circles.

Step 2 — deform the big contour onto the small circles. By Cauchy's theorem (applied to the multiply-connected region) the outer integral equals the sum of the integrals around the little circles:

\oint_\gamma f(z)\,dz = \sum_{k=1}^{n} \oint_{C_k} f(z)\,dz.

Step 3 — integrate the Laurent series on one circle. Near z_k expand f(z) = \sum_{m=-\infty}^{\infty} a_m^{(k)}(z - z_k)^m and integrate term by term over C_k:

\oint_{C_k}(z - z_k)^m\,dz = \begin{cases} 2\pi i, & m = -1,\\[2pt] 0, & m \ne -1.\end{cases}

Step 4 — only the residue survives. Every power integrates to 0 except the 1/(z - z_k) term, whose coefficient is the residue, so

\oint_{C_k} f(z)\,dz = 2\pi i\,a_{-1}^{(k)} = 2\pi i\,\operatorname{Res}(f, z_k).

Step 5 — sum over the enclosed singularities. Adding the circles back up gives the theorem:

\oint_\gamma f(z)\,dz = \sum_{k=1}^{n} 2\pi i\,\operatorname{Res}(f, z_k) = 2\pi i \sum_{k=1}^{n} \operatorname{Res}(f, z_k).

Worked: the same integrand, three contours

Take f(z) = \dfrac{1}{z^2 + 1} = \dfrac{1}{(z - i)(z + i)}, with simple poles at i and -i. The quotient rule gives the residues \operatorname{Res}(f, i) = \dfrac{1}{2i} and \operatorname{Res}(f, -i) = \dfrac{1}{-2i} = -\dfrac{1}{2i}.

Contour 1 — |z| = 2 encloses both poles. Their residues cancel:

\oint_{|z| = 2} \frac{dz}{z^2 + 1} = 2\pi i\left(\frac{1}{2i} - \frac{1}{2i}\right) = 0.

Contour 2 — |z| = \tfrac12 encloses no pole. The integrand is holomorphic inside, so the sum is empty:

\oint_{|z| = 1/2} \frac{dz}{z^2 + 1} = 2\pi i \cdot (\text{nothing inside}) = 0.

Contour 3 — a loop enclosing only i. Now a single residue contributes and the integral is nonzero:

\oint_\gamma \frac{dz}{z^2 + 1} = 2\pi i\,\operatorname{Res}(f, i) = 2\pi i \cdot \frac{1}{2i} = \pi.

Same integrand, three answers — the contour decides which residues are in play.

The residue theorem is the moment all of complex analysis pays off at once. Contour integration gave the integral meaning; Cauchy's theorem made closed loops vanish; the Laurent series exposed each singularity; and the residue distilled each one to a single number. The theorem now says that the entire integral is nothing but the enclosed residues, added up. It turns a hard analytic computation into a finite act of bookkeeping — and, as the rest of this stage shows, lets us evaluate real integrals that have no elementary antiderivative.

Watch the enclosed residues add up

Three simple poles sit in the plane with residues +1, -1, and +2. Grow the contour radius R with the slider: as each pole crosses inside |z| = R it lights up and its residue joins the running sum, and the readout reports \oint f\,dz = 2\pi i\sum \operatorname{Res}. Poles outside the circle stay dim and contribute nothing.