Fiveable

Calculus IV Unit 25 Review

QR code for Calculus IV practice questions

25.1 Statement and proof of the divergence theorem

25.1 Statement and proof of the divergence theorem

Written by the Fiveable Content Team • Last updated August 2025
Written by the Fiveable Content Team • Last updated August 2025
Calculus IV
Unit & Topic Study Guides

Vector Fields and Divergence

Vector Fields and Their Properties

A vector field assigns a vector to each point in some region of space. Think of it as a function F:R3R3\mathbf{F}: \mathbb{R}^3 \to \mathbb{R}^3 that takes a point and returns a vector at that point. Velocity fields in fluid flow, gravitational fields, and electric fields are all classic examples.

For the divergence theorem to apply, the vector field needs to be sufficiently well-behaved. Specifically, F\mathbf{F} must be continuously differentiable (C1C^1) on the region in question, meaning all its partial derivatives exist and are continuous.

Divergence as a Measure of Vector Field Flow

The divergence of a vector field F=(F1,F2,F3)\mathbf{F} = (F_1, F_2, F_3) is the scalar field:

F=F1x+F2y+F3z\nabla \cdot \mathbf{F} = \frac{\partial F_1}{\partial x} + \frac{\partial F_2}{\partial y} + \frac{\partial F_3}{\partial z}

Divergence measures the net rate of "expansion" or "outflow" of the field at a point:

  • Positive divergence at a point means the field is acting as a source there (fluid spreading outward)
  • Negative divergence means the field is acting as a sink (fluid converging inward)
  • Zero divergence everywhere means the field is solenoidal (incompressible flow, for instance)

A useful way to think about it: divergence is the infinitesimal flux per unit volume. That intuition is exactly what the divergence theorem formalizes.

Flux as the Flow of a Vector Field Through a Surface

Flux quantifies how much of a vector field passes through a given surface. It's computed by integrating the normal component of the field over the surface:

Flux=SFndS\text{Flux} = \iint_S \mathbf{F} \cdot \mathbf{n} \, dS

where n\mathbf{n} is the unit normal to the surface. The sign of the flux depends on the orientation you choose for n\mathbf{n}:

  • Positive flux means net flow in the direction of n\mathbf{n}
  • Negative flux means net flow opposite to n\mathbf{n}

For closed surfaces, the convention is always to take n\mathbf{n} pointing outward.

Integral Formulations

Vector Fields and Their Properties, Divergence and Curl · Calculus

Surface Integrals for Calculating Flux

To actually compute a surface integral, you parameterize the surface and convert everything into a double integral. Here's the process:

  1. Parameterize the surface SS using two parameters: r(u,v)\mathbf{r}(u, v) for (u,v)(u, v) in some domain DD.
  2. Compute the normal vector via the cross product: ru×rv\mathbf{r}_u \times \mathbf{r}_v.
  3. Check orientation. For a closed surface, ru×rv\mathbf{r}_u \times \mathbf{r}_v should point outward. If it doesn't, swap the order.
  4. Set up the integral:

SFndS=DF(r(u,v))(ru×rv)dudv\iint_S \mathbf{F} \cdot \mathbf{n} \, dS = \iint_D \mathbf{F}(\mathbf{r}(u,v)) \cdot (\mathbf{r}_u \times \mathbf{r}_v) \, du \, dv

Notice that ru×rv\|\mathbf{r}_u \times \mathbf{r}_v\| already accounts for the surface area element, so you don't divide by the magnitude here.

Volume Integrals for Calculating Total Divergence

A volume integral of the divergence sums up all the local source/sink contributions throughout a region VV:

VFdV\iiint_V \nabla \cdot \mathbf{F} \, dV

This is typically evaluated by choosing an appropriate coordinate system (Cartesian, cylindrical, or spherical) and setting up iterated integrals. The result represents the total net outward flux from the entire region, which is precisely the claim of the divergence theorem.

Closed Surfaces and Their Properties

A closed surface S=VS = \partial V is one that fully encloses a bounded volume VV with no boundary curve of its own (no edges, no holes). Spheres, cubes, ellipsoids, and tori are all closed surfaces.

For the divergence theorem, the enclosed region VV must be bounded, and the surface must be piecewise smooth. Piecewise smooth means the surface can have edges (like a cube does) as long as it's smooth on each piece. The outward unit normal n\mathbf{n} is defined everywhere except possibly along those edges, which is fine since edges have zero area.

Divergence Theorem

Vector Fields and Their Properties, Conservative Vector Fields · Calculus

Statement of the Divergence Theorem

Let VV be a bounded region in R3\mathbb{R}^3 with piecewise smooth boundary surface S=VS = \partial V, and let F\mathbf{F} be a C1C^1 vector field on an open set containing VV and SS. Then:

SFndS=VFdV\iint_S \mathbf{F} \cdot \mathbf{n} \, dS = \iiint_V \nabla \cdot \mathbf{F} \, dV

where n\mathbf{n} is the outward-pointing unit normal to SS.

In words: the total outward flux of F\mathbf{F} through the boundary equals the integral of the divergence of F\mathbf{F} over the enclosed volume.

Proof Outline

The standard proof works by reducing the theorem to three simpler identities and then handling each component of F\mathbf{F} separately.

Step 1: Decompose into components. Write F=(F1,F2,F3)\mathbf{F} = (F_1, F_2, F_3). It suffices to prove each of the three component identities independently:

SF1(nx)dS=VF1xdV\iint_S F_1 \, (n_x) \, dS = \iiint_V \frac{\partial F_1}{\partial x} \, dV

and similarly for F2F_2 with nyn_y and F3F_3 with nzn_z. Adding these three gives the full theorem.

Step 2: Prove one component identity (the F3F_3 case is standard). Assume the region VV is simple in the zz-direction, meaning it can be described as:

V={(x,y,z):(x,y)D,  g1(x,y)zg2(x,y)}V = \{(x, y, z) : (x, y) \in D, \; g_1(x, y) \le z \le g_2(x, y)\}

where DD is the projection of VV onto the xyxy-plane, and g1,g2g_1, g_2 are smooth functions.

Step 3: Evaluate the volume integral. By Fubini's theorem:

VF3zdV=D[g1(x,y)g2(x,y)F3zdz]dA\iiint_V \frac{\partial F_3}{\partial z} \, dV = \iint_D \left[\int_{g_1(x,y)}^{g_2(x,y)} \frac{\partial F_3}{\partial z} \, dz\right] dA

The inner integral evaluates by the Fundamental Theorem of Calculus:

=D[F3(x,y,g2(x,y))F3(x,y,g1(x,y))]dA= \iint_D \left[F_3(x, y, g_2(x,y)) - F_3(x, y, g_1(x,y))\right] dA

Step 4: Evaluate the surface integral. The boundary SS splits into three pieces: the top surface z=g2(x,y)z = g_2(x,y), the bottom surface z=g1(x,y)z = g_1(x,y), and possibly vertical side walls.

  • On the top surface, the outward normal points upward, and the surface integral contributes DF3(x,y,g2)dA\iint_D F_3(x, y, g_2) \, dA.
  • On the bottom surface, the outward normal points downward (note the sign flip), contributing DF3(x,y,g1)dA-\iint_D F_3(x, y, g_1) \, dA.
  • On the side walls, nz=0n_z = 0, so the F3F_3 component contributes nothing.

Adding these gives exactly the same expression from Step 3.

Step 5: Extend to general regions. For regions that aren't simple in all three coordinate directions simultaneously, decompose VV into finitely many subregions that are each simple. Apply the theorem to each subregion. When you sum the results, the surface integrals over shared internal faces cancel (the outward normals point in opposite directions on shared boundaries), leaving only the integral over the outer boundary SS.

The key ideas are: the Fundamental Theorem of Calculus handles each component, and cancellation of internal faces handles the extension to general regions. The divergence theorem is, at its core, a higher-dimensional generalization of the Fundamental Theorem of Calculus.

Outward Unit Normal Vector and Its Role

The outward unit normal n\mathbf{n} at each point of SS determines the orientation of the surface. Without a consistent choice of n\mathbf{n}, the flux integral is ambiguous.

  • For a sphere of radius RR, the outward normal is n=rR\mathbf{n} = \frac{\mathbf{r}}{R}, pointing radially outward.
  • For a cube, the outward normal on each face is the constant unit vector perpendicular to that face, pointing away from the interior.
  • For a surface given as z=g(x,y)z = g(x,y) (top boundary), the outward normal is ndS=(gx,gy,1)dA\mathbf{n} \, dS = (-g_x, -g_y, 1) \, dA when the outward direction is upward.

The convention that n\mathbf{n} points outward is what makes the two sides of the divergence theorem match. Reversing the orientation flips the sign of the flux integral.

Applications and Examples of the Divergence Theorem

Simplifying flux computations. Suppose you need the outward flux of F=(x3,y3,z3)\mathbf{F} = (x^3, y^3, z^3) through the unit sphere. Computing the surface integral directly requires parameterizing the sphere. Instead, compute:

F=3x2+3y2+3z2=3r2\nabla \cdot \mathbf{F} = 3x^2 + 3y^2 + 3z^2 = 3r^2

Then switch to spherical coordinates:

V3r2dV=02π0π013r2r2sinϕdrdϕdθ=3154π=12π5\iiint_V 3r^2 \, dV = \int_0^{2\pi}\int_0^{\pi}\int_0^1 3r^2 \cdot r^2 \sin\phi \, dr \, d\phi \, d\theta = 3 \cdot \frac{1}{5} \cdot 4\pi = \frac{12\pi}{5}

That's much cleaner than the surface integral would have been.

Going the other direction. Sometimes the volume integral of the divergence is hard, but the surface integral is easy. The theorem works both ways. If SS has a convenient geometry (a sphere, a cylinder), you might prefer to evaluate the surface side.

Gauss's Law in electrostatics. The divergence theorem gives the integral form of Gauss's law directly. If E\mathbf{E} is the electric field and ρ\rho is the charge density, then E=ρ/ϵ0\nabla \cdot \mathbf{E} = \rho / \epsilon_0, so:

SEndS=Vρϵ0dV=Qencϵ0\iint_S \mathbf{E} \cdot \mathbf{n} \, dS = \iiint_V \frac{\rho}{\epsilon_0} \, dV = \frac{Q_{\text{enc}}}{\epsilon_0}

Verifying consistency. If you compute both sides of the divergence theorem for a given F\mathbf{F} and region and get different answers, you've made an error somewhere. This is a useful check on your work.