Lecture 21: the residue theorem

Complex analysis, lecture 2
(April 10, 2026)

In the last few lectures, we saw the following fact: if f has an isolated singularity at z0, so is analytic in a punctured disk {0<|zz0|<r} centered at z0, then it has a Laurent series on this punctured disk,

f(z)=n=an(zz0)n.

In the last unit, we saw another fact: if γ is a circle around z0 of radius less than r, so that f is analytic on γ, then

γ(zz0)n𝑑z={2πin=10n1.

Combining these facts, we can study the integral of f around γ:

γf(z)𝑑z =γn=an(zz0)ndz
=n=anγ(zz0)n𝑑z
=2πia1.

This motivates the following definition. If f is analytic on a punctured disk centered at z0 (i.e. if either f is analytic at z0, or z0 is an isolated singularity of f), then we write Resz0(f) (also sometimes denoted Res(f,z0) or Resf(z0)) for the coefficient of (zz0)1 in the Laurent expansion of f at z0.

Recalling the formula for the Laurent coefficients, we have

Resz0(f)=12πiγf(z)𝑑z

for γ as above; however we will usually want to use the residue to compute the integral rather than the other way around, so it is generally better to compute the residue directly from the Laurent expansion, or from some rules we will see below.

Note that if f is analytic at z0, or has a removable singularity there, then all Laurent coefficients of negative powers of zz0 are zero, so in particular Resz0(f)=0. Thus the above recovers Cauchy’s theorem in this case.

More interestingly, this lets us compute integrals around circles containing singularities, generalizing Cauchy’s theorem, and singularities different from the type covered in Cauchy’s formula. By the deformation theorem, this actually generalizes to integrating around the boundaries of arbitrary domains containing isolated singularities. Pushing this argument, we get the following theorem, the final key theorem in this class for computing integrals.

Theorem (Residue theorem).

Let D be a bounded domain with piecewise smooth boundary, and let z1,,zm be points in D such that f:D{z1,,zm} is an analytic function extending to DD, which we think of as a function on D with isolated singularities at the zi. Then

Df(z)𝑑z=2πii=1mReszi(f).
Proof.

By the deformation theorem (or Cauchy’s theorem), we can turn the left-hand side into

i=1mγif(z)𝑑z

where γi is a circle of sufficiently small radius centered at zi. By the argument above, γif(z)𝑑z=2πiReszi(f), and adding up these terms gives the claim. ∎

If f(z)=g(z)zz0 where g is analytic on D, then writing g(z)=n=0an(zz0)n as its Taylor expansion, we have

f(z)=1zz0n=0an(zz0)n=n=1an+1(zz0)n,

so the residue as z0 is a0=g(z0). Therefore the residue theorem gives

Dg(z)zz0𝑑z=Df(z)𝑑z=2πig(z0),

which recovers Cauchy’s integral formula for g. We can similarly recover the version for derivatives.

This is an extremely useful theorem: it lets us evaluate, for example, line integrals of meromorphic functions, which none of our methods so far will let us solve in general. It also has applications to usual real integrals, as well as theoretical applications.

In order to use it though we first need to know how to compute residues. We’ve already covered the simplest case: when f is analytic at z0, the residue is zero. The next-simplest case is when f has a simple pole at z0, i.e. a pole of order 1: the Laurent series is then given by

f(z)=n=1an(zz0)n=a1zz0+a0+a1(zz0)+.

Therefore

(zz0)f(z)=a1+a0(zz0)+

and so

limzz0(zz0)f(z)=a1=Resz0(f).

This is a frequently useful formula. For example, consider f(z)=1z2+1 at z=i. Although by factoring we can see that f(z)=1(z+i)(zi) has a simple pole at i and i, it isn’t necessarily immediately obvious what the residue is, without computing the Laurent series. However by taking the limit we can find it quickly:

Resi(f)=limzi(zi)(z+i)(zi)=12i=i2.

However, if f has a higher-order pole, there is no guarantee that this limit will exist. For example, if it has a double pole,

f(z)=n=2an(zz0)n=a2(zz0)2+a1zz0+a0+a1(zz0)+,

so to get a holomorphic function we multiply by (zz0)2 to obtain

(zz0)2=a2+a1(zz0)+a0(zz0)2+.

To extract a1, now the coefficient of zz0, we now need to differentiate and evaluate at 0, so we find

Resz0(f)=ddz((zz0)2f(z))|z=z0.

In fact, this argument still applies if f has a simple pole, or even if it is analytic at z0.

For f as above, with a simple pole at i, we have (zi)2f(z)=ziz+i=12iz+i, with derivative 2i(z+i)2; evaluating at z=i gives 2i(2i)2=2i4=i2, as above. For an example with a double pole, we could take f(z)=1(z2+1)2=1(z+i)2(zi)2, now with double poles at ±i; now this formula gives

Resi(f)=ddz(zi)2(z+i)2(zi)2|z=i=ddz1(z+i)2|z=i=2(z+i)3|z=i=2(2i)3=i4.

With slightly more difficulty, we can extend this argument to poles of any order. If f has a pole of order at most N at z0, so

f(z)=aN(zz0)N++a1zz0+a0+a1(zz0)+

(including the case aN=0, in which case it is a pole of lower order), we have

(zz0)Nf(z)=aN+aN+1(zz0)++a1(zz0)N1+a0(zz0)N+

and so differentiating N1 times and evaluating at z0 gives

Resz0(f)=a1=1(N1)!(ddz)N1((zz0)Nf(z))|z=z0.

For a pole of infinite order (i.e. an essential singularity), although the residue theorem remains true, we cannot easily evaluate the residue in this way. The only hope is to write down the Laurent series directly and thus evaluate a1, which is fortunately often possible in practice at points of interest.

Since we are especially interested in meromorphic functions fg, let’s mention the following special case: if f and g are both analytic at z0 and g has a simple zero at z0, so that fg has either a removable singularity (if f has a zero) or a simple pole (if not) at z0. We have

Resz0(f/g)=limzz0(zz0)f(z)/g(z)=f(z)limzz0g(z)g(z0)zz0=f(z)g(z),

since g(z0)=0. In particular,

Resz01g=1g(z0).

Note that if g has a simple zero at z0, then by definition g(z0)0, so this is well-defined.

Applying this rule to f(z)=1z2+1 as above, we find

Resi1z2+1=12z|z=i=12i=i2,

just as above.

Let’s mention one more method that sometimes simplifies otherwise difficult calculations: if f and g both have a simple pole at z0, then we know that fg has a double pole at z0. Computing residues of double poles is harder in general than for simple poles. If we know the first few terms of the Laurent expansions, though, things simplify: if

f(z)=a1zz0+a0+,g(z)=b1zz0+b0+,

then

f(z)g(z)=a1b1(zz0)2+a1b0+a0b1zz0+a1b1+a1b1+a0b0+,

so fg has residue a1b0+a0b1 at f. Note that this doesn’t always require knowing the full Laurent expansion; for example, if you know the residues of f and g at z0 (e.g. by the methods above), then you can compute a0 and b0 by taking the limits as zz0 of f(z)a1zz0 and g(z)b1zz0 respectively.

An example where this method makes things easier is on the homework (though one can also always compute it in other ways). More generally, you should be on the lookout for different ways to manipulate series into giving you the residues.

We now turn to some simple examples of using the residue theorem. Let D be the disk of radius 5 centered at z0=0, and consider

D1sinz𝑑z.

We’ve seen that sinz has simple zeros at πn for every integer n, so 1sinz has simple poles at these points; the zeros in this region are 0, π, and π. What remains is to compute the residues at these points.

By the rule above, these are 1cos(0)=1, 1cos(π)=1, and 1cos(π)=1. Therefore by the residue theorem we have

D1sin(z)𝑑z=2πi(111)=2πi.

This is not an integral we could have computed by any of our previous methods!

There are many more examples of this type, sometimes involving more work to compute the residues; more examples appear on your homework. For now, let’s pivot to another type of integral, which has not come up too much so far in complex analysis: real integrals of real functions.

We’ve seen that the residue theorem is particularly easy to apply to meromorphic functions, of which the simplest are rational functions. Real integrals of rational functions however can be very difficult to compute, or require non-obvious tricks which we can now get around.

Let’s start with a simple example, with our standard example above: consider

1x2+1𝑑x=limNNN1x2+1𝑑x.

Of course, we can use the inverse tangent function to compute this integral; the answer should be limN+(tan1(N)tan1(N))=π2+π2=π. However, this requires knowing about inverse trigonometric functions, which aren’t obviously related to rational functions; moreover it’s not clear how to generalize this approach to other rational functions.

Let’s instead apply the residue theorem. How? To use the residue theorem, we need to have a domain D whose boundary coincides with the path along which we want to integrate. A path from N to N along the real axis is not closed, but we can view it as part of a semicircle of radius N centered at 0, so if D is the corresponding half-disk then its boundary is the union of the path from N to N along the real axis and the arc γ(t)=Neit for 0tπ. Then we can write

D1z2+1𝑑z=NN1x2+1𝑑x+γ1z2+1𝑑z.

On the left, we can compute this integral via the residue theorem: the only singularity enclosed by this path is at i, where we have computed the residue to be 12i, so the residue theorem tells us that the integral is 2πi12i=π. On the right, the first integral is what we want to evaluate; for the second, we can apply the ML bound. Since on this arc |z|=N, we have |1z2+1|1N2, while the path has length πN, so the integral is bounded in absolute value by πN. As N, the second integral therefore tends to 0, and so the first must tend to π.

More heuristically, we could view the real line as the boundary of the upper half-plane, and apply the residue theorem, since the only singularity in the upper half-plane is i. However, note that this region is not bounded, so this is only a heuristic and the residue theorem does not literally apply; we need to take the limit and show that the second term tends to zero.

This method of course obtains the same result as the one involving the inverse tangent. However, it generalizes much more directly. To compute the integral

P(x)Q(x)𝑑x=limNNNP(x)Q(x)𝑑x,

where P and Q are polynomials and, to ensure that the integral converges, degP+2degQ and Q has no zeros on the real line, then taking D to be the half-disk of radius N as above, by exactly the same argument the integral over its boundary is equal to the integral over a portion of the real line plus an integral over the arc, and in the limit the integral over the arc vanishes by the ML bound. Hence we can compute these real integrals by studying the residues of the integrands in the complex plane.

Variants of this method are common, and some appear on the homework. For example, we sometimes want to study integrals over the positive real numbers, rather than all reals; in this case we could take a quarter-circle and include an integral along the imaginary axis, or take a semicircle centered at N/2, depending on the integrand. We can study more general functions than rational functions, too; a common case is a combination of rational and trigonometric functions, by using eiz in place of sinz or cosz and then taking the imaginary or real parts at the end, respectively.