Back to the on-screen lesson ·

The residue theorem and real integrals

Deforming a contour onto one small circle per singularity turns a closed contour integral into $2\pi i$ times the sum of the residues inside — and closing the real line with a large arc that contributes nothing turns a real integral with no elementary antiderivative into the same computation.

Paper packet. Every task here also exists on screen, where it is checked automatically; answers written on paper are not assessed by Nydus. When you are back at a device, enter your answers there.

1. What you will learn

By the end of this lesson you will be able to state the residue theorem, decide which singularities a contour encloses, add the residues inside and multiply once, recognise when residues cancel, evaluate a real improper integral by closing the contour with an arc and proving the arc contributes nothing, and say which half plane to close in.

2. What you already have

Residues, the deformation of contours, and the estimation bound. This lesson does nothing new: it deforms a contour onto one small circle per singularity, uses the residue at each, and adds. What is new is how much that buys.

3. The words this lesson will use

The residue theorem evaluates a closed contour integral as $2\pi i$ times the sum of the residues inside. Closing a contour means adding an arc to an open path to make a loop; the added arc is negligible when its contribution tends to zero as its radius grows. An integral over an infinite interval is improper, and here is read as the limit of integrals over $[-R, R]$.

4. Add the residues inside, and multiply once

The theorem. Let $C$ be a simple closed contour, anticlockwise, and let $f$ be analytic on and inside $C$ except at finitely many isolated singularities $z_1, \ldots, z_n$ inside it. Then

$$\oint_C f(z)\,dz = 2\pi i \sum_{j=1}^{n} \operatorname{Res}_{z_j} f.$$

The proof is deformation. Surround each singularity with a tiny circle. The region between $C$ and those circles carries no singularity, so Cauchy's theorem applies to its boundary and gives zero. Rearranged, the integral round $C$ is the sum of the integrals round the tiny circles — and each of those is $2\pi i$ times the residue there, by the Laurent computation of the last lesson.

So every result in this unit collapses into one statement, and the whole of Cauchy's theorem is the case with no singularities inside.

Real integrals. The technique that makes this famous outside complex analysis: an integral along the real line becomes a closed contour integral by adding a large semicircular arc, and the arc is then shown to contribute nothing.

Improper integrals of rational functions. For $\int_{-\infty}^{\infty} R(x)\,dx$ with the denominator's degree at least two more than the numerator's, close in the upper half plane: the arc's length grows like $R$ while the integrand falls off like $1/R^{2}$, so the estimation bound kills it. The answer is $2\pi i$ times the residues above the axis.

Trigonometric integrals. For $\int_0^{2\pi} R(\cos\theta, \sin\theta)\,d\theta$, substitute $z = e^{i\theta}$, so that $\cos\theta$ becomes $\tfrac12(z + 1/z)$, $\sin\theta$ becomes $\tfrac{1}{2i}(z - 1/z)$ and $d\theta$ becomes $dz/(iz)$. The interval becomes the unit circle and the integral becomes a contour integral with no arc to discard.

In both cases the hard part is not the residue arithmetic. It is choosing a contour whose extra piece can be thrown away, and proving that it can.

Another way: picture

A contour integral is a survey of what is inside. Each singularity contributes exactly one number, its residue, and the contour contributes nothing of its own — only the list of which singularities it went round. Two wildly different contours enclosing the same poles return the same value, and a pole a hair's breadth outside returns nothing at all.

Another way: steps

  1. List the singularities of the integrand.
  2. Decide which lie inside the contour.
  3. Find the order of each of those, and its residue.
  4. Add them, then multiply the total by $2\pi i$.
  5. For a real integral, first close the contour and show the added arc contributes nothing.

5. Closing a contour, and when it is allowed

The residue arithmetic is mechanical. The step that needs judgement is turning an integral that is not round a loop into one that is, and it has exactly two parts: choose the extra piece, and prove it contributes nothing.

Which half plane. For a rational integrand it makes no difference which is chosen — the answers agree, with the sign from the orientation compensating for the different poles — so take whichever has fewer poles. For an integrand with a factor $e^{iax}$, it makes all the difference: $|e^{iaz}|$ is $e^{-a\,\operatorname{Im} z}$, which decays upward when $a > 0$ and downward when $a < 0$. Closing the wrong way gives an arc whose contribution grows without bound, and the method fails outright.

Why the arc vanishes. Always the estimation bound: the arc has length $\pi R$ and the integrand is bounded by something on it. A bound of $M/R^{2}$ gives $\pi M/R \to 0$ and the arc is gone. A bound of only $M/R$ gives $\pi M$, a constant, and proves nothing — which is exactly why the degree gap of two is a hypothesis rather than a convenience. For oscillating integrands the cruder bound is not enough and Jordan's lemma does the same job more carefully.

And a check that costs nothing. The answer to a real integral of a real function must come out real. The $i$ from the $2\pi i$ has to cancel against an $i$ in the residues, and if it does not, something has gone wrong — a pole counted in the wrong half plane, or an orientation reversed. It is the cheapest error-detector in the subject.

6. Every pole of the function is not every pole that counts

The single commonest error is to compute the residue at every singularity the integrand has and add them all. The theorem counts the ones inside the contour, and a pole outside contributes exactly nothing — not a little because it is close, not a lot because its residue is large. Enclosure is a yes-or-no question, and it is decided before any residue is worked out.

The second error is arithmetic in shape: multiplying each residue by $2\pi i$ separately and then adding. That gives the same number, but it hides the cancellation that so often happens, and cancellation is usually the interesting thing about the answer.

The third is forgetting the arc. An integral along the real line is not a closed contour integral, and the residue theorem does not apply to it until a loop has been made and the added piece has been shown to contribute nothing. Asserting that the arc vanishes without an estimate is the step that gets skipped, and it is the step that is false when the integrand decays too slowly.

And a fourth, quieter one: the orientation. Everything above assumes anticlockwise. A clockwise contour gives the negative of the sum, and a contour winding twice gives twice it — which is the winding number from lesson 11 sitting silently in front of every residue.

7. Two poles, one contour

  1. $\displaystyle\oint_{|z| = 3} \dfrac{dz}{z(z - 1)}$: poles at $0$ and $1$, both inside.

    List them, then locate them.

  2. Residue at $0$: cancel $z$ and substitute, giving $-1$. Residue at $1$: cancel $z - 1$ and substitute, giving $1$.

    One residue per enclosed pole.

  3. They sum to $0$, so the integral is $0$ — despite two honest poles inside.

    Add before multiplying.

8. A real integral with no antiderivative in sight

  1. $\displaystyle\int_{-\infty}^{\infty} \dfrac{dx}{x^{4} + 1}$. Close with a semicircle above; the integrand falls off like $1/R^{4}$, so the arc contributes nothing.

    Close, and discard the arc.

  2. The poles are the four fourth roots of $-1$; two of them, $e^{i\pi/4}$ and $e^{3i\pi/4}$, lie above the axis.

    Only the enclosed ones count — and here the roots of unity return.

  3. Each is a simple pole with residue $1/(4z^{3})$ evaluated there, and $2\pi i$ times their sum comes out to $\pi/\sqrt{2}$ — a real number, as it had to be.

    The reality of the answer is a free check.

9. Your turn: $\displaystyle\oint_{|z| = 2} \dfrac{z}{(z - 1)(z - 5)}\,dz$

  1. The poles are $1$ and $5$; only $1$ is inside the circle of radius $2$.

    Sort them before computing anything.

  2. Your turn: work this step out. Its working is at the end of the packet.

    Residue at $1$: cancel and substitute, $\dfrac{1}{1 - 5} = -\dfrac14$. The integral is $-\dfrac{\pi i}{2}$.

10. Guided practice

Put the steps of evaluating a contour integral by the residue theorem in order.

Number the steps in order (write the number in the box):

11. Guided practice

$C$ is a large circle enclosing both poles. What is $\displaystyle\oint_C \dfrac{dz}{\left(z - 2\right)\left(z - 7\right)}$?

Answer:

12. Practice

Let $f(z) = \dfrac{5}{z} + \dfrac{2}{z - 2}$, and let $C$ be the circle $|z| = 7$, once anticlockwise. Fill in the table.

Value
The residue at the origin
The residue at the other pole
The total of the residues inside the contour
The integral round the contour, as a multiple of two pi i

13. Practice

The integrand is $\dfrac{1}{z} + \dfrac{2}{z - 4}$ throughout. Match each contour to the value of the integral round it, as a multiple of $2\pi i$.

$1$$2$$3$$0$
The circle $|z| = 1$
The circle $|z - 4| = 1$
The circle $|z| = 10$
The circle $|z - 20| = 1$

14. Practice

Select every statement that is true of the residue theorem.

This task has no paper form; do it on a device.

15. Somewhere new

$\displaystyle\int_{-\infty}^{\infty} \dfrac{dx}{x^{2} + 9} = k\pi$. What is $k$? Give a fraction.

Answer:

16. Lesson test

Lesson test: one question per skill, one attempt each, no hints. Your answers are checked when you submit.

17. Test question

Let $f(z) = \dfrac{7}{z} + \dfrac{3}{z - 2}$, and let $C$ be the circle $|z| = 5$, once anticlockwise. Fill in the table.

Value
The residue at the origin
The residue at the other pole
The total of the residues inside the contour
The integral round the contour, as a multiple of two pi i

18. What you can do now

You can evaluate a contour integral by collecting the residues inside, and you can turn a real integral into one by closing the contour. Say in your own words why a pole just outside the contour contributes nothing. Next: conformal maps, where analytic functions are studied as pictures rather than as integrands.

Working for the steps left to you

9. Your turn: $\displaystyle\oint_{|z| = 2} \dfrac{z}{(z - 1)(z - 5)}\,dz$, step 2