Contour Integration

On the real line, the definite integral adds up a function along an interval. In the complex plane there is no single "interval" between two points — there are infinitely many paths. So a complex integral is taken along a chosen curve \gamma, called a contour, and is written

\int_\gamma f(z)\,dz.

Everything in complex analysis — Cauchy's theorem, the integral formula, residues — is built on this one idea. Let us define it precisely and then compute the single integral the whole subject turns on.

Defining the contour integral

Describe the contour by a parametrisation z(t) for t \in [a, b]: as t runs from a to b, the point z(t) traces out the curve. Then

\int_\gamma f(z)\,dz = \int_a^b f\bigl(z(t)\bigr)\,z'(t)\,dt.

The factor z'(t)\,dt is just dz expressed in the parameter — the chain rule, made into a recipe. The right-hand side is an ordinary integral of a complex-valued function of the real variable t, which we evaluate by integrating its real and imaginary parts separately.

A worked example: integrating over a circle

Let \gamma be the circle of radius R centred at the origin, traced once anticlockwise. The natural parametrisation is

z(t) = R\,e^{it}, \qquad t \in [0, 2\pi].

Step 1 — find dz. Differentiate the parametrisation:

z'(t) = iR\,e^{it}, \qquad\text{so}\qquad dz = iR\,e^{it}\,dt.

Step 2 — substitute. For a concrete f we feed z(t) into f and multiply by dz. This circle, with its tidy e^{it} form, is exactly the contour we now use to crack the most important integral in the theory.

The cornerstone: \oint z^n\,dz around the unit circle

Take the unit circle, z(t) = e^{it} on [0, 2\pi], so dz = i\,e^{it}\,dt, and integrate the power f(z) = z^n for an integer n. (The closed-loop symbol \oint just marks that \gamma is a closed contour.)

Step 1 — substitute. Since z^n = e^{int}:

\oint_{|z|=1} z^n\,dz = \int_0^{2\pi} e^{int}\,\bigl(i\,e^{it}\bigr)\,dt = i\int_0^{2\pi} e^{i(n+1)t}\,dt.

Step 2 — the case n \ne -1. Then n + 1 \ne 0, and we are integrating a complex exponential over a full period. Its antiderivative is \frac{e^{i(n+1)t}}{i(n+1)}, and e^{i(n+1)t} returns to its start after one full turn:

i\int_0^{2\pi} e^{i(n+1)t}\,dt = i\left[\frac{e^{i(n+1)t}}{i(n+1)}\right]_0^{2\pi} = \frac{e^{i(n+1)2\pi} - 1}{n+1} = \frac{1 - 1}{n+1} = 0.

Step 3 — the case n = -1. Now n + 1 = 0, so the exponent vanishes and the integrand is just the constant i:

i\int_0^{2\pi} e^{0}\,dt = i\int_0^{2\pi} 1\,dt = i\,(2\pi) = 2\pi i.

So a single power behaves in two utterly different ways: every power except z^{-1} integrates to zero around the loop, while 1/z alone leaves behind 2\pi i.

Integrating z^n once anticlockwise around the unit circle gives:

The number 2\pi i is not an accident of this particular circle. As we will see, deforming the contour does not change a contour integral of a holomorphic function, and 1/z is holomorphic everywhere except at the origin. What survives is a record of how many times — and which way — the path winds around that one bad point. The single term z^{-1} is the detector for it, and 2\pi i is the signal it returns. The entire theory of residues grows out of this one computation.

Watch a point trace the contour

Turn the t slider and the radius R: the point z(t) = R\,e^{it} rides around the circle, and the arrow shows dz = z'(t)\,dt = iR\,e^{it}\,dt, the tangent direction of travel — always a quarter-turn ahead of the radius. That tangent is what dz measures.