Multivariable Calculus · Undergraduate

The Divergence Theorem

Quick answer

The divergence theorem says that the total flow out through a closed surface equals the total divergence inside it: the flux of F through the boundary of a solid E, oriented outward, equals the triple integral of div F over E. Divergence measures outflow per unit volume, and the outflows of tiny boxes add up because shared faces cancel. The theorem turns hard flux integrals into routine triple integrals and explains Gauss's law.

What you'll learn

  • State the divergence theorem with outward orientation
  • Explain why outflows of small boxes add up
  • Compute the flux through a closed surface as a triple integral
  • Apply the theorem to fields with a singularity, as in Gauss's law

Flow out equals spreading inside

A fluid that leaves a closed container through its walls has to come from somewhere inside: from sources, where the flow spreads out. The divergence theorem turns that bookkeeping into an equation.

Divergence theorem. Let EE be a solid region whose boundary SS is a closed, piecewise smooth surface, oriented outward. If F\mathbf{F} has continuous partial derivatives on an open region containing EE, then

∯SF⋅dS=∭E∇⋅F dV\displaystyle\oiint_S \mathbf{F} \cdot d\mathbf{S} = \iiint_E \nabla \cdot \mathbf{F}\,dV

The circle on the double integral marks a closed surface. The left side is the flux out of EE; the right side adds up the divergence, the outflow per unit volume, at every point inside.

A solid and its outward normals The solid between the paraboloid z = 1 − x² − y² and the disk of radius 1 in the xy-plane. Its boundary has two pieces: the curved top, with an outward normal pointing up and away from the axis, and the flat disk at the bottom, with an outward normal pointing straight down. x y z n n
A solid and its outward normals

Why the outflows add up

Cut EE into many tiny boxes. The flux out of one box of volume ΔV\Delta V is about (∇⋅F) ΔV(\nabla \cdot \mathbf{F})\,\Delta V; that is what divergence means. Add the fluxes out of all the boxes. A face shared by two neighboring boxes has opposite outward normals for the two of them, so whatever flows out of one flows into the other, and the two contributions cancel. Only the faces on the outside of EE are left, and together they make up SS. The sum of (∇⋅F) ΔV(\nabla \cdot \mathbf{F})\,\Delta V is a Riemann sum for the triple integral, and what survives is the flux through SS. It is the argument behind Green’s and Stokes’ theorems, one dimension up.

Worked examples

One theorem, five times

Every big theorem of this course has the same shape. The integral of a derivative over a region equals an integral of the original over the region’s boundary:

TheoremRegionBoundaryStatement
Fundamental theorem of calculusinterval [a,b][a, b]two endpoints∫abF′(x) dx=F(b)−F(a)\int_a^b F'(x)\,dx = F(b) - F(a)
Fundamental theorem for line integralscurve CCtwo endpoints∫C∇f⋅dr=f(B)−f(A)\int_C \nabla f \cdot d\mathbf{r} = f(B) - f(A)
Green’s theoremplane region DDclosed curve∬D(Qx−Py) dA=∮CP dx+Q dy\iint_D (Q_x - P_y)\,dA = \oint_C P\,dx + Q\,dy
Stokes’ theoremsurface SSclosed curve∬S∇×F⋅dS=∮CF⋅dr\iint_S \nabla \times \mathbf{F} \cdot d\mathbf{S} = \oint_C \mathbf{F} \cdot d\mathbf{r}
Divergence theoremsolid EEclosed surface∭E∇⋅F dV=∯SF⋅dS\iiint_E \nabla \cdot \mathbf{F}\,dV = \oiint_S \mathbf{F} \cdot d\mathbf{S}

In every row the inside cancels: neighboring pieces share edges or faces, and what one piece gains its neighbor loses. Only the outer boundary is left.

Common mistakes

Practice problems

  1. Find the outward flux of F=(x3, y3, z3)\mathbf{F} = (x^3,\ y^3,\ z^3) through the unit sphere.

    Answer

    12π5\tfrac{12\pi}{5}

    Full solution

    ∇⋅F=3(x2+y2+z2)=3ρ2\nabla \cdot \mathbf{F} = 3(x^2 + y^2 + z^2) = 3\rho^2. In spherical coordinates, ∭3ρ2 dV=3⋅2π⋅2⋅∫01ρ4 dρ=12π5\iiint 3\rho^2\,dV = 3 \cdot 2\pi \cdot 2 \cdot \int_0^1 \rho^4\,d\rho = \tfrac{12\pi}{5}.

  2. Find the outward flux of F=(x, y, z)\mathbf{F} = (x,\ y,\ z) through the surface of the cylinder x2+y2≤4x^2 + y^2 \le 4, 0≤z≤30 \le z \le 3, including top and bottom.

    Answer

    36π36\pi

    Full solution

    The divergence is 33 and the volume is π⋅4⋅3=12π\pi \cdot 4 \cdot 3 = 12\pi.

  3. Find the outward flux of F=(xy, yz, zx)\mathbf{F} = (xy,\ yz,\ zx) through the surface of the box [0,2]×[0,3]×[0,1][0, 2] \times [0, 3] \times [0, 1].

    Answer

    1818

    Full solution

    ∇⋅F=y+z+x\nabla \cdot \mathbf{F} = y + z + x. The box has volume 66, and the averages of xx, yy and zz over it are 11, 32\tfrac{3}{2} and 12\tfrac{1}{2}, so the integral is 6⋅3=186 \cdot 3 = 18.

  4. Find the outward flux of F=(y, z, x)\mathbf{F} = (y,\ z,\ x) through the sphere of radius 55.

    Answer

    00

    Full solution

    Each component is independent of its own variable, so ∇⋅F=0\nabla \cdot \mathbf{F} = 0.

  5. Find the outward flux of F=(x, y, z)\mathbf{F} = (x,\ y,\ z) through the surface of the tetrahedron x,y,z≥0x, y, z \ge 0, x+y+z≤1x + y + z \le 1.

    Answer

    12\tfrac{1}{2}

    Full solution

    The divergence is 33 and the volume is 16\tfrac{1}{6}.

  6. Find the outward flux of F=(z, y, x)\mathbf{F} = (z,\ y,\ x) through the sphere of radius 22.

    Answer

    32π3\tfrac{32\pi}{3}

    Full solution

    The divergence is 11, so the flux is the volume of the ball, 43π⋅8\tfrac{4}{3}\pi \cdot 8.

  7. Find the outward flux of F=(x2, 0, 0)\mathbf{F} = (x^2,\ 0,\ 0) through the surface of the unit cube [0,1]3[0, 1]^3, and check it on the faces.

    Answer

    11

    Full solution

    ∭2x dV=1\iiint 2x\,dV = 1. On the faces, only x=1x = 1 contributes, with F⋅n=1\mathbf{F} \cdot \mathbf{n} = 1 over an area of 11; at x=0x = 0 the field is 0\mathbf{0}.

  8. Use the divergence theorem to find the upward flux of F=(x, y, z)\mathbf{F} = (x,\ y,\ z) through the upper unit hemisphere alone.

    Hint

    Close the hemisphere with the unit disk in the xyxy-plane.

    Answer

    2π2\pi

    Full solution

    The half ball has volume 2π3\tfrac{2\pi}{3}, so the total outward flux is 3⋅2π3=2π3 \cdot \tfrac{2\pi}{3} = 2\pi. On the disk, the outward normal is (0,0,−1)(0, 0, -1) and F⋅n=−z=0\mathbf{F} \cdot \mathbf{n} = -z = 0. So the hemisphere carries all of it, 2π2\pi.

  9. A student computes the flux of F=(x,y,z)ρ3\mathbf{F} = \tfrac{(x, y, z)}{\rho^3} through the unit sphere as ∭E0 dV=0\iiint_E 0\,dV = 0. What went wrong?

    Answer

    The field is undefined at the origin, inside the sphere; the flux is 4π4\pi.

    Full solution

    The theorem needs continuous partial derivatives throughout the solid. As Example 4 shows, all of the flux comes from the singular point at the center, so the answer is 4π4\pi.

Frequently asked questions

What does the divergence theorem say?

If E is a solid region whose boundary surface S is oriented outward, and F has continuous partial derivatives, then the flux of F through S equals the triple integral of div F over E.

Why is the divergence theorem true?

Divergence is outflow per unit volume, so a tiny box contributes about div F times its volume. Adding the boxes, the flux through each shared inner face counts once out of one box and once into its neighbor, so only the outer surface remains.

When should you use the divergence theorem?

For the flux through a closed surface, especially one made of several pieces or a field whose divergence is simple, such as a constant.

What is Gauss's law?

For the field (x, y, z)/|(x, y, z)|³, the flux through any closed surface around the origin is 4π, and through any closed surface not around the origin it is 0. Electric fields of point charges obey this law.

How does the divergence theorem relate to the other big theorems?

It is the three-dimensional member of a family: the integral of a derivative over a region equals an integral of the original over the region's boundary. The fundamental theorem of calculus, the fundamental theorem for line integrals, Green's theorem and Stokes' theorem are the others.