MATH-334 · Lesson 7 of 12 · 26 min

Cauchy's theorem

Lesson 6 showed that a function with an antiderivative integrates to zero round every closed contour, and that \(\frac{1}{z}\) does not, because its antiderivative \(\log z\) cannot be defined all the way round the origin. Cauchy's theorem is the statement that for analytic functions on a region without holes the integral round every closed contour is zero. It is the central theorem of complex analysis. Everything that follows, the integral formula, the infinite differentiability of analytic functions, Taylor and Laurent series and the residue theorem, is deduced from it. This lesson states it, gives two proofs, and develops its most useful consequence, the freedom to deform contours.

A little history

Cauchy presented his memoir on definite integrals taken between imaginary limits in 1825, in which he showed that the integral of a function between two points does not change when the path is varied, provided the function stays finite and continuous between the paths. His argument used the calculus of variations and assumed what we would now call continuity of the derivative. In 1851 Riemann gave the proof via what is now called Green's theorem. In a celebrated paper of 1884, refined in 1900, Édouard Goursat showed that the hypothesis on the derivative is unnecessary: complex differentiability at every point suffices. Goursat's proof, by repeatedly subdividing a triangle, is the one found in most modern texts.

Statement

Cauchy's theorem. Let \(f\) be analytic on a simply connected domain \(D\). Then for every closed contour \(\gamma\) in \(D\),

\[\oint_\gamma f(z)\,dz = 0.\]

Equivalently, integrals of \(f\) in \(D\) depend only on the endpoints, and \(f\) has an antiderivative on \(D\). Recall from lesson 2 that a domain is simply connected if every closed curve in it can be shrunk continuously to a point within it: informally, it has no holes. Disks, half-planes, the plane, and the slit plane are simply connected; an annulus and the punctured plane are not, and \(\oint_{|z| = 1}\frac{dz}{z} = 2\pi i\) shows that the theorem fails on them.

Proof via Green's theorem

Suppose in addition that \(f'\) is continuous, and that \(\gamma\) is a simple closed contour bounding a region \(R\) inside \(D\). Green's theorem from MATH-209 says \(\oint_\gamma (P\,dx + Q\,dy) = \iint_R (Q_x - P_y)\,dA\). From lesson 6,

\[\oint_\gamma f\,dz = \oint_\gamma (u\,dx - v\,dy) + i\oint_\gamma (v\,dx + u\,dy) = \iint_R (-v_x - u_y)\,dA + i\iint_R (u_x - v_y)\,dA.\]

Both integrands vanish by the Cauchy–Riemann equations, so the integral is 0. \(\square\) This proof is short and makes the role of the Cauchy–Riemann equations transparent: they say exactly that the two real line integrals have zero curl. Its weakness is the extra hypothesis of a continuous derivative, which Goursat removed.

Goursat's proof for triangles

Theorem (Cauchy–Goursat). If \(f\) is analytic on an open set containing a closed triangle \(T\) and its inside, then \(\oint_{\partial T} f\,dz = 0\).

Proof. Let \(I = |\oint_{\partial T} f\,dz|\). Join the midpoints of the sides to cut \(T\) into four congruent triangles, each traversed anticlockwise. The integrals over the interior edges cancel in pairs, because each is traversed once in each direction, so the four boundary integrals add up to the integral over \(\partial T\). Hence at least one of them, call its triangle \(T_1\), has \(|\oint_{\partial T_1} f\,dz| \ge \frac{I}{4}\). Repeat: we obtain nested triangles \(T \supset T_1 \supset T_2 \supset \dots\) with

\[\Big|\oint_{\partial T_n} f\,dz\Big| \ge \frac{I}{4^n}, \qquad \operatorname{perimeter}(T_n) = \frac{p}{2^n}, \qquad \operatorname{diameter}(T_n) \le \frac{d}{2^n},\]

where \(p\) and \(d\) are the perimeter and diameter of \(T\). The nested closed triangles shrink to a single point \(z_0\) in \(T\). Since \(f\) is differentiable at \(z_0\), \(f(z) = f(z_0) + f'(z_0)(z - z_0) + \varepsilon(z)(z - z_0)\) with \(\varepsilon(z) \to 0\). The linear part has an antiderivative and integrates to zero round \(\partial T_n\). Given \(\eta > 0\), choose \(n\) large enough that \(|\varepsilon| < \eta\) on \(T_n\); for \(z\) on \(\partial T_n\), \(|z - z_0| \le \frac{d}{2^n}\). The ML inequality gives

\[\frac{I}{4^n} \le \Big|\oint_{\partial T_n}\varepsilon(z)(z - z_0)\,dz\Big| \le \eta\,\frac{d}{2^n}\,\frac{p}{2^n},\]

so \(I \le \eta\,dp\). As \(\eta\) is arbitrary, \(I = 0\). \(\square\)

The proof uses complex differentiability at a single point in each step, and nothing else: no continuity of \(f'\), no Green's theorem.

From triangles to convex and simply connected domains

On a convex domain \(D\) (one containing the segment between any two of its points), fix \(z_1\) in \(D\) and define \(F(z) = \int_{[z_1, z]} f(w)\,dw\) along the segment. For \(z\) and \(z + h\) in \(D\), the triangle with vertices \(z_1, z, z + h\) lies in \(D\), so by Goursat \(F(z + h) - F(z) = \int_{[z, z + h]} f(w)\,dw\). Then

\[\Big|\frac{F(z + h) - F(z)}{h} - f(z)\Big| = \Big|\frac{1}{h}\int_{[z, z + h]}\big(f(w) - f(z)\big)\,dw\Big| \le \max_{w \in [z, z + h]}|f(w) - f(z)| \to 0\]

by the ML inequality and the continuity of \(f\). So \(F' = f\): \(f\) has an antiderivative on \(D\), and by lesson 6 its integral round every closed contour in \(D\) is 0. This proves Cauchy's theorem for convex domains, in particular for disks. The extension to arbitrary simply connected domains uses the same idea along chains of overlapping disks; we will use the theorem in that generality without giving the topological details.

Logarithms on simply connected domains

Cauchy's theorem settles a question left open in lesson 5. Let \(D\) be a simply connected domain not containing 0. The function \(\frac{1}{z}\) is analytic on \(D\), so it has an antiderivative there: fix \(z_1\) in \(D\), choose any value \(c\) of \(\log z_1\), and set

\[L(z) = c + \int_{z_1}^{z}\frac{dw}{w},\]

integrating along any contour in \(D\). Then \(L' = \frac{1}{z}\). To check that \(L\) is a logarithm, differentiate \(ze^{-L(z)}\): the derivative is \(e^{-L} - zL'e^{-L} = 0\), so \(ze^{-L(z)}\) is constant on the domain \(D\), and at \(z_1\) it equals \(z_1e^{-c} = 1\). So \(e^{L(z)} = z\). A branch of the logarithm exists on every simply connected domain avoiding 0, whatever its shape; a spiral-shaped slit, for instance, works as well as a straight one. The same argument shows that a non-vanishing analytic function \(g\) on a simply connected domain has an analytic logarithm, \(\log g = c + \int\frac{g'}{g}\), and hence analytic square roots \(e^{\frac{1}{2}\log g}\). These facts are used repeatedly in the theory of conformal mapping.

The homotopy form of the theorem

Behind both Cauchy's theorem and the deformation principle is a single statement. Two closed contours \(\gamma_0\) and \(\gamma_1\) in a domain \(D\) are homotopic in \(D\) if one can be deformed continuously into the other through closed curves lying in \(D\). The homotopy form of Cauchy's theorem says that if \(f\) is analytic on \(D\) and \(\gamma_0\), \(\gamma_1\) are homotopic in \(D\), then \(\oint_{\gamma_0} f\,dz = \oint_{\gamma_1} f\,dz\). A domain is simply connected exactly when every closed curve is homotopic to a constant curve, whose integral is 0, so the basic theorem is a special case. On the punctured plane the unit circle is not homotopic to a point, because any deformation would have to pass through the origin; the value \(2\pi i\) of the integral of \(\frac{1}{z}\) is a certificate of that topological fact. Integration is thus a tool for detecting holes, an idea that grew into the de Rham cohomology of modern geometry.

Deformation of contours

The most useful form of Cauchy's theorem in practice concerns regions with holes. Let \(\gamma_1\) and \(\gamma_2\) be positively oriented simple closed contours with \(\gamma_2\) inside \(\gamma_1\), and suppose \(f\) is analytic on an open set containing the closed ring-shaped region between them. Then

\[\oint_{\gamma_1} f\,dz = \oint_{\gamma_2} f\,dz.\]

Proof sketch. Join \(\gamma_1\) to \(\gamma_2\) by two short cross-cuts, dividing the region between them into two pieces, each bounded by a closed contour on which \(f\) is analytic inside. Traverse each piece anticlockwise. By Cauchy's theorem each boundary integral is 0. Adding them, the cross-cuts are traversed once in each direction and cancel, the outer contour \(\gamma_1\) appears anticlockwise and the inner \(\gamma_2\) clockwise. So \(\oint_{\gamma_1} f\,dz - \oint_{\gamma_2} f\,dz = 0\). \(\square\)

In words: a contour may be deformed freely without changing the integral, as long as it does not pass over a point where the function fails to be analytic. Consequently, for any positively oriented simple closed contour \(\gamma\) round \(z_0\),

\[\oint_\gamma\frac{dz}{z - z_0} = 2\pi i,\]

since \(\gamma\) can be shrunk to a small circle about \(z_0\), where lesson 6 gives \(2\pi i\). The same argument with several inner contours shows that if \(f\) is analytic inside \(\gamma\) except at points \(z_1, \dots, z_n\), then \(\oint_\gamma f\,dz = \sum_k \oint_{C_k} f\,dz\), where \(C_k\) are small circles round the \(z_k\). This is the skeleton of the residue theorem.

A large irregular closed contour enclosing a point z0, a small circle around z0 inside it, and two cross-cuts joining them, with arrows showing the outer contour anticlockwise and the inner circle clockwise.
Deforming a contour across a region where f is analytic

Worked problem

Using deformation and partial fractions

Compute \(\oint_\gamma\frac{dz}{z^2 - 1}\), where \(\gamma\) is the positively oriented circle \(|z - 1| = 1\).

Show solution
  1. Partial fractions: \(\frac{1}{z^2 - 1} = \frac{1}{2}\Big(\frac{1}{z - 1} - \frac{1}{z + 1}\Big)\).
  2. The circle encloses 1 but not \(-1\) (which is at distance 2 from its centre).
  3. \(\frac{1}{z + 1}\) is analytic on a disk containing the circle, so its integral is 0 by Cauchy's theorem.
  4. \(\oint\frac{dz}{z - 1} = 2\pi i\).

Answer: \(\frac{1}{2}\cdot 2\pi i = \pi i\).

Worked problem

Where the theorem does not apply

Explain why \(\oint_{|z| = 1}\bar{z}\,dz = 2\pi i\) does not contradict Cauchy's theorem, and why \(\oint_{|z| = 1}\frac{e^z}{z^2 + 4}\,dz = 0\).

Show solution
  1. \(\bar{z}\) is not analytic anywhere, so the theorem says nothing about it.
  2. The integrand \(\frac{e^z}{z^2 + 4}\) is analytic except at \(\pm 2i\), outside the unit circle.
  3. It is analytic on the simply connected disk \(|z| < 2\), which contains the contour.

Answer: Analyticity on a simply connected domain containing the contour is what matters; the first integrand is not analytic, the second is analytic on the disk of radius 2, so its integral is 0.

Checking Cauchy's theorem and contour deformation numerically
import cmath, math

def integrate(f, gamma, dgamma, n=4000):
    """Simpson's rule on [0, 2*pi] for a closed parametrized contour."""
    h = 2*math.pi / n
    s = 0
    for k in range(n + 1):
        t = k*h
        w = 1 if k in (0, n) else (4 if k % 2 else 2)
        s += w * f(gamma(t)) * dgamma(t)
    return s * h / 3

# Three different closed contours round the origin.
contours = {
    "unit circle": (lambda t: cmath.exp(1j*t), lambda t: 1j*cmath.exp(1j*t)),
    "ellipse 3x1": (lambda t: 3*math.cos(t) + 1j*math.sin(t), lambda t: -3*math.sin(t) + 1j*math.cos(t)),
    "off-centre":  (lambda t: 0.5 + 2*cmath.exp(1j*t), lambda t: 2j*cmath.exp(1j*t)),
}
funcs = {"z^2 e^z (entire)": lambda z: z*z*cmath.exp(z),
         "cos z / (z - 5)":  lambda z: cmath.cos(z)/(z - 5),
         "1/z":              lambda z: 1/z,
         "e^z / z":          lambda z: cmath.exp(z)/z}
for fname, f in funcs.items():
    vals = [integrate(f, g, dg) for g, dg in contours.values()]
    print(f"{fname:18s}", "  ".join(f"{v.real:+.8f}{v.imag:+.8f}i" for v in vals))
print("2*pi*i =", 2j*math.pi)

# Partial fractions example: circle |z - 1| = 1 round 1 only.
v = integrate(lambda z: 1/(z*z - 1), lambda t: 1 + cmath.exp(1j*t), lambda t: 1j*cmath.exp(1j*t))
print("integral of 1/(z^2-1) round |z-1|=1:", v, " pi*i =", math.pi*1j)
Output
z^2 e^z (entire)   +0.00000000+0.00000000i  +0.00000000+0.00000000i  +0.00000000+0.00000000i
cos z / (z - 5)    +0.00000000+0.00000000i  +0.00000000+0.00000000i  +0.00000000+0.00000000i
1/z                +0.00000000+6.28318531i  -0.00000000+6.28318531i  -0.00000000+6.28318531i
e^z / z            +0.00000000+6.28318531i  +0.00000000+6.28318531i  -0.00000000+6.28318531i
2*pi*i = 6.283185307179586j
integral of 1/(z^2-1) round |z-1|=1: (-4.642628913757749e-17+3.1415926535897944j)  pi*i = 3.141592653589793j

Common mistakes

Common mistakes

  • MistakeApplying Cauchy's theorem to a contour that encloses a singularity.

    InsteadThe function must be analytic on a simply connected domain containing the contour, or at every point inside and on a simple closed contour.

  • MistakeThinking analytic on the contour itself is enough.

    Instead\(\frac{1}{z}\) is analytic on the unit circle but not inside it, and its integral is \(2\pi i\).

  • MistakeForgetting orientation when deforming.

    InsteadIn the ring-shaped region, the outer boundary is anticlockwise and the inner clockwise; the two anticlockwise integrals are equal.

  • MistakeBelieving the theorem requires a continuous derivative.

    InsteadGoursat showed complex differentiability at each point suffices; continuity of \(f'\) is then a consequence (lesson 8).

  • MistakeDeforming a contour across a branch cut.

    InsteadA branch is not analytic on its cut; the cut counts as part of the region where the function fails to be analytic.

Summary and key terms

  • Cauchy's theorem: if \(f\) is analytic on a simply connected domain, its integral round every closed contour there is 0.
  • With a continuous derivative, the theorem follows from Green's theorem and the Cauchy–Riemann equations.
  • Goursat's subdivision argument proves it for triangles using only differentiability; antiderivatives then give it on convex domains.
  • Contours can be deformed across regions of analyticity without changing the integral.
  • \(\oint_\gamma\frac{dz}{z - z_0} = 2\pi i\) for any positively oriented simple closed contour round \(z_0\).
Simply connected
A domain in which every closed curve can be shrunk to a point, so it has no holes.
Convex set
A set containing the segment between any two of its points.
Cauchy–Goursat theorem
The integral of an analytic function round a triangle with its inside in the domain is 0.
Deformation principle
Two contours that can be deformed into each other through a region of analyticity give the same integral.
Cross-cut
A segment joining two boundary contours, used to reduce a region with holes to simply connected pieces.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. Compute \(\oint_{|z| = 2}\frac{dz}{z^2 + 9}\).

    Show answer

    0: the singularities \(\pm 3i\) lie outside, and the integrand is analytic on \(|z| < 3\).

  2. Compute \(\oint_{|z| = 2}\frac{dz}{z(z - 1)}\).

    Show answer

    \(\frac{1}{z(z - 1)} = \frac{1}{z - 1} - \frac{1}{z}\); both points are inside, so \(2\pi i - 2\pi i = 0\).

  3. Compute \(\oint_\gamma\frac{dz}{z - i}\) for the square with vertices \(\pm 2 \pm 2i\), positively oriented.

    Show answer

    The square encloses \(i\), so the answer is \(2\pi i\) by deformation to a small circle.

  4. Let \(f\) be entire. Explain why \(\int_0^{1 + i} f\,dz\) is the same along every path.

    Show answer

    The plane is simply connected, so \(f\) has an antiderivative \(F\) and the integral is \(F(1 + i) - F(0)\).

  5. Why does \(\oint_{|z| = 1}\operatorname{Log}(z + 2)\,dz = 0\)?

    Show answer

    \(\operatorname{Log}(z + 2)\) is analytic off \((-\infty, -2]\), which contains the disk \(|z| < 1.5\) round the contour.

  6. Compute \(\oint_{|z| = 3}\frac{dz}{z^2 + 1}\) by splitting into two small circles.

    Show answer

    \(\frac{1}{z^2 + 1} = \frac{1}{2i}\Big(\frac{1}{z - i} - \frac{1}{z + i}\Big)\); each small circle gives \(2\pi i\), so the total is \(\frac{1}{2i}(2\pi i - 2\pi i) = 0\).

  7. The region \(|z| > 1\) with the ray \([1, \infty)\) removed is simply connected. Why does it carry a branch of \(\log z\)?

    Show answer

    It avoids 0, so by the theorem \(\frac{1}{z}\) has an antiderivative \(L\) there; then \(ze^{-L}\) is constant, so a suitable constant makes \(e^{L} = z\).

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz