The divergence theorem is a theorem of calculus relating the behavior of a vector field inside a region to its net outward flow through the region’s boundary. It states that the integral of the field’s divergence over a volume equals its outward flux through the enclosing surface. It is a higher-dimensional counterpart of the fundamental theorem of calculus and a central tool for connecting local equations with global balance laws. (ocw.mit.edu)
Mathematical statement
Let be a bounded solid region in three-dimensional Euclidean space, with a piecewise smooth boundary . Let
have continuously differentiable components on an open neighborhood of . If is the outward unit normal to the boundary, then
Here denotes the volume element and the surface-area element. The divergence is the scalar function
formed from the field’s partial derivatives. The boundary integral is a surface integral measuring signed normal flow. (openstax.org)
Orientation is essential: reversing the normal reverses the flux. The boundary must include every enclosing surface, including caps and the boundaries of cavities. On an internal cavity, “outward” means outward from , hence into the cavity rather than away from its center. Edges and corners are compatible with the piecewise smooth formulation; the normal need not exist at every boundary point. (openstax.org)
Local and global interpretation
Divergence measures local net outward flux per unit volume. Positive divergence indicates a local excess of outflow over inflow, while negative divergence indicates the reverse. For a sufficiently regular field, this interpretation can be expressed using shrinking balls :
The theorem aggregates these local contributions into the total flux through a finite region’s boundary. (ocw.mit.edu)
If throughout a region, its total outward boundary flux is zero. This does not require the field itself to vanish, nor does it require zero flux through each part of the boundary: outward flow through one part can balance inward flow through another. A circulating field such as
provides a simple example. (live.ocw.mit.edu)
Why the theorem holds
The elementary proof begins with a rectangular box
Integrating the first divergence term in the -direction gives
This is exactly the combined outward flux through the two faces perpendicular to the -axis. The subtraction reflects their opposite outward normals. The other two partial derivatives similarly account for the remaining four faces. Adding the three expressions establishes the theorem for the box. (ocw.mit.edu)
For a more general region, subdivision reveals the same mechanism. Each internal interface is counted twice, with opposite normals, so its two flux contributions cancel. Only the exterior boundary remains. A rigorous proof must also control the limiting subdivision and the approximation of curved boundaries; the box argument supplies the underlying cancellation principle. (ocw.mit.edu)
Examples and computational use
Radial field on a ball
For the position field
the divergence is . On a ball of radius ,
On its spherical boundary, , so . Direct surface integration therefore gives the same result:
More generally, this field’s outward flux through any admissible boundary is three times the enclosed volume. (ocw.mit.edu)
Replacing a difficult surface integral
The theorem can simplify a flux calculation when differentiation removes complicated terms. For example,
has divergence . Its outward flux through any admissible closed boundary is consequently
No parametrization of the boundary is needed. This illustrates the computational strategy of examining the divergence before attempting direct surface integration. (openstax.org)
Completing an open surface
The theorem does not apply directly to an open surface. If an additional surface closes a surface , with both oriented outward from the resulting solid, then
A curved surface can therefore be handled by adding a simple planar cap and subtracting its flux. The cap’s orientation must be determined from the enclosed region. (ocw.mit.edu)
Applications to conservation laws
The divergence theorem connects integral balance laws with differential equations. Suppose is a quantity per unit volume, its flux density, and its production rate per unit volume. For a fixed control volume , the balance law is
Under suitable regularity assumptions, applying the theorem gives
If the balance holds for every admissible control volume and the integrand is continuous, it implies the local continuity equation
The source-free version expresses local conservation. (maths.dur.ac.uk)
In fluid mechanics, setting and yields mass conservation. In electromagnetism, the theorem relates the integral and differential forms of Gauss’s law:
Here is electric charge density and is vacuum permittivity. Gauss’s law is a physical law; the divergence theorem is the mathematical identity connecting its two formulations. (maths.dur.ac.uk)
Relation to other integral theorems
In dimensions, the corresponding statement is
In one dimension, it becomes
with the endpoints carrying opposite boundary orientations. In two dimensions, it is the flux form of Green’s theorem. (ocw.mit.edu)
The divergence theorem and the classical curl form of Stokes’ theorem are distinct vector-calculus identities, but both are instances of the generalized Stokes theorem,
In the language of differential forms, a vector field in three dimensions determines the flux two-form
Its exterior derivative is
so the generalized boundary formula becomes precisely the divergence theorem. (maths.dur.ac.uk)
Applying the theorem to products of scalar functions and their gradients also produces Green’s identities, higher-dimensional integration-by-parts formulas used in boundary-value problems. For example, applying it to gives
where is the Laplace operator and . (sam.math.ethz.ch)
Singularities and limits of the classical statement
Smoothness throughout the enclosed region cannot be replaced by smoothness only on the boundary. Consider
Its divergence is zero away from the origin, yet its outward flux through every sphere centered at the origin is . There is no contradiction: the field is undefined and unbounded at the origin, so the classical theorem cannot be applied to a ball containing that point. (live.ocw.mit.edu)
Removing a small ball around the singularity makes the theorem applicable to the remaining shell. The outer flux is then balanced by an inner-boundary flux of . In a distributional formulation, the singular source is represented by
where is the Dirac delta distribution at the origin. This restores the local-to-global identity while explicitly accounting for the point source. (live.ocw.mit.edu)
Historical development
The theorem’s development involved several nineteenth-century formulations rather than a single introduction in modern notation. Work by George Green, Carl Friedrich Gauss, and Mikhail Ostrogradsky established Cartesian-coordinate versions; later work by Oliver Heaviside and Josiah Willard Gibbs contributed to its vector formulation. This history accounts for names such as Gauss’s theorem and Gauss–Ostrogradsky theorem. (sciencedirect.com)
References
- 3 Measures on Volumes and the Divergence Theoremocw.mit.edu
- 8 The Divergence Theorem — Calculus Volume 3openstax.org
- 02SC MattuckNotes: The Divergence Theorem Part 1ocw.mit.edu
- Chapter 15: Vector Calculuslive.ocw.mit.edu
- MITOCW: Divergence Theorem Lecture Transcriptocw.mit.edu
- 4 Integral Theorems — MATH 2031 Lecture Notesmaths.dur.ac.uk
- Green's Identitiessam.math.ethz.ch