The Divergence Theorem
What You’ll Learn
Section titled “What You’ll Learn”In this lesson you’ll learn the Divergence Theorem (also called Gauss’s Theorem), which says that the total outward flux of a vector field through a closed surface equals the total divergence inside the enclosed volume. This is the final big theorem of vector calculus and the 3D counterpart to the flux form of Green’s Theorem.
The Concept
Section titled “The Concept”The Big Picture
Section titled “The Big Picture”Green’s Theorem (Lesson 16) related a line integral around a closed curve to a double integral over the enclosed region. Stokes’ Theorem (Lesson 19) related a surface integral of curl to a line integral around the boundary. The Divergence Theorem completes the picture: it relates a surface integral (flux) to a triple integral (divergence) over the enclosed volume.
All three theorems share the same idea: what happens on the boundary tells you what’s happening inside.
The orange arrows show outward flux through the surface S. The green arrows inside represent divergence sources in the volume E, where the field is spreading outward. If there were sinks (negative divergence), the green arrows would point inward instead, and they’d subtract from the total. The theorem says the net outward flux equals the sum of all sources minus all sinks inside.
The Theorem
Section titled “The Theorem”If E is a solid region bounded by a closed surface S (oriented outward), and has continuous partial derivatives, then
The left side is the total outward flux of F through the closed surface S. The right side is the total divergence of F inside the volume E.
The symbol means “surface integral over a closed surface” (the circle indicates the surface is closed, just like means a line integral over a closed curve).
What Divergence Means Here
Section titled “What Divergence Means Here”Recall from Lesson 17 that divergence measures how much a vector field “spreads out” at a point:
If divergence is positive at a point, the field is acting like a source there (fluid flowing outward). If negative, it’s a sink (fluid flowing inward). The Divergence Theorem says: add up all the sources and sinks inside, and you get the net outward flow through the boundary.
Why This Matters
Section titled “Why This Matters”Just like the other big theorems, the power is in choosing the easier side. Sometimes the surface integral is a nightmare (the surface has multiple pieces, weird parametrizations), but the divergence is simple. Other times the triple integral is harder and the surface integral is cleaner. You pick whichever side saves you work.
Connection to Green’s Theorem
Section titled “Connection to Green’s Theorem”When everything is 2D (the “surface” is a closed curve and the “volume” is a flat region), the Divergence Theorem reduces to the flux form of Green’s Theorem:
So Green’s Theorem, Stokes’ Theorem, and the Divergence Theorem are all variations of the same fundamental idea at different dimensions.
Worked Examples
Section titled “Worked Examples”Example 1: Flux through a sphere using divergence
Compute the outward flux of through the unit sphere .
The unit sphere is a closed surface enclosing the unit ball E. Instead of parametrizing the sphere and computing the surface integral directly, we use the Divergence Theorem.
First, compute the divergence:
The divergence is a constant, 3, everywhere. Now integrate over the unit ball:
The volume of the unit ball is , so
The total outward flux is . The Divergence Theorem turned a potentially messy surface integral into a one-line volume calculation.
Example 2: Zero divergence means zero net flux
Let (the rotational field from earlier lessons). Compute the outward flux through any closed surface.
The divergence is:
Since the divergence is zero everywhere, the Divergence Theorem gives:
No matter what closed surface you pick, the net outward flux of this field is zero. This makes physical sense: the rotational field swirls around but doesn’t spread out or compress. Whatever flows in through one part of the surface flows out through another part.
This is a general rule: if div F = 0 everywhere, the field is called incompressible (or solenoidal), and the net flux through any closed surface is zero.
Example 3: Flux through a cube
Compute the outward flux of through the unit cube .
The cube has six faces. Computing the surface integral directly would mean six separate integrals (one per face), each with its own outward normal. The Divergence Theorem collapses all of that into one triple integral.
Compute the divergence:
Now integrate over the unit cube:
By symmetry, each of the three terms contributes equally. Let’s compute one:
The integrals of 2y and 2z over the same cube also give 1 each (by symmetry), so
The total outward flux through the cube is 3. One triple integral instead of six surface integrals.
Real-World Application
Section titled “Real-World Application”The Divergence Theorem shows up everywhere in physics and engineering:
- Gauss’s Law in electromagnetism is literally the Divergence Theorem applied to the electric field. The total electric flux through a closed surface equals the total charge enclosed (divided by a constant).
- Fluid dynamics uses it to relate the flow rate out of a region to the sources and sinks inside. If you pump fluid into a closed tank, the Divergence Theorem tells you how much flows out through the walls.
- Heat transfer uses it to connect the heat flux through a surface to the heat sources inside a solid.
- Game engines use divergence-based calculations for particle systems: if particles are being created inside a region (positive divergence), the net particle flow outward through the boundary increases.
Retrying will remove your ✅ checkmark until you pass again.