Contour integration

Cauchy’s Residue Theorem, Closed contours, residues, Jordan’s lemma.

Contour ingtegration turns hard real-line integrals into easy bookkeeping. The trick: extend the integrand into the complex plane, close the contour, count poles. The integral is 2πi2\pi i times the sum of residues inside.


Let ff be analytic except at poles zkz_k. Then the integral of ff along the closed countour CC is

Cdzf(z)=2πienclosedpoles zknC(zk)Res(f,zk)\oint_C dz\, f(z) = 2 \pi i \sum_{\substack{\text{enclosed}\\ \text{poles }z_k}}n_C(z_k) \operatorname{Res}(f,z_k)

where nC(z)n_C(z) is the winding number of CC at zz, and Res(f,z)\operatorname{Res}(f,z) is the residue of ff at zzThis relation often goes by the name Cauchy Residue Theorem, and is one of the core workhorses of complex analysis..

The winding number at a point is a property of the contour alone, and is just the number of times the contour winds around the point counterclockwise (CCW) minus the number of times clockwise (CW)The winding number of the depicted path around the right point is 3=1+1+13=1+1+1 because it is traverses 3×3\timesCCW, while around the left point it is 0=1+10=-1+1 because it is traverses once each CW and CCW. Typically such contours are not needed, however they are sometimes relevant (e.g. the Pochhammer contour) . . The residue is a property of the integrand alone, to be taken up in another section.

There is a surprising amount we can say even before we get to the definition of residues, or any methods for calculating them.


Example 1

I1I_1 is the contour integral of f1(z)=1/(za)(za1)f_1(z)=1/(z-a)(z-a^{-1}) along the unit circle. The poles are at at aa and a1a^{-1}. WLOG assume a<1|a|<1 and a1>1|a^{-1}|>1, so that there is one enclosed pole at z=az=a.The unit circle contour and poles (aa inside the contour and a1a^{-1} outside).ReIm0C Then, by the residue theorem, I1=2πiRes(f1,a)I_1 = 2\pi i \operatorname{Res}(f_1,a).

This is a little trivial as written, but less obviously so when parameterized z=eiθz=e^{i\theta}:

I1=Cd(eiθ)1(eiθa)(eiθa1)=i02πdθeiθe2iθ+1eiθ(a+a1)=i02πdθ2cosθ(a+a1)\begin{align*} I_1 &= \oint_Cd(e^{i\theta})\,\frac{1}{(e^{i\theta}-a)(e^{i\theta}-a^{-1})} \\ &= i\int_0^{2\pi}d\theta\,\frac{e^{i\theta}}{e^{2i\theta} + 1 - e^{i\theta}(a+a^{-1})} \\ &= i\int_0^{2\pi}\,\frac{d\theta}{2\cos\theta - (a+a^{-1})} \end{align*}

Hence, a simple result for a not-so-simple family of integralsAmazingly, we have effectively evaluated integrals of the form 02πdθ/(x+cosθ)\int_0^{2\pi}d\theta/(x+\cos\theta) for a large domain of xx without ever resorting to any of the standard tricks integration by parts or obscure trig identities! parameterized by a<1|a|<1:

02πdθ2cosθ(a+a1)=2πRes(f1,a).\int_0^{2\pi}\frac{d\theta}{2\cos\theta - (a+a^{-1})} = 2\pi \operatorname{Res}(f_1,a).

In that example we evaluated a contour integral and found a expression (in terms of residues) for a different ordinary integral over a real parameter.

Usually the process works in reverse:

  1. Start with an ordinary integral over real variables that you would like to evaluate.
  2. Identify a contour integral that, when expressed with real parameters, is related to the one you want to evaluate.
  3. Identify which poles lie inside the countour, and their winding numbers (+’ve for CCW, -’ve for CW).
  4. Apply the Cauchy formula.
  5. Evaluate the residues at the poles.Deferred.

The next example illustrates this.


Example 2

I2=dx/(1+x2)I_2 = \int_{-\infty}^\infty dx/(1+x^2). Promote the integrand to be a function of a complex variable, f2(z)=1/(1+z2)f_2(z)=1/(1+z^2), with poles at ±i\pm i, and recognize the real axis as but part of a larger closed contour. We have some freedom in determining how to close the contour. If we close the contour with a semicircular arc parameterized as ReiθRe^{i\theta} (for asymptotically large RR) in, say, the upper half-plane, then we have the additional integral contribution

limRd(Reiθ)1+R2e2iθlimR1R=0;\lim_{R\to\infty} \int_\frown \frac{d(Re^{i\theta})}{1+R^2e^{2i\theta}} \sim \lim_{R \to \infty}\frac{1}{R}=0;

closing the contour contributes nothing. This example illustrates the basic idea behind the estimation lemma and Jordan’s lemma, both of which involve bounding the contribution of the additional contour integral by an amount that vanishes as the radius RR gets large. Generally, so long as f|f| decays rapidly enough with RR, then the additional contribution vanishes, and the real-line integral equals the closed-contour integral. There is a single enclosed pole, with winding number +1+1 (CCW). According to the Cauchy formula:

dx1+x2=2πiRes(f=11+z2,z=i).\int_{-\infty}^{\infty}\frac{dx}{1+x^2} = 2\pi i \operatorname{Res}\left(f=\frac{1}{1+z^2}, z=i\right).

Avail yourself of certain properties of the integrand to greatly simplify calculations. For example, the parity (i.e. evenness or oddness) of a function, or being the real or imaginary part of another function, as in the following example.


Example 3

I3=0dxsinx/xI_3=\int_0^\infty dx\,\sin x/x. The integrand is even, so 012\int_0^{\infty}\to\frac{1}{2} \int_{-\infty}^\infty. The integrand f3f_3 is also the imaginary part of an exponential f3=sinx/x=Imeix/xf_3=\sin x/x = \operatorname{Im} e^{ix}/x. Combining these properties

I3=12Imdxeixx.I_3=\frac{1}{2}\operatorname{Im}\int_{-\infty}^{\infty}dx\,\frac{e^{ix}}{x}.

The task now is to relate this real-line integral to a closed-contour integral, as in Example 2. As in that example, we close the contour with a semicircular arc of radius RR\to\infty. The question is whether to close in the upper or lower half-plane? The answer is to close in the half-plan where the contribution is easy to calculate (ideally by vanishing). Along the arc contour z=Rexp(iθ)z=R\exp(i\theta), and the additional integral is

arcd(Reiθ)eiRexpiθReiθ=iarcdθeiRexpiθ=iarceiRcosθeRsinθ.\begin{align*} \int_\text{arc} d(Re^{i\theta})\,\frac{e^{iR\exp{i\theta}}}{Re^{i\theta}} &= i\int_\text{arc} d\theta\,e^{iR\exp{i\theta}} \\ &= i\int_\text{arc} e^{iR\cos\theta} e^{-R\sin\theta}. \end{align*}

So long as sinθ\sin\theta remains positive (which it is everywhere in the upper half plane), then the exponential suppression as RR\to\infty will make the integral vanish. Thefore we close in the upper half-plane.


Sometimes it is not necesary to calculate residues at all (as in the previous example). Other times, only the residues need evaluation, and the related contour integral is but a stepping stone, as in the next example.


Example 4

Consider n=g(n)\sum_{n=-\infty}^\infty g(n), where g(z)g(z) has no real poles.

Also consider f(z)=cot(πz)g(z)f(z)=\cot(\pi z)g(z).

Branch points: the keyhole contour

Functions like logz\log z and zaz^a for non-integer aa have branch points rather than poles. The contour must dodge the branch point and run along both sides of the branch cut. The standard construction is the keyhole: a large outer circle, a small inner circle around the branch point, and two parallel slits along the cut.

ReIm0Ccut
iii.Keyhole contour around a branch point at the origin. Outer radius R, inner radius ε; the slit lies along the positive real axis.

The integrand picks up a phase across the cut (e.g. e2πiae^{2\pi i a} for zaz^a), and the inner circle’s contribution vanishes as ε0\varepsilon \to 0 when the integrand is integrable near the branch point.

Recipe

For most one-dimensional integrals reducible to a closed contour:

  1. Extend the integrand to a function of zCz \in \mathbb{C}.
  2. Identify singularities (poles, branch points).
  3. Choose a closed contour that (a) includes the original real-line piece and (b) lets the closing arc vanish.
  4. Compute residues at enclosed poles.
  5. Equate the original integral to 2πiRes2\pi i \sum \mathrm{Res} minus any non-vanishing arc contributions.

The choice of contour is the only creative step. The rest is mechanical.