Skip to content

Complex Integration and Contour Integrals

In this lesson you’ll define the contour integral, learn to evaluate it by parametrisation, meet the ML inequality for bounding integrals you cannot compute, and see the one integral that the rest of the section is built on.

A contour is a piecewise smooth curve γ:[a,b]C\gamma:[a,b]\to\mathbb{C} with an orientation. The integral of ff along it is defined by pulling back to a real parameter:

γf(z)dz=abf(γ(t))γ(t)dt\int_\gamma f(z)\,dz = \int_a^b f\big(\gamma(t)\big)\,\gamma'(t)\,dt

The right-hand side is an ordinary integral of a complex-valued function of a real variable, which you handle by integrating real and imaginary parts separately. So the definition is not exotic - it is a line integral, exactly as in Calculus 3, with complex multiplication in place of a dot product.

The mechanical recipe is short and worth internalizing:

  1. Parametrise the contour as z=γ(t)z = \gamma(t).
  2. Compute dz=γ(t)dtdz = \gamma'(t)\,dt.
  3. Substitute into ff and multiply.
  4. Integrate over tt from aa to bb.

Basic properties, all immediate from the definition:

  • Linearity. γ(αf+βg)=αγf+βγg\int_\gamma (\alpha f+\beta g) = \alpha\int_\gamma f + \beta\int_\gamma g
  • Reversal. γf=γf\int_{-\gamma}f = -\int_\gamma f
  • Concatenation. Splitting a contour splits the integral.
  • Reparametrisation invariance. Only the curve and its orientation matter, not the choice of parameter.

Here is the central question of the lesson: does γfdz\int_\gamma f\,dz depend on the path, or only on the endpoints?

For a general continuous ff it depends on the path. But:

Fundamental theorem for contour integrals. If FF is analytic on a domain containing γ\gamma and F=fF' = f, then

γf(z)dz=F(γ(b))F(γ(a))\int_\gamma f(z)\,dz = F\big(\gamma(b)\big) - F\big(\gamma(a)\big)

So if the integrand has an antiderivative, only the endpoints matter and the integral around any closed contour is 0.

That explains both halves of the figure. The integrand zz has antiderivative z2/2z^2/2, so both routes to 1+i1+i give the same answer (1+i)22=i\frac{(1+i)^2}{2} = i. The integrand zˉ\bar z is analytic nowhere, has no antiderivative, and duly gives different answers on the two routes.

Cauchy’s theorem, next lesson, is the statement that analytic functions on a simply connected domain always have this property. This lesson is the groundwork for it.

Compute Cdzz\oint_C \frac{dz}{z} where CC is the unit circle traversed counterclockwise. Parametrise z=eitz = e^{it} for t[0,2π]t\in[0,2\pi], so dz=ieitdtdz = ie^{it}dt:

Cdzz=02πieiteitdt=02πidt=2πi\oint_C\frac{dz}{z} = \int_0^{2\pi}\frac{ie^{it}}{e^{it}}\,dt = \int_0^{2\pi} i\,dt = 2\pi i   z=1dzz=2πi  \boxed{\;\oint_{|z|=1}\frac{dz}{z} = 2\pi i\;}

Not zero. This is the most important computation in the subject, and the reason is instructive: 1/z1/z is analytic on the punctured plane, but the punctured plane is not simply connected, and 1/z1/z has no single-valued antiderivative there. Its natural antiderivative is logz\log z, which gains 2πi2\pi i each time you loop the origin - exactly the branch-cut behaviour from last lesson.

Every 2πi2\pi i you will meet for the rest of the section traces back to this one integral.

By contrast Czndz=0\oint_C z^n\,dz = 0 for every integer n1n \ne -1, because zn+1/(n+1)z^{n+1}/(n+1) is then a genuine single-valued antiderivative on a neighbourhood of the circle. The exponent 1-1 is the unique exception, which is why residues are about the coefficient of 1zz0\frac{1}{z-z_0} and nothing else.

Often you need to show an integral is small without evaluating it. The tool is:

If f(z)M|f(z)|\le M for all zz on γ\gamma, and γ\gamma has length LL, then

γf(z)dzML\left|\int_\gamma f(z)\,dz\right| \le ML

Sometimes called the estimation lemma. It is the workhorse for showing that a large semicircular arc contributes nothing in the limit, which is the step that makes real integrals computable by contour methods later.

For a circle of radius RR the length is 2πR2\pi R, so the bound is 2πRM2\pi R M. If f|f| decays faster than 1/R1/R, the contribution vanishes as RR\to\infty.

Example 1: Evaluate γzdz\int_\gamma z\,dz along the straight line from 0 to 1+i1+i.

Solution. Parametrise γ(t)=t(1+i)\gamma(t) = t(1+i) for t[0,1]t\in[0,1], so γ(t)=1+i\gamma'(t) = 1+i:

01t(1+i)(1+i)dt=(1+i)201tdt=(1+i)22=2i2=i\int_0^1 t(1+i)\cdot(1+i)\,dt = (1+i)^2\int_0^1 t\,dt = \frac{(1+i)^2}{2} = \frac{2i}{2} = i

Or immediately: zz has antiderivative z2/2z^2/2, so the answer is (1+i)220=i\frac{(1+i)^2}{2} - 0 = i. When an antiderivative exists, use it.

Example 2: Same integrand, the L-shaped path.

Solution. First leg along the real axis, γ1(t)=t\gamma_1(t)=t for t[0,1]t\in[0,1]:

01tdt=12\int_0^1 t\,dt = \frac12

Second leg upward, γ2(t)=1+it\gamma_2(t) = 1+it for t[0,1]t\in[0,1], with dz=idtdz = i\,dt:

01(1+it)idt=i01(1+it)dt=i(1+i2)=i12\int_0^1 (1+it)\,i\,dt = i\int_0^1(1+it)\,dt = i\left(1+\frac i2\right) = i - \frac12

Total: 12+i12=i\frac12 + i - \frac12 = i. ✓ Same as Example 1, as the antiderivative guaranteed.

Example 3: γzˉdz\int_\gamma \bar z\,dz on both paths.

Solution. Straight line, γ(t)=t(1+i)\gamma(t)=t(1+i), γˉ(t)=t(1i)\bar\gamma(t) = t(1-i):

01t(1i)(1+i)dt=(1i)(1+i)12=22=1\int_0^1 t(1-i)(1+i)\,dt = (1-i)(1+i)\cdot\frac12 = \frac{2}{2} = 1

L-shaped path. First leg: 01tdt=12\int_0^1 t\,dt = \frac12. Second leg, z=1+itz = 1+it so zˉ=1it\bar z = 1-it:

01(1it)idt=i(1i2)=i+12\int_0^1(1-it)i\,dt = i\left(1-\frac i2\right) = i+\frac12

Total: 12+i+12=1+i\frac12 + i + \frac12 = 1+i.

11+i1 \ne 1+i

Path dependent. ∎ And necessarily so: zˉ\bar z is nowhere analytic, so it has no antiderivative.

Example 4: Evaluate dzz\oint \frac{dz}{z} on the circle z=3|z|=3.

Solution. Parametrise z=3eitz = 3e^{it}, dz=3ieitdtdz = 3ie^{it}dt:

02π3ieit3eitdt=02πidt=2πi\int_0^{2\pi}\frac{3ie^{it}}{3e^{it}}\,dt = \int_0^{2\pi}i\,dt = 2\pi i

The radius cancelled. Any counterclockwise circle around the origin gives 2πi2\pi i, and later we will see any counterclockwise closed contour enclosing the origin once does too.

Example 5: Evaluate z=1z2dz\oint_{|z|=1} z^2\,dz.

Solution. z2z^2 is entire with antiderivative z3/3z^3/3, so around a closed contour the integral is 0.

Checking directly with z=eitz=e^{it}:

02πe2itieitdt=i02πe3itdt=i[e3it3i]02π=0\int_0^{2\pi}e^{2it}\cdot ie^{it}\,dt = i\int_0^{2\pi}e^{3it}\,dt = i\left[\frac{e^{3it}}{3i}\right]_0^{2\pi} = 0

Example 6: Use the ML inequality.

Show that CRdzz2+10\displaystyle\left|\int_{C_R}\frac{dz}{z^2+1}\right| \to 0 as RR\to\infty, where CRC_R is the semicircle z=R|z|=R in the upper half plane.

Solution. On the contour, z=R|z| = R, so by the reverse triangle inequality

z2+1z21=R211z2+11R21=M|z^2+1| \ge |z|^2-1 = R^2-1 \quad\Longrightarrow\quad \left|\frac{1}{z^2+1}\right| \le \frac{1}{R^2-1} = M

The semicircle has length L=πRL = \pi R. So

CRdzz2+1πRR210\left|\int_{C_R}\frac{dz}{z^2+1}\right| \le \frac{\pi R}{R^2-1} \to 0

This is the standard closing argument. It is exactly the step that lets a real integral over (,)(-\infty,\infty) be replaced by a closed contour, which is how residues evaluate real integrals.

Example 7: An integral that is not zero despite an analytic integrand.

Explain why z=1dzz=2πi\oint_{|z|=1}\frac{dz}{z} = 2\pi i does not contradict the fundamental theorem.

Solution. The integrand is analytic on C{0}\mathbb{C}\setminus\{0\}, so it is analytic at every point of the contour. But the theorem needs an antiderivative on a domain containing the contour, and 1/z1/z has none on any annulus around 0: its antiderivative logz\log z is multi-valued there, gaining 2πi2\pi i per loop.

no single-valued antiderivative    no vanishing\text{no single-valued antiderivative} \implies \text{no vanishing}

The obstruction is topological, not analytic. The punctured plane has a hole, and that hole is the entire source of the residue calculus.

Circulation and flux. For a fluid flow with complex potential Φ\Phi, the contour integral Φ(z)dz\oint \Phi'(z)\,dz has real part the circulation and imaginary part the flux through the curve. The Kutta–Joukowski lift formula is a contour integral of exactly this kind.

Ampère’s law. Computing the magnetic field around a wire is a closed line integral, and the two-dimensional case is literally dzz\oint \frac{dz}{z} with the current at the origin. The nonzero answer is the physical statement that the field circulates.

Inverse Laplace transforms. Recovering a time-domain signal from its transform is a contour integral, the Bromwich integral, evaluated by residues. Every step response computed symbolically goes through this.

Winding numbers in robotics and vision. Counting how many times a path loops a point is 12πidzzz0\frac{1}{2\pi i}\oint\frac{dz}{z-z_0}, and it is used for point-in-polygon tests and for topological path planning.

Numerical differentiation. Cauchy’s integral formula turns derivatives into contour integrals, and evaluating those integrals with the trapezoid rule on a circle gives derivative estimates that are far more accurate than finite differences.

Phase unwrapping. In interferometry and synthetic-aperture radar, accumulated phase around a loop is a contour integral whose nonzero value signals a defect or a residue in the data. The terminology is borrowed directly from this subject.

How is a contour integral evaluated in practice?
What is ∮ dz/z around the unit circle traversed counterclockwise?
Why is ∮ dz/z nonzero even though 1/z is analytic on the contour?
For which integer n is ∮_{|z|=1} zⁿ dz nonzero?
When does a contour integral depend only on the endpoints?
What does the ML inequality state?
Why is ∫ z̄ dz path dependent?
What happens to ∫_γ f dz when the orientation of γ is reversed?