Skip to content
Tutorials Center
My learning

Topics

Lesson 35 of 39 · The Big Theorems

The Divergence Theorem

The divergence theorem turns the outward flux through a closed surface into a triple integral of the divergence. Examples, Gauss's law and a summary of all theorems.

The last of the big theorems connects a surface integral over a closed surface to a triple integral over the solid it encloses. If a fluid is created inside a region (sources), it must flow out through the boundary, and this theorem makes the bookkeeping exact.

The statement

Let E be a solid region whose boundary S is a closed, piecewise smooth surface oriented with the outward unit normal n. Let F be a vector field with continuous first partial derivatives on an open region containing E. Then

Text
∬_S F · n dS = ∭_E div F dV

Total outward flux through the boundary equals the total source strength inside.

The proof idea mirrors the one for Green's theorem. Chop E into tiny boxes. For each box, the outward flux is about div F times its volume. When you add the boxes, the flux through any shared inner face cancels (one box's outward flux is the neighbor's inward flux), leaving only flux through the outer boundary.

Example 1: a sphere

Let F = ⟨x³, y³, z³⟩ and S the unit sphere, outward. Then div F = 3x² + 3y² + 3z² = 3ρ² in spherical coordinates, so

Text
∭ 3ρ² dV = ∫₀^{2π} ∫₀^π ∫₀¹ 3ρ² · ρ² sin φ dρ dφ dθ
         = 3 · (1/5) · 2 · 2π = 12π/5

Computing the surface integral directly would involve x⁴ + y⁴ + z⁴ on the sphere, which is much worse.

Python Divergence theorem on the unit sphere

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Example 2: a cube

Let F = ⟨x², y², z²⟩ and E the cube [0, 1]³. Then div F = 2x + 2y + 2z, so

Text
∭ (2x + 2y + 2z) dV = 3 · 2 · (1/2) · 1 · 1 = 3

(each of the three terms integrates to 1). Check the surface: on the faces x = 1, F · n = 1, area 1, flux 1; on x = 0, F · n = -x² = 0; likewise for y and z. The three faces at 1 give 1 + 1 + 1 = 3.

Python Cube: six faces versus one volume integral

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Gauss's law and the inverse-square field

The field of a point source at the origin (a gravitational or electric field) is

Text
F = r / |r|³   (r = ⟨x, y, z⟩)

Away from the origin, div F = 0 (the field's sources are only at the origin). The flux through a sphere of radius a centered at the origin is

Text
F · n = (r/a³) · (r/a) = 1/a²,   area = 4πa²   so   flux = 4π

This number does not depend on a. In fact, the flux through any closed surface enclosing the origin is 4π, and through any closed surface not enclosing it is 0. In physics, this is Gauss's law: the electric flux through a closed surface is proportional to the total charge inside.

You cannot apply the divergence theorem directly to a surface that encloses the origin for this field, because F is not defined there. Instead, you carve out a small ball around the origin and apply the theorem to the region between the two surfaces, where div F = 0.

Python Flux of r/|r|^3 through a sphere and a cube

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Both numbers come out at about 12.566, which is 4π.

The big picture

All of the big theorems share one pattern: the integral of a derivative over a region equals an integral of the original object over the boundary.

Theorem Boundary side Region side
Fundamental theorem of calculus f(b) - f(a) ∫ₐᵇ f'(x) dx
Fundamental theorem for line integrals f(B) - f(A) ∫_C ∇f · dr
Green ∮_C P dx + Q dy ∬_D (Qx - Py) dA
Stokes ∮_C F · dr ∬_S (curl F) · n dS
Divergence ∬_S F · n dS ∭_E div F dV

Each row takes a one-dimension-higher region and replaces its integral by one over its boundary.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. The divergence theorem equates the outward flux through a closed surface S with:

    Total outward flux equals the triple integral of the divergence over the enclosed solid.
  2. 2. For F = ⟨x³, y³, z³⟩ and the unit sphere, the flux is:

    div F = 3(x² + y² + z²) and its triple integral over the unit ball is 3 · 4π/5 = 12π/5.
  3. 3. The flux of r/|r|³ through any closed surface enclosing the origin is:

    Through a sphere of radius a it is (1/a²)(4πa²) = 4π, and the same holds for any enclosing surface.
  4. 4. Why can't the theorem be applied directly for r/|r|³ over a ball containing the origin?

    F must be continuously differentiable throughout the solid, and this field blows up at the origin.

Summary

  • Divergence theorem: ∬_S F · n dS = ∭_E div F dV with S closed and outward oriented.
  • It turns hard surface integrals into volume integrals when div F is simple.
  • Flux of r/|r|³ through any closed surface around the origin is 4π (Gauss's law).
  • Green, Stokes and the divergence theorem all say: integrate a derivative over a region, get a boundary integral.

Next: Practice Set: Optimization and Integrals