The residue theorem
Statement
Let \(\Omega \subseteq \mathbb{C}\) be a simply connected open set, let \(a_1,\dots,a_n \in \Omega\) be distinct points, and let \(f\) be holomorphic on \(\Omega \setminus \{a_1,\dots,a_n\}\). Let \(\gamma\) be a positively oriented, simple, closed, piecewise-\(C^1\) contour in \(\Omega \setminus \{a_1,\dots,a_n\}\) whose interior \(\mathrm{int}(\gamma) \subseteq \Omega\) contains every \(a_k\) (equivalently, the winding number \(n(\gamma,a_k)=1\) for each \(k\)). Then \[ \oint_\gamma f(z)\,dz \;=\; 2\pi i \sum_{k=1}^{n} \operatorname{Res}(f,a_k), \] where \(\operatorname{Res}(f,a_k) = c_{-1}^{(k)}\) is the coefficient of \((z-a_k)^{-1}\) in the Laurent expansion of \(f\) about \(a_k\) on some punctured disc \(0 \lt |z-a_k| \lt r_k \subseteq \Omega \setminus \{a_1,\dots,a_n\}\).
Why it matters
The residue theorem converts a global object — a contour integral, which in principle depends on the entire path and the entire function along it — into a finite sum of purely local data extracted at each singular point. This is the single most important computational engine in complex analysis: it reduces integrals that are intractable by real methods (many real definite integrals, Fourier transforms, sums of series, inverse Laplace transforms) to algebraic bookkeeping around poles.
It is also the conceptual capstone of the Cauchy theory: Cauchy's theorem (the integral is zero when \(f\) is holomorphic throughout) and the Cauchy integral formula (recovering \(f\) and its derivatives from a contour integral) are both special cases, corresponding respectively to zero singularities and to a single simple-pole-like extraction of \(f(a)\).
Hypotheses
Proof
Result
Reading. To integrate a function around a closed loop, you never need to know its global behaviour along the whole path — only the "singular fingerprint" (the residue, a single complex number) left at each isolated singularity trapped inside the loop. Add up those fingerprints and multiply by \(2\pi i\).
Scope. Applies to any \(f\) holomorphic except at finitely many isolated singularities inside a simply connected domain \(\Omega\), for any positively oriented simple closed contour in \(\Omega\) enclosing them with winding number \(1\) and passing through none of them. It extends verbatim (with residues weighted by winding number) to non-simple contours, and to domains that are not simply connected provided \(\gamma\) is null-homologous in \(\Omega\) after removing the singular set.
Corollaries & converses
- Cauchy's theorem is the case \(n=0\): no singularities enclosed forces \(\oint_\gamma f\,dz = 0\).
- The Cauchy integral formula \(f(a) = \frac{1}{2\pi i}\oint_\gamma \frac{f(z)}{z-a}\,dz\) is the case \(n=1\) applied to \(g(z) = f(z)/(z-a)\), which has a single simple pole at \(a\) with residue \(f(a)\).
- The argument principle (counting zeros minus poles of \(f\) inside \(\gamma\) via \(\frac{1}{2\pi i}\oint_\gamma \frac{f'}{f}\,dz\)) follows by applying the theorem to \(f'/f\), whose residue at a zero or pole of order \(m\) is \(\pm m\).
- Converse: the statement is not an "if and only if" in a useful sense — the identity \(\oint_\gamma f\,dz = 2\pi i \sum \operatorname{Res}(f,a_k)\) can hold accidentally for functions or contours violating the hypotheses (e.g. residues summing to a value that happens to match a genuinely different left-hand side), so no meaningful converse is asserted or true in general.
- A practical corollary: real integrals of the form \(\int_{-\infty}^{\infty} R(x)\,dx\) or \(\int_0^{2\pi} R(\cos\theta,\sin\theta)\,d\theta\) can be evaluated by choosing an auxiliary contour (semicircle, unit circle, keyhole) and applying the theorem, converting a real-analysis problem into pole-hunting.
Fails without
- Drop "isolated singularities": take \(f(z) = 1/\sin(1/z)\) on a punctured neighbourhood of \(0\); \(f\) has poles at \(z = 1/(n\pi)\) accumulating at \(0\), so \(0\) is a non-isolated ("essential-cluster") singularity. There is no Laurent series on any punctured disc \(0 \lt |z| \lt \varepsilon\) (poles of \(f\) lie inside every such disc), so "\(\operatorname{Res}(f,0)\)" is not even defined, and no contour integral formula in terms of a finite residue sum at \(0\) can hold.
- Drop simple connectivity of \(\Omega\) (or null-homology of \(\gamma\)): let \(\Omega = \mathbb{C}\setminus\{0\}\) and \(f(z) = 1/z^2\), which is holomorphic on all of \(\Omega\) (no singularities of \(f\) inside \(\Omega\) at all, so the "sum of enclosed residues" is vacuously \(0\)). Take \(\gamma\) the unit circle, winding once around the missing point \(0\). Direct computation gives \(\oint_\gamma z^{-2}\,dz = 0\) here (consistent, since \(1/z^2\) has an antiderivative \(-1/z\) single-valued on \(\Omega\)) — but replace \(f\) by \(g(z)=1/z\): now \(g\) is holomorphic throughout \(\Omega\) (its only singularity, \(z=0\), is not a point of \(\Omega\), so there are zero singularities to sum), yet \(\oint_\gamma g\,dz = 2\pi i \neq 0 = 2\pi i \cdot 0\). The deformation-to-small-circles argument (Steps 1-6) breaks because \(\gamma\) cannot be contracted to a point or dissected away from the "hole" at \(0\) without leaving \(\Omega\); the naïve formula fails exactly because the hole itself, not a singularity of \(f\), contributes to the integral.
- Drop "\(\gamma\) does not pass through a singularity": take \(f(z)=1/z\) and let \(\gamma\) be any contour passing through \(z=0\). The integrand is unbounded at a point of the path, \(\oint_\gamma f\,dz\) fails to exist as an ordinary contour integral, and the theorem's conclusion is meaningless before it even starts.
Common errors
- Forgetting the factor of \(2\pi i\), or writing \(\sum \operatorname{Res}\) as the final answer instead of \(2\pi i \sum \operatorname{Res}\).
- Including residues of poles that lie outside \(\gamma\), or omitting one that lies inside — especially with poles close to the contour, where a sketch of the region is skipped and inclusion/exclusion is guessed rather than checked via the winding number or an explicit inequality.
- Using the simple-pole shortcut \(\operatorname{Res}(f,a) = \lim_{z\to a}(z-a)f(z)\) at a pole of order \(\geq 2\), where it silently gives the wrong (often zero) answer; the correct formula needs a derivative: \(\operatorname{Res}(f,a) = \frac{1}{(m-1)!}\lim_{z\to a}\frac{d^{m-1}}{dz^{m-1}}\big[(z-a)^m f(z)\big]\) for a pole of order \(m\).
- Applying the theorem when \(\gamma\) is not closed, or is closed but traversed with net winding number \(0\) around some enclosed point (a figure-eight or a contour that doubles back), without adjusting for winding number weighting.
- Confusing "singularity of \(f\)" with "zero of the denominator after cancellation" — e.g. treating \(f(z) = \frac{\sin z}{z}\) as having a pole at \(0\) (it has a removable singularity, residue \(0\), because the zero of \(\sin z\) at \(0\) cancels the zero of the denominator).
- On real-integral applications: forgetting to verify the arc estimate (that the integral over the auxiliary semicircular/large-radius arc vanishes as \(R\to\infty\), typically via Jordan's lemma or an ML-estimate) before asserting the real integral equals \(2\pi i \sum \operatorname{Res}\).
Discussion
The residue theorem is the natural terminus of the sequence Cauchy–Goursat theorem \(\to\) Cauchy integral formula \(\to\) Taylor/Laurent expansions \(\to\) residue calculus: each earlier result is subsumed as a special case with zero or one singularity. Historically, Cauchy developed the core integral theorem in the 1820s, but it was Cauchy himself (and later Riemann and others systematising the Laurent-series viewpoint in the 1840s-50s) who isolated the residue as the invariant quantity governing the integral, giving the theory its modern computational form.
Conceptually the proof is a topology-analysis handshake: the "cut" construction (Steps 1-6) is pure topology — it says an integral over a contour depends only on the homotopy/homology class of the contour in the punctured domain, and that class is captured entirely by how many times it winds around each puncture. The "small circle" computation (Steps 7-10) is pure local analysis — a single explicit integral of \(e^{ip\theta}\) that acts as a delta-function detector, picking out exactly the \(m=-1\) Laurent coefficient and annihilating every other power. The residue theorem is where these two independent facts multiply together.
More structurally, the residue at \(a\) can be characterised without reference to any contour at all: it is the unique linear functional on germs of meromorphic functions at \(a\) that is translation- and scale-covariant and agrees with \(2\pi i\)-normalised contour integration on a small loop — equivalently, it is (up to the \(2\pi i\)) the pairing of \(f\,dz\) against the generator of \(H^1\) of a punctured disc in de Rham cohomology. This is the seed of the more general machinery of residues in several complex variables and in algebraic geometry (Grothendieck residues), where the "sum of residues is a global invariant" phenomenon reappears in far more abstract settings.
Common misconception: that the theorem requires \(f\) to have only poles (not essential singularities) inside \(\gamma\). It does not — the residue is defined identically as the \(c_{-1}\) Laurent coefficient regardless of whether the singularity is removable, a pole, or essential (e.g. \(e^{1/z}\) at \(0\) has residue \(1\)), and the proof above never used the order or type of the singularity, only that each is isolated.
Worked examples
Reading. Only the pole at \(z=0\) contributes; the order-2 pole at \(z=1\) happens to have residue zero, so it is enclosed but invisible to the integral.
Scope. Any rational-times-entire integrand with finitely many poles inside a simple closed contour is handled the same way.
Reading. A real integral with no elementary antiderivative shortcut(other than the known \(\arctan\)) is recovered purely from the residue at the single pole \(z=i\) trapped in the upper half-plane.
Scope. The same semicircular-contour technique works for any \(\int_{-\infty}^\infty P(x)/Q(x)\,dx\) with \(\deg Q \geq \deg P + 2\) and \(Q\) having no real zeros.
Problems
- Compute \(\displaystyle\oint_{|z|=1} \frac{1}{z^3}\,dz\) directly from the definition of the Laurent coefficient (do not merely quote the answer).
Solution
Here \(f(z) = z^{-3}\) is already its own Laurent series about \(0\), with \(c_{-1}=0\) (the only nonzero coefficient is \(c_{-3}=1\)). By the residue theorem, \(\oint_{|z|=1} z^{-3}\,dz = 2\pi i \cdot \operatorname{Res}(f,0) = 2\pi i \cdot 0 = 0\). Directly: parametrising \(z=e^{i\theta}\), \(\oint z^{-3}dz = \int_0^{2\pi} e^{-3i\theta}\cdot ie^{i\theta}\,d\theta = i\int_0^{2\pi} e^{-2i\theta}\,d\theta = 0\) by Step 9 of the proof with \(m=-3\neq -1\), confirming the result.
- Evaluate \(\displaystyle\oint_{|z|=3} \frac{z^2+1}{(z-1)(z-2i)}\,dz\), positively oriented.
Solution
Both \(z=1\) and \(z=2i\) satisfy \(|z|\lt 3\), so both are enclosed simple poles. \(\operatorname{Res}(f,1) = \dfrac{1^2+1}{1-2i} = \dfrac{2}{1-2i} = \dfrac{2(1+2i)}{5} = \dfrac{2+4i}{5}\). \(\operatorname{Res}(f,2i) = \dfrac{(2i)^2+1}{2i-1} = \dfrac{-4+1}{2i-1} = \dfrac{-3}{2i-1} = \dfrac{-3(-1-2i)}{5} = \dfrac{3+6i}{5}\). Sum: \(\dfrac{2+4i+3+6i}{5} = \dfrac{5+10i}{5} = 1+2i\). Hence the integral is \(2\pi i(1+2i) = 2\pi i - 4\pi = -4\pi + 2\pi i\).
- Explain, using the theorem, why \(\displaystyle\oint_\gamma \frac{1}{z^2+1}\,dz\) takes only three possible values as \(\gamma\) ranges over all positively oriented simple closed contours in \(\mathbb{C}\setminus\{i,-i\}\) avoiding \(i,-i\), and state them.
Solution
The only singularities of \(f(z)=1/(z^2+1)\) are the simple poles \(z=i\) (residue \(1/2i\)) and \(z=-i\) (residue \(-1/2i\), by the same computation with sign flipped). A simple closed \(\gamma\) either encloses neither pole, only \(i\), only \(-i\), or both. By the residue theorem the integral equals \(2\pi i\) times the sum of enclosed residues: enclosing neither gives \(0\); enclosing only \(i\) gives \(2\pi i\cdot\frac1{2i}=\pi\); enclosing only \(-i\) gives \(2\pi i\cdot\left(-\frac1{2i}\right)=-\pi\); enclosing both gives \(2\pi i\left(\frac1{2i}-\frac1{2i}\right)=0\). So the integral takes only the values \(\{-\pi,0,\pi\}\), regardless of the shape or size of \(\gamma\) beyond which poles it traps.
- A student computes \(\operatorname{Res}\!\left(\dfrac{1}{z^2(z-1)},0\right)\) as \(\lim_{z\to0} z\cdot\dfrac{1}{z^2(z-1)}\) and gets an undefined (infinite) limit, then concludes the residue theorem cannot be applied. Diagnose the error and compute the correct residue.
Solution
The error is applying the simple-pole shortcut to a pole of order \(2\): \(z=0\) is a double zero of the denominator \(z^2(z-1)\), not simple, so \(\lim_{z\to0}z\cdot f(z)\) is not the residue formula for this case — that limit diverges precisely because one extra factor of \(z\) is needed. The correct formula for a pole of order \(m=2\) is \(\operatorname{Res}(f,0) = \lim_{z\to0}\frac{d}{dz}\big[z^2 f(z)\big] = \lim_{z\to0}\frac{d}{dz}\left[\frac{1}{z-1}\right] = \lim_{z\to0} \frac{-1}{(z-1)^2} = -1\). So the theorem applies perfectly well; only the shortcut formula was misused. (Consequently \(\oint_{|z|=1/2}f\,dz\) would be \(2\pi i\cdot(-1) = -2\pi i\), enclosing only \(z=0\).)
- Use the residue theorem to evaluate \(\displaystyle\int_0^{2\pi} \frac{d\theta}{2+\cos\theta}\) by converting it to a contour integral over \(|z|=1\).
Solution
Substitute \(z=e^{i\theta}\), so \(\cos\theta = \frac{1}{2}(z+z^{-1})\) and \(d\theta = dz/(iz)\), giving \[\int_0^{2\pi}\frac{d\theta}{2+\cos\theta} = \oint_{|z|=1} \frac{1}{2+\frac12(z+z^{-1})}\cdot\frac{dz}{iz} = \oint_{|z|=1} \frac{2\,dz}{i(z^2+4z+1)}.\] The denominator \(z^2+4z+1=0\) has roots \(z=-2\pm\sqrt3\). Since \(-2+\sqrt3\approx-0.27\) lies inside \(|z|=1\) and \(-2-\sqrt3\approx-3.73\) lies outside, only \(z_0=-2+\sqrt3\) is enclosed. This is a simple pole with \(\operatorname{Res}\left(\frac{2}{i(z^2+4z+1)},z_0\right) = \frac{2}{i(2z_0+4)} = \frac{2}{i\cdot 2\sqrt3} = \frac{1}{i\sqrt3}\) (using \(2z_0+4 = 2(-2+\sqrt3)+4 = 2\sqrt3\)). By the residue theorem the contour integral is \(2\pi i \cdot \frac{1}{i\sqrt3} = \frac{2\pi}{\sqrt3}\). Hence \(\displaystyle\int_0^{2\pi}\frac{d\theta}{2+\cos\theta} = \frac{2\pi}{\sqrt3} = \frac{2\pi\sqrt3}{3}\).