Complex Integration and Contour Integrals

On the real line there is only one road from aa to bb, so a definite integral is a number attached to two endpoints. In the complex plane there are infinitely many roads between any two points, and the value of ∫Cf(z) dz\int_C f(z)\,\mathrm{d}z is in general a property of the whole road CC, not merely of where it starts and stops. This single fact is the hinge on which all of complex analysis turns. The extraordinary theorem waiting one article downstream — that for an analytic function the road does not matter and every loop gives zero — only becomes surprising, and only becomes provable, once we have built the honest machine that lets the road matter in the first place. That machine is the contour integral. The machine has three moving parts. First, parametrization: write the curve as z(t)=x(t)+iy(t)z(t)=x(t)+iy(t), replace dz\mathrm{d}z by z′(t) dtz'(t)\,\mathrm{d}t, and a contour integral collapses to an ordinary integral of a complex function of the real parameter tt. Second, the ML inequality ∣∫Cf dz∣≤ML|\int_C f\,\mathrm{d}z|\le ML, an estimate so elementary it looks trivial and so powerful it is the device that makes giant arcs vanish and closes contours around the world's real integrals. Third, the benchmark ∮∣z−z0∣=r(z−z0)n dz=2πi δn,−1\oint_{|z-z_0|=r}(z-z_0)^n\,\mathrm{d}z = 2\pi i\,\delta_{n,-1}: a one-line computation that quietly decides the subject, because among all integer powers only 1/(z−z0)1/(z-z_0) survives a loop, and everything the residue calculus later does is an echo of that lone surviving term.

Key takeaways
  • A contour integral ∫Cf(z) dz\int_C f(z)\,\mathrm{d}z is a line integral of a complex function along an oriented curve CC, defined as a limit of Riemann sums ∑f(ζk) Δzk\sum f(\zeta_k)\,\Delta z_k of complex arrows added tip-to-tail.
  • To compute one, parametrize the path by z(t)z(t), t∈[a,b]t\in[a,b], and reduce it to a real integral: ∫Cf dz=∫abf(z(t)) z′(t) dt\int_C f\,\mathrm{d}z=\int_a^b f(z(t))\,z'(t)\,\mathrm{d}t.
  • Splitting f=u+ivf=u+iv and dz=dx+i dy\mathrm{d}z=\mathrm{d}x+i\,\mathrm{d}y shows every complex integral is a pair of real line integrals coupled by ii — the doorway to Green's theorem.
  • The ML inequality ∣∫Cf dz∣≤ML\left|\int_C f\,\mathrm{d}z\right|\le ML (with M=max⁡C∣f∣M=\max_C|f|, L=L= arc length) is the workhorse that kills large closing arcs and controls small circles around singularities.
  • The benchmark ∮∣z−z0∣=r(z−z0)n dz=2πi δn,−1\oint_{|z-z_0|=r}(z-z_0)^n\,\mathrm{d}z = 2\pi i\,\delta_{n,-1} gives 2πi2\pi i for n=−1n=-1 and 00 for every other integer — the seed of Cauchy's theorem and of every residue.
  • Key idea: a contour integral is a line integral in the plane — parametrize as z(t)z(t), replace dz\mathrm{d}z by z′(t) dtz'(t)\,\mathrm{d}t, integrate — and the single benchmark ∮(z−z0)n dz=2πi δn,−1\oint(z-z_0)^n\,\mathrm{d}z=2\pi i\,\delta_{n,-1} is why 1/z1/z is special and why residues exist.
The core insight

A contour integral is a line integral in the complex plane: parametrize the path as z(t)z(t), replace dz\mathrm{d}z by z′(t) dtz'(t)\,\mathrm{d}t, and integrate the resulting function of the real variable tt. The lone benchmark ∮∣z−z0∣=r(z−z0)n dz=2πi δn,−1\oint_{|z-z_0|=r}(z-z_0)^n\,\mathrm{d}z=2\pi i\,\delta_{n,-1} encodes why the 1/z1/z term is the only one that survives a loop, and it underlies the entire residue calculus.

Where this lives today

Contour integration long ago left the mathematics department and became a standard instrument on the physicist's bench. In quantum field theory and many-body physics, propagators are integrals in the complex energy plane, and the iϵi\epsilon prescription — which tells you which side of a pole to pass on — is a statement about deforming a contour so that causality comes out right, the same choice that distinguishes retarded from advanced Green's functions. The Matsubara formalism trades a sum over imaginary frequencies for a contour integral, and Kramers–Kronig relations (a direct consequence of closing a contour where the integrand is analytic) let experimenters reconstruct the real part of a response function from its measured imaginary part. Signal processing inverts Laplace and zz-transforms by Bromwich contours; control theory reads stability off the winding number of a Nyquist contour; and the saddle-point methods behind semiclassical physics are contour deformations through a sharply peaked saddle. Even numerical analysis has come home to it: modern algorithms count eigenvalues inside a region by integrating the resolvent around a contour — the benchmark 2πi2\pi i, evaluated on a computer.

The physical picture

Think of dz=z′(t) dt\mathrm{d}z=z'(t)\,\mathrm{d}t as a tiny arrow laid tangent to the path, its length the speed of traversal and its direction the heading. The integrand f(z)f(z) acts on it the way a complex number always acts — rotating it by arg⁡f\arg f and rescaling it by ∣f∣|f| — producing a new arrow f(z) dzf(z)\,\mathrm{d}z. The contour integral is just the sum of all these rotated, rescaled arrows laid tip-to-tail, and the answer is the single arrow from the first tail to the last tip. When the arrows curl back and close up, the sum is zero; when they reinforce around a loop, it records a net turning. The first figure freezes this: the raw chords Δzk\Delta z_k of the path, and what ff does to them.

Figure
A contour integral as a sum of complex arrows: the path C is chopped into chords Δz_k = z_k − z_{k−1}, the integrand rotates and scales each into f(ζ_k)Δz_k, and the Riemann sum Σ f(ζ_k)Δz_k adds them tip-to-tail toward the limit ∫_C f dz as the mesh shrinks
∫_C f dz = lim Σ f(ζ_k) Δz_k — complex arrows added tip-to-tail along the path Re z Im z C z₀ z₁ Δz_k = z_k − z_{k−1} f(ζ_k) Δz_k (rotated by arg f, scaled by |f|) ζ_k

The engine of the whole subject is one specific loop. Ride once counterclockwise around a circle ∣z−z0∣=r|z-z_0|=r and integrate the pure power (z−z0)n(z-z_0)^n. Writing z=z0+reiθz=z_0+re^{i\theta} makes the integrand irn+1ei(n+1)θir^{n+1}e^{i(n+1)\theta}. For every integer nn except −1-1 the phasor ei(n+1)θe^{i(n+1)\theta} spins a whole number of turns and averages to nothing; only n=−1n=-1 collapses the exponent to zero, leaving a constant i dθi\,\mathrm{d}\theta that accumulates to exactly 2πi2\pi i. That number — 2πi≈6.283 i2\pi i\approx 6.283\,i, independent of rr — is the second figure, and it is why 1/z1/z is the pivot of complex analysis: it is the one power whose antiderivative log⁡z\log z refuses to be single-valued around the origin.

Figure
The benchmark loop: on the circle of radius r about z₀ with z = z₀ + r e^{iθ} the field 1/(z−z₀) circulates, dz/(z−z₀) = i dθ, and one full counterclockwise turn accumulates ∮ dz/(z−z₀) = 2πi ≈ 6.283 i — independent of r, while every other integer power averages to 0
∮ dz/(z − z₀) = 2πi ≈ 6.283 i — the one loop that does not vanish z₀ dz = i r e^{iθ} dθ r θ On the circle: z = z₀ + r e^{iθ} dz/(z−z₀) = i dθ n = −1 → 2πi n ≠ −1 → 0 (answer is independent of r)

The ML inequality is geometry, not sorcery: the summed arrow is no longer than the largest ∣f∣|f| times the distance LL walked. On a huge arc where ∣f∣|f| shrinks faster than 1/L1/L, the product MLML is squeezed to zero and the arc contributes nothing — the standard trick for closing a path in the upper half-plane. And path independence is exactly the question of whether a single-valued antiderivative exists: where one does, every loop vanishes; where the integrand winds, like 1/z1/z about 00, no global antiderivative exists and a loop registers a nonzero topological count.

The core equations

The starting definition mirrors the real Riemann integral, but the increments Δzk=zk−zk−1\Delta z_k=z_k-z_{k-1} are now complex displacements in the plane rather than positive widths on a line. The sum of ff sampled on each subarc, weighted by these complex steps, converges for any continuous ff on a piecewise-smooth curve.

∫Cf(z) dz=lim⁡n→∞∑k=1nf(ζk) (zk−zk−1)(1)\int_C f(z)\,\mathrm{d}z=\lim_{n\to\infty}\sum_{k=1}^{n} f(\zeta_k)\,(z_k-z_{k-1}) \qquad (1)

where: CC — oriented, piecewise-smooth contour from z0z_0 to znz_n; zkz_k — partition points along CC; ζk\zeta_k — sample point on the kk-th subarc; ff — continuous on CC. Reading: add complex arrows f(ζk) Δzkf(\zeta_k)\,\Delta z_k tip-to-tail and refine the mesh. To actually compute, one never returns to the sum. Parametrizing the curve by a real variable turns the definition into an ordinary integral, because the chord Δzk\Delta z_k is well approximated by the tangent z′(tk) Δtkz'(t_k)\,\Delta t_k.

∫Cf(z) dz=∫abf(z(t)) z′(t) dt(2)\int_C f(z)\,\mathrm{d}z=\int_a^b f\big(z(t)\big)\,z'(t)\,\mathrm{d}t \qquad (2)

where: z(t)z(t) — parametrization of CC, t∈[a,b]t\in[a,b]; z′(t)z'(t) — the tangent direction times speed. Reading: substitute the path, replace dz\mathrm{d}z by z′(t) dtz'(t)\,\mathrm{d}t, and integrate a complex function of a real variable. Separating f=u+ivf=u+iv from dz=dx+i dy\mathrm{d}z=\mathrm{d}x+i\,\mathrm{d}y exposes the hidden structure: one complex integral is secretly two real line integrals, locked together by ii. This is the bridge to Green's theorem and therefore to Cauchy's theorem.

∫Cf dz=∫C(u dx−v dy)+i∫C(v dx+u dy)(3)\int_C f\,\mathrm{d}z=\int_C (u\,\mathrm{d}x-v\,\mathrm{d}y)+i\int_C (v\,\mathrm{d}x+u\,\mathrm{d}y) \qquad (3)

where: u=Re fu=\mathrm{Re}\,f, v=Im fv=\mathrm{Im}\,f; dx,dy\mathrm{d}x,\mathrm{d}y — real and imaginary parts of dz\mathrm{d}z. Reading: the real part carries the combination u dx−v dyu\,\mathrm{d}x-v\,\mathrm{d}y, the imaginary part carries v dx+u dyv\,\mathrm{d}x+u\,\mathrm{d}y. The most-used estimate in the whole subject bounds the size of an integral by the size of its integrand times the length of the road. It follows from the triangle inequality for integrals and is exact only for a constant integrand aligned with the path.

∣∫Cf(z) dz∣≤M L,M=max⁡z∈C∣f(z)∣,L=∫C∣dz∣(4)\left|\int_C f(z)\,\mathrm{d}z\right|\le M\,L,\qquad M=\max_{z\in C}|f(z)|,\quad L=\int_C |\mathrm{d}z| \qquad (4)

where: MM — supremum of ∣f∣|f| on the contour; LL — arc length of CC. Reading: a contour integral can never exceed the worst-case integrand times the distance travelled — the lever for vanishing-arc arguments. The arc length itself is the ordinary speed integral of the parametrization, needed whenever the LL in the ML bound must be made explicit.

L=∫ab∣z′(t)∣ dt=∫abx′(t)2+y′(t)2 dt(5)L=\int_a^b |z'(t)|\,\mathrm{d}t=\int_a^b\sqrt{x'(t)^2+y'(t)^2}\,\mathrm{d}t \qquad (5)

where: x′(t),y′(t)x'(t),y'(t) — derivatives of the coordinate functions. Reading: integrate the speed ∣z′(t)∣|z'(t)| over the parameter interval. The benchmark is the load-bearing computation of the article. For a circle centered on the singularity, every integer power integrates to zero except the inverse-first power, which returns 2πi2\pi i regardless of the radius.

∮∣z−z0∣=r(z−z0)n dz=2πi δn,−1,n∈Z(6)\oint_{|z-z_0|=r}(z-z_0)^{n}\,\mathrm{d}z=2\pi i\,\delta_{n,-1},\qquad n\in\mathbb{Z} \qquad (6)

where: z0z_0 — center of the circle; rr — radius (the answer does not depend on it); δn,−1\delta_{n,-1} — Kronecker delta, 11 if n=−1n=-1 else 00. Reading: only the 1/(z−z0)1/(z-z_0) term survives a loop; this is the residue in embryo. When a single-valued antiderivative exists on a domain containing the path, the contour integral forgets the path entirely and depends only on the endpoints — the complex fundamental theorem of calculus.

∫Cf dz=F(z1)−F(z0)if F′(z)=f(z) on a domain Ω⊃C(7)\int_C f\,\mathrm{d}z=F(z_1)-F(z_0)\quad\text{if}\ F'(z)=f(z)\ \text{on a domain}\ \Omega\supset C \qquad (7)

where: FF — single-valued analytic antiderivative of ff on Ω\Omega; z0,z1z_0,z_1 — start and end of CC. Reading: an antiderivative makes loops vanish and paths interchangeable — the failure of this for 1/z1/z is exactly the benchmark's 2πi2\pi i. Finally, contours obey the same bookkeeping as real integrals under concatenation and reversal, which is what lets closed contours be built from arcs and segments.

∫C1+C2f dz=∫C1f dz+∫C2f dz,∫−Cf dz=−∫Cf dz(8)\int_{C_1+C_2} f\,\mathrm{d}z=\int_{C_1}f\,\mathrm{d}z+\int_{C_2}f\,\mathrm{d}z,\qquad \int_{-C}f\,\mathrm{d}z=-\int_{C}f\,\mathrm{d}z \qquad (8)

where: C1+C2C_1+C_2 — concatenation (end of C1C_1 = start of C2C_2); −C-C — the same curve reversed. Reading: paths add, and reversing orientation flips the sign.

Derivation AThe benchmark integral of a power over a circle

The goal is to compute ∮∣z−z0∣=r(z−z0)n dz\oint_{|z-z_0|=r}(z-z_0)^n\,\mathrm{d}z for every integer nn and to see, in one clean stroke, why n=−1n=-1 is the unique power giving a nonzero answer. This is the most consequential calculation in the article: the 2πi2\pi i it produces for the inverse power is the raw material out of which Cauchy's integral formula and every residue are later assembled, while the vanishing of all other powers is what makes analytic functions integrate to zero around loops. We parametrize the circle and reduce everything to one elementary trigonometric integral.

Step 1. Parametrize the counterclockwise circle by z=z0+reiθz=z_0+re^{i\theta} with θ:0→2π\theta:0\to 2\pi, so that dz=ireiθ dθ\mathrm{d}z=ire^{i\theta}\,\mathrm{d}\theta and (z−z0)n=rneinθ(z-z_0)^n=r^n e^{in\theta}. Why: a circle centered on the singularity is the one contour on which the awkward factor (z−z0)(z-z_0) becomes a pure phase of constant modulus, so every power turns into a clean exponential in θ\theta.

Step 2. Substitute and collect the constants: ∮(z−z0)n dz=∫02πrneinθ⋅ireiθ dθ=irn+1∫02πei(n+1)θ dθ\oint (z-z_0)^n\,\mathrm{d}z=\int_0^{2\pi} r^n e^{in\theta}\cdot ire^{i\theta}\,\mathrm{d}\theta=ir^{n+1}\int_0^{2\pi} e^{i(n+1)\theta}\,\mathrm{d}\theta. Why: pulling out irn+1ir^{n+1} isolates the only thing that decides the answer — the exponent n+1n+1 on the surviving phasor.

Step 3. For n≠−1n\ne-1 the exponent n+1n+1 is a nonzero integer, so ∫02πei(n+1)θ dθ=[ei(n+1)θi(n+1)]02π=0\int_0^{2\pi} e^{i(n+1)\theta}\,\mathrm{d}\theta=\left[\dfrac{e^{i(n+1)\theta}}{i(n+1)}\right]_0^{2\pi}=0, since ei(n+1)2π=1e^{i(n+1)2\pi}=1 makes the bracket close on itself. Why: a phasor that completes a whole number of turns returns to its start and has zero average — geometrically the arrows curl into a closed polygon that encloses no net displacement.

Step 4. For n=−1n=-1 the exponent collapses, ei(0)θ=1e^{i(0)\theta}=1, and ir0∫02πdθ=i⋅2π=2πiir^{0}\int_0^{2\pi}\mathrm{d}\theta=i\cdot 2\pi=2\pi i, with no trace of rr. Why: only the inverse-first power kills the θ\theta-dependence, leaving a constant integrand i dθi\,\mathrm{d}\theta whose accumulation over a full turn is the 2πi2\pi i that seeds the residue theorem. *The n=−1n=-1 result ∮dz/(z−z0)=2πi≈6.283 i\oint\mathrm{d}z/(z-z_0)=2\pi i\approx 6.283\,i is the value that feeds directly into Cauchy's integral formula, and it is independent of the radius rr.*

Go deeper · Derivation B · 1 minPath dependence versus independence
Derivation BPath dependence versus independence

The goal is to make "analytic integrands are path-independent" concrete by integrating two deliberately chosen functions — zˉ\bar z, nowhere analytic, and zz, analytic everywhere — from 00 to 1+i1+i along two routes, and watching one answer split apart while the other stays fixed. The contrast is the cleanest demonstration that path independence is a property of the integrand — of whether it has an antiderivative — not of the geometry, and it foreshadows why Cauchy's theorem singles out analytic functions. We use the straight diagonal and the L-shaped route right-then-up.

Step 1. Integrate zˉ\bar z along the straight segment z=t(1+i)z=t(1+i), t:0→1t:0\to1, so zˉ=t(1−i)\bar z=t(1-i) and dz=(1+i) dt\mathrm{d}z=(1+i)\,\mathrm{d}t; then ∫01t(1−i)(1+i) dt=∫012t dt=1\int_0^1 t(1-i)(1+i)\,\mathrm{d}t=\int_0^1 2t\,\mathrm{d}t=1. Why: the product (1−i)(1+i)=2(1-i)(1+i)=2 is real, so the diagonal route delivers the clean real value 11.

Step 2. Integrate zˉ\bar z along the L-path: first x:0→1x:0\to1 (where zˉ=x\bar z=x, dz=dx\mathrm{d}z=\mathrm{d}x) giving ∫01x dx=12\int_0^1 x\,\mathrm{d}x=\tfrac12, then y:0→1y:0\to1 (where z=1+iyz=1+iy, zˉ=1−iy\bar z=1-iy, dz=i dy\mathrm{d}z=i\,\mathrm{d}y) giving ∫01(1−iy) i dy=i+12\int_0^1 (1-iy)\,i\,\mathrm{d}y=i+\tfrac12; the total is 12+(i+12)=1+i\tfrac12+(i+\tfrac12)=1+i. Why: 1+i≠11+i\ne 1 — the same endpoints, two routes, two different answers, so zˉ\bar z is genuinely path-dependent, exactly as expected for a function that fails the Cauchy–Riemann equations.

Step 3. Integrate zz along either route using its antiderivative z2/2z^2/2: ∫Cz dz=[z22]01+i=12(1+i)2=12(2i)=i\int_C z\,\mathrm{d}z=\left[\tfrac{z^2}{2}\right]_0^{1+i}=\tfrac12(1+i)^2=\tfrac12(2i)=i. Why: zz is analytic on all of C\mathbb{C} and possesses the single-valued antiderivative z2/2z^2/2, so the fundamental theorem (7) forces both routes — indeed every route — to give the identical value ii. *To summarise: zˉ\bar z yields 11 along the straight diagonal and 1+i1+i along the L-path — path-dependent, as expected for a nowhere-analytic function — while zz yields ii on every path, consistent with the closed form 12(1+i)2\tfrac12(1+i)^2.*

Go deeper · Derivation C · 1 minClosing a contour with the ML inequality
Derivation CClosing a contour with the ML inequality

The goal is to prove that the large semicircular arc used to close a contour in the upper half-plane contributes nothing as its radius goes to infinity, using ∫CReiz/(z2+1) dz\int_{C_R} e^{iz}/(z^2+1)\,\mathrm{d}z as the archetype. This is the step that converts a hard real integral over the whole line into a finite loop: if the arc vanishes, the closed-loop value equals the real-axis integral we want, which the benchmark and its residue descendants then evaluate. The entire method of computing real integrals by contours rests on arguments of exactly this shape, so it is worth doing with explicit bounds.

Step 1. Bound the numerator. On the arc z=Reiθz=Re^{i\theta} with θ:0→π\theta:0\to\pi we have y=Im z≥0y=\mathrm{Im}\,z\ge 0, so ∣eiz∣=∣ei(x+iy)∣=e−y≤1|e^{iz}|=|e^{i(x+iy)}|=e^{-y}\le 1. Why: pushing the oscillatory factor eize^{iz} into the upper half-plane turns it into a decaying exponential rather than a growing one — which is precisely why we close upward for an e+ize^{+iz} integrand.

Step 2. Bound the denominator from below by the reverse triangle inequality: for ∣z∣=R>1|z|=R>1, ∣z2+1∣≥∣z∣2−1=R2−1|z^2+1|\ge |z|^2-1=R^2-1. Why: a lower bound on the denominator gives an upper bound on the fraction, which is what the ML inequality needs.

Step 3. Combine into MM: on the whole arc ∣eizz2+1∣≤1R2−1\left|\dfrac{e^{iz}}{z^2+1}\right|\le\dfrac{1}{R^2-1}, so M=1/(R2−1)M=1/(R^2-1). Why: the two one-sided bounds multiply into a single worst-case value of the integrand over the arc.

Step 4. Apply the ML inequality with arc length L=πRL=\pi R: ∣∫CRf dz∣≤M L=πRR2−1→R→∞0\left|\int_{C_R} f\,\mathrm{d}z\right|\le M\,L=\dfrac{\pi R}{R^2-1}\xrightarrow{R\to\infty}0, since the bound decays like 1/R1/R. Why: the integrand dies faster than the arc grows, so the closing arc drops out and the loop reduces to the real-axis integral, which the residue at z=iz=i evaluates to π/e\pi/e. *The arc bound πR/(R2−1)→0\pi R/(R^2-1)\to 0 confirms the arc vanishes, and the surviving real-line integral ∫−∞∞eix/(x2+1) dx=π/e≈1.156\int_{-\infty}^{\infty} e^{ix}/(x^2+1)\,\mathrm{d}x=\pi/e\approx 1.156 is the standard residue result.*

Limiting cases

Pushing the general definition into special corners is what reveals its skeleton — each row below is a regime in which one of the moving parts dominates.

CaseResultMeaning
Antiderivative exists∫Cf dz=F(z1)−F(z0), F′=f\int_C f\,\mathrm{d}z=F(z_1)-F(z_0),\ F'=fPath-independent; every loop gives zero. Holds for f=znf=z^n, n≥0n\ge 0, on all of C\mathbb{C}.
Benchmark powers∮∣z−z0∣=r(z−z0)n dz={2πin=−10n≠−1\oint_{\vert z-z_0\vert=r}(z-z_0)^n\,\mathrm{d}z=\begin{cases}2\pi i & n=-1\\ 0 & n\ne -1\end{cases}The lone exception n=−1n=-1 is the source of every residue.
Large arc, decaying integrand∣∫CRf dz∣≤MR πR→0 if MR=o(1/R)\left\vert\int_{C_R} f\,\mathrm{d}z\right\vert\le M_R\,\pi R\to 0\ \text{if}\ M_R=o(1/R)ML inequality kills the closing arc; Jordan's lemma refines it for eiaze^{iaz} factors.
Reversed orientation∫−Cf dz=−∫Cf dz\int_{-C} f\,\mathrm{d}z=-\int_{C} f\,\mathrm{d}zReversing the direction flips the sign, as on the real line.
Nowhere-analytic integrand∫Czˉ dz\int_C \bar z\,\mathrm{d}z path-dependentNo antiderivative exists, so the value depends on the route (11 vs 1+i1+i above).

Worked examples

1 · The three benchmark powers on the unit circle (confidence builder)

Evaluate ∮∣z∣=1zn dz\oint_{|z|=1} z^n\,\mathrm{d}z for n=2n=2, n=0n=0, and n=−1n=-1 directly from the parametrization, and confirm the pattern predicted by the benchmark.

Step 1. Parametrize the unit circle by z=eiθz=e^{i\theta}, θ:0→2π\theta:0\to 2\pi, so dz=ieiθ dθ\mathrm{d}z=ie^{i\theta}\,\mathrm{d}\theta and the integrand becomes zn dz=i ei(n+1)θ dθz^n\,\mathrm{d}z=i\,e^{i(n+1)\theta}\,\mathrm{d}\theta. Every case is now the single integral i∫02πei(n+1)θ dθi\int_0^{2\pi} e^{i(n+1)\theta}\,\mathrm{d}\theta.

Step 2. For n=2n=2: the exponent is e3iθe^{3i\theta}, which completes three full turns and averages to zero, so ∮∣z∣=1z2 dz=0\oint_{|z|=1} z^2\,\mathrm{d}z=\mathbf{0}. For n=0n=0: the exponent is eiθe^{i\theta}, one full turn, again averaging to zero, so ∮∣z∣=1dz=0\oint_{|z|=1}\mathrm{d}z=\mathbf{0} — a loop of the constant 11, which has antiderivative zz and must vanish.

Step 3. For n=−1n=-1: the exponent collapses to e0=1e^{0}=1, leaving i∫02πdθ=2πii\int_0^{2\pi}\mathrm{d}\theta=\mathbf{2\pi i}. The three answers 0, 0, 2πi0,\,0,\,2\pi i are the benchmark in miniature: only the 1/z1/z power survives the loop, and it survives with the universal value 2πi2\pi i, independent of which circle you chose.

2 · An ML bound and how tight it is

Estimate an upper bound for ∣∫Cdz/z2∣\left|\int_C \mathrm{d}z/z^2\right|, where CC is the quarter-circle ∣z∣=2|z|=2 from z=2z=2 to z=2iz=2i (that is, 0≤arg⁡z≤π/20\le\arg z\le\pi/2), then compare with the exact value.

Step 1. Find MM. On CC the modulus is fixed, ∣z∣=2|z|=2, so ∣1/z2∣=1/∣z∣2=1/4|1/z^2|=1/|z|^2=1/4 everywhere on the arc; the maximum is therefore M=1/4M=\mathbf{1/4}.

Step 2. Find LL. The arc length of a quarter of the circle of radius 22 is L=2⋅(π/2)=πL=2\cdot(\pi/2)=\pi. The ML inequality then gives ∣∫Cdz/z2∣≤ML=14⋅π=π/4≈0.785\left|\int_C \mathrm{d}z/z^2\right|\le ML=\tfrac14\cdot\pi=\mathbf{\pi/4\approx 0.785}.

Step 3. Compare with the exact value. Here 1/z21/z^2 has the single-valued antiderivative −1/z-1/z on CC (the arc avoids the origin), so ∫Cdz/z2=[−1z]22i=−12i+12=12+i2\int_C \mathrm{d}z/z^2=\left[-\tfrac1z\right]_{2}^{2i}=-\tfrac{1}{2i}+\tfrac12=\tfrac12+\tfrac{i}{2}, whose modulus is 1/4+1/4=1/2≈0.707\sqrt{1/4+1/4}=1/\sqrt2\approx\mathbf{0.707}. The exact 0.7070.707 sits comfortably below the bound 0.7850.785 — the ML estimate is correct and, at about 11 % slack, respectably tight because ∣f∣|f| happens to be constant on this contour.

3 · Reading off a real integral once the arc is dead

Given that the arc contribution vanishes (Derivation 3), state the value of ∫−∞∞cos⁡xx2+1 dx\int_{-\infty}^{\infty} \dfrac{\cos x}{x^2+1}\,\mathrm{d}x and check its size.

Step 1. Close ∫−∞∞eix/(x2+1) dx\int_{-\infty}^{\infty} e^{ix}/(x^2+1)\,\mathrm{d}x with the upper semicircle. By Derivation 3 the arc dies, so the real-line integral equals the closed loop, which encircles the single pole at z=iz=i and evaluates to π/e\mathbf{\pi/e} (the residue e−1/2ie^{-1}/2i times 2πi2\pi i).

Step 2. Take real parts. Since eix=cos⁡x+isin⁡xe^{ix}=\cos x+i\sin x and π/e\pi/e is real, ∫−∞∞cos⁡xx2+1 dx=π/e≈1.156\int_{-\infty}^{\infty}\dfrac{\cos x}{x^2+1}\,\mathrm{d}x=\mathbf{\pi/e\approx 1.156}, while the odd sine integral vanishes by symmetry.

Step 3. Sanity-check the size. The bare Lorentzian 1/(x2+1)1/(x^2+1) has area π≈3.14\pi\approx 3.14; the cosine's oscillation trims it to π/e≈1.16\pi/e\approx 1.16, a believable fraction. The contour method turned an integral with no elementary antiderivative into the single clean number π/e\pi/e.

Physics of the portrait

Contour integration is very nearly one person's invention. Its definitions, estimates, and closed-loop miracle all descend from a single decade of work by the man who made analysis rigorous.

Origins · 1 minAugustin-Louis Cauchy and how this was discovered
AC
Augustin-Louis Cauchy
1789–1857 · founder of rigorous complex analysis and the theory of contour integrals

Augustin-Louis Cauchy, born in Paris in the year the Revolution began, built the theory of complex integration almost single-handedly between 1814 and 1831. Before him, integrals of complex functions were computed ad hoc, with no principled account of when a path could be deformed. In his 1814 memoir on definite integrals — and decisively in the 1825 memoir Sur les intégrales définies prises entre des limites imaginaires — Cauchy introduced the integral of a complex function along a path and proved that for a function with a continuous derivative the integral around a closed curve vanishes: Cauchy's integral theorem. From it he extracted the integral formula that reconstructs an analytic function inside a loop from its boundary values, and the residue (a word he coined in 1826) as the coefficient a small circle around a singularity reads off — precisely the 2πi2\pi i of this article's benchmark. Famously prolific and famously difficult — a devout royalist who followed the Bourbons into exile rather than swear allegiance to the July Monarchy — he published nearly 800 papers. The estimate ∣∫Cf dz∣≤ML|\int_C f\,\mathrm{d}z|\le ML and the reduction of loops to residues are the everyday tools his memoirs left behind, and every real integral a physicist later closes in the upper half-plane applies the framework Cauchy set down.

History
1814
— Cauchy's first memoir on definite integrals lays the groundwork for complex integration
1821
— Cauchy's Cours d'analyse puts limits and continuity on a rigorous footing
1825
— Cauchy proves the integral theorem for closed contours between imaginary limits
1826
— Cauchy introduces the residue as the coefficient read off by a small loop
1831
— Cauchy derives the integral formula and the power-series representation of analytic functions
1851
— Riemann recasts the whole theory around conformal mapping and the Cauchy–Riemann equations

Going further

Texts. Stone & Goldbart, Mathematics for Physics, ch. 17 (Complex Analysis I) · Arfken, Weber & Harris, Mathematical Methods for Physicists, 7th ed., ch. 11 · Riley, Hobson & Bence, Mathematical Methods for Physics and Engineering, 3rd ed., ch. 24 · Nakahara, Geometry, Topology and Physics, 2nd ed., §1.3 (for the topological reading of the winding integral) · Byron & Fuller, Mathematics of Classical and Quantum Physics, ch. 6 · Ahlfors, Complex Analysis, 3rd ed., ch. 4 · Churchill & Brown, Complex Variables and Applications, ch. 4. The key numerical anchors in this article are: the benchmark ∮(z−z0)n dz=2πi δn,−1\oint(z-z_0)^n\,\mathrm{d}z=2\pi i\,\delta_{n,-1} obtained via z=z0+reiθz=z_0+re^{i\theta}; the ML bound π/4≈0.785\pi/4\approx0.785 and exact value 1/2≈0.7071/\sqrt2\approx0.707 from worked example 2; the path-contrast values 11, 1+i1+i, and ii from Derivation 2; and the closing-arc estimate πR/(R2−1)→0\pi R/(R^2-1)\to0 together with the surviving integral ∫−∞∞eix/(x2+1) dx=π/e≈1.156\int_{-\infty}^{\infty} e^{ix}/(x^2+1)\,\mathrm{d}x=\pi/e\approx1.156, whose real part gives worked example 3.

Prerequisites. Complex Numbers and the Complex Plane · Functions of a Complex Variable and Limits · Elementary Complex Functions. Leads to. Cauchy's Integral Theorem · Cauchy's Integral Formula and Derivatives · Residues and the Residue Theorem · Laurent Series.

Ask the tutor: Ask me to walk you through closing any real integral in the upper half-plane — pick one and we will parametrize the arc, kill it with the ML inequality, and read off the answer from the benchmark together.

What actually is a contour integral, in one sentence?

It is a line integral of a complex-valued function along an oriented curve, computed by adding up complex increments f(z) dzf(z)\,\mathrm{d}z as you walk the curve. The recipe is always the same: write the curve as z(t)z(t) for a real parameter t∈[a,b]t\in[a,b], replace dz\mathrm{d}z by z′(t) dtz'(t)\,\mathrm{d}t, and you are left with an ordinary integral of a complex function of tt, which splits into two real integrals you already know how to do. The only new feature compared with real calculus is that "which curve" can matter, so the answer is attached to a path, not just to two endpoints.

When does the path not matter?

Exactly when the integrand has a single-valued antiderivative FF (with F′=fF'=f) on a domain containing every path you are comparing. Then ∫Cf dz=F(end)−F(start)\int_C f\,\mathrm{d}z=F(\text{end})-F(\text{start}), which depends only on the endpoints, and every closed loop gives zero. Analyticity on a simply connected domain guarantees such an FF exists, which is the content of Cauchy's theorem one article ahead. Path independence fails when either the integrand is not analytic (like zˉ\bar z, which has no antiderivative at all) or the domain is not simply connected (like the punctured plane for 1/z1/z, where log⁡z\log z is multivalued around the hole). The presence of a pole or branch point inside a loop is the usual reason the shortcut breaks.

Why is 1 over z so special?

Because it is the unique integer power whose loop integral around its singularity is nonzero. The benchmark ∮(z−z0)n dz=2πi δn,−1\oint(z-z_0)^n\,\mathrm{d}z=2\pi i\,\delta_{n,-1} shows every other power (z−z0)n(z-z_0)^n integrates to zero over a circle, since its phasor ei(n+1)θe^{i(n+1)\theta} completes whole turns and averages out — only n=−1n=-1 flattens the phasor to a constant. Equivalently, 1/(z−z0)1/(z-z_0) is the one power whose antiderivative, log⁡(z−z0)\log(z-z_0), is not single-valued around the point: circling once adds 2πi2\pi i to the logarithm. That 2πi2\pi i is the atom of the residue theorem; when a general function is expanded in a Laurent series, only its a−1/(z−z0)a_{-1}/(z-z_0) term survives a loop, so the whole loop integral reduces to 2πi a−12\pi i\,a_{-1}.

Do I have to use a circle, or can the contour be any shape?

Any piecewise-smooth oriented curve is a legitimate contour, and the parametrization recipe works for all of them. Circles are popular only because they are the easiest curves on which to make (z−z0)(z-z_0) a pure phase, which is why the benchmark is stated for one. The deep point, coming in the next article, is that for an analytic integrand you may deform the contour freely without changing the value, as long as you do not sweep across a singularity — so you may replace an ugly contour with a convenient circle. That freedom is what makes the circle-based benchmark so powerful: once Cauchy's theorem lets you shrink any loop onto small circles around the enclosed singularities, every loop integral becomes a sum of benchmark contributions.

Is a contour integral a real number or a complex number?

In general it is complex — equation (3) packages two real line integrals into one complex answer. The benchmark 2πi2\pi i is purely imaginary; the path-contrast integral of zz gave ii; a general contour integral lands anywhere in the plane. When physicists use contours to evaluate a real integral like ∫cos⁡x/(x2+1) dx\int\cos x/(x^2+1)\,\mathrm{d}x, the strategy is to build a complex integrand whose real or imaginary part is the wanted quantity, evaluate the complex loop, and take the appropriate part at the end — as in worked example 3, where the real part of π/e\pi/e is the answer and the imaginary (sine) part vanishes by symmetry.

What is the connection to circulation and flux in physics?

For an analytic f=u+ivf=u+iv read as a two-dimensional flow field, ∮f dz\oint f\,\mathrm{d}z bundles two physical quantities into one complex number: its real part is the circulation of the field around the loop, its imaginary part the net flux through it. This is why the 1/z1/z singularity, whose loop integral is 2πi2\pi i, models a point vortex of circulation 2π2\pi — the purely imaginary answer says "circulation, no source." The same bookkeeping underlies the Kutta–Joukowski theorem, where aerodynamic lift on an airfoil is proportional to the circulation of the flow around it. Read physically, the benchmark says a vortex carries a fixed amount of circulation set by 2πi2\pi i.

Before this

Where this leads