Skip to content
Tutorials Center
My learning

Topics

Lesson 30 of 36 · Series and Residues

The Residue Theorem

Compute residues at simple and higher-order poles with formulas and evaluate closed contour integrals as 2πi times the sum of residues, with runnable checks.

The residue theorem collapses a contour integral around many singularities into a finite sum. You no longer parametrize contours or expand integrals: you find the singularities inside the curve, compute one number (the residue) at each, add them, and multiply by 2πi. It is the workhorse of the second half of complex analysis.

The theorem

Let f be analytic on a simply connected domain except at finitely many isolated singularities a₁, ..., a_k, and let C be a simple closed counterclockwise contour in the domain that avoids the singularities and encloses all of them. Then

Text
∮_C f(z) dz = 2πi · Σ_(j=1)^k Res(f, a_j)

If only some singularities lie inside C, sum over those only. For a contour winding n(C, a_j) times around each singularity the sum is weighted: 2πi Σ n(C, a_j) Res(f, a_j).

Why it is true. Cut the region inside C so that small circles surround each singularity. By deformation, the integral over C equals the sum of integrals over small circles. Around a_j the Laurent series gives ∮ f dz = 2πi c_(-1), as in the Laurent series lesson.

Computing residues

You rarely need the full Laurent series. These formulas cover almost everything.

1. Simple pole at a:

Text
Res(f, a) = lim_(z→a) (z - a) f(z)

2. Simple pole of a quotient f = p/q, where p(a) ≠ 0, q(a) = 0 and q'(a) ≠ 0:

Text
Res(p/q, a) = p(a) / q'(a)

3. Pole of order m at a:

Text
Res(f, a) = (1/(m - 1)!) · lim_(z→a) d^(m-1)/dz^(m-1) [ (z - a)^m f(z) ]

4. Removable singularity: the residue is 0.

5. Essential singularity: you must find the coefficient of (z - a)^(-1) from the Laurent series.

Example 1: simple poles

f(z) = 1/(z² + 1) has poles at ±i. By formula 2, with p = 1, q' = 2z:

Text
Res(f, i) = 1/(2i) = -i/2,     Res(f, -i) = 1/(-2i) = i/2

The integral around a circle of radius 2 is 2πi (-i/2 + i/2) = 0. Around the circle |z - i| = 1 (enclosing only i) it is 2πi · (1/(2i)) = π.

Example 2: a double pole

f(z) = e^z / z² at 0: formula 3 with m = 2 gives d/dz e^z |_(z=0) = 1, so Res = 1. (Check with the series: e^z/z² = 1/z² + 1/z + 1/2 + ....)

Example 3: mixed poles

f(z) = (z² + 1) / ((z - 1)(z - 2)²).

  • At z = 1 (simple): (1² + 1)/(1 - 2)² = 2.
  • At z = 2 (double): d/dz [(z² + 1)/(z - 1)] at 2. The derivative is (2z(z - 1) - (z² + 1))/(z - 1)² = (z² - 2z - 1)/(z - 1)², which at z = 2 equals (4 - 4 - 1)/1 = -1.

So on |z| = 3 (enclosing both) the integral is 2πi (2 - 1) = 2πi, on |z| = 1.5 (enclosing only 1) it is 4πi, and on |z| = 0.5 it is 0.

Example 4: residue from the series

f(z) = e^(1/z) at 0: the series Σ z^(-n)/n! has c_(-1) = 1. So ∮_(|z|=1) e^(1/z) dz = 2πi.

flowchart TD
    A["Find the singularities of f"] --> B["Which lie inside C?"]
    B --> C["Classify each:<br/>removable, pole of order m, essential"]
    C --> D["Compute the residues"]
    D --> E["Integral = 2πi × sum of residues"]

The residue theorem as a recipe.

If you only need the sum of all residues of a rational function, check its behavior at infinity: for f(z) ≈ k/z as |z| → ∞ the sum of all finite residues equals k. In Example 3, f ≈ z²/z³ = 1/z, so the total is 1, matching 2 - 1.

Try it: residues by contour integration

Numerically, Res(f, a) = (1/2πi) ∮ f dz on a tiny circle around a. This function does exactly that, and we use it to test the formulas on five functions with known residues, including an essential singularity.

Python A residue calculator

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Try it: the theorem on three contours

We take Example 3, f(z) = (z² + 1)/((z - 1)(z - 2)²), integrate it numerically on circles of radius 0.5, 1.5 and 3 centered at 0, and compare with 2πi times the sum of the residues inside (0, 2 and 1 respectively, as computed above).

Python Integral equals 2 pi i times the sum of residues

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Common mistakes

  • Wrong order. Use m equal to the true order of the pole (cancel zeros first), or you will compute with the wrong derivative.
  • Forgetting (z - a)^m. In formula 3 you differentiate (z - a)^m f(z), not f.
  • Residues outside the contour. Only count singularities inside C.
  • Orientation. Clockwise contours flip the sign.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. The residue of 1/(z² + 1) at z = i is

    With p = 1 and q' = 2z, Res = 1/(2i) = -i/2.
  2. 2. ∮_(|z|=1) e^z / z² dz equals

    The residue at the double pole is d/dz e^z at 0 = 1, so the integral is 2πi.
  3. 3. What is the residue of sin z / z at 0?

    The singularity is removable, so there are no negative powers and the residue is 0.
  4. 4. The residue theorem expresses ∮_C f dz as

    ∮_C f dz = 2πi Σ Res(f, a_j) over the singularities inside C.

Summary

  • ∮_C f dz = 2πi Σ Res(f, a_j) over the singularities inside a positively oriented simple closed contour.
  • Simple pole: lim (z - a) f(z), or p(a)/q'(a) for p/q.
  • Pole of order m: differentiate (z - a)^m f(z) exactly m - 1 times, divide by (m - 1)! and take the limit.
  • Removable singularities have residue 0; essential singularities need the Laurent series.
  • A numerical contour integral around a tiny circle is a good check for any residue.

Next: Real integrals by residues