The divergence theorem, also known as Gauss's theorem or Ostrogradsky's theorem, relates the flow (that is, flux) of a vector field through a surface to the behavior of the vector field inside the surface.
More precisely, the divergence theorem states that the outward flux of a vector field through a closed surface is equal to the volume integral of the divergence over the region inside the surface. Intuitively, it states that the sum of all sources minus the sum of all sinks gives the net flow out of a region. The divergence theorem is an important result for the mathematics of engineering, in particular for electrostatics and fluid dynamics.
In physics and engineering, the divergence theorem is usually applied in three dimensions. However, it generalizes to any number of dimensions. In one dimension, it is equivalent to the fundamental theorem of calculus. The theorem is a special case of the generalized Stokes' theorem.
Theorem
Suppose
The left side is a volume integral over the volume
The Divergence Theorem
The divergence theorem can be used to calculate a flux through a closed surface that fully encloses a volume, like any of the surfaces on the left. It can not directly be used to calculate the flux through surfaces with boundaries, like those on the right. (Surfaces are blue, boundaries are red.)
Example
The first equation of the Maxwell's equations is often written as
The surface integral on the right hand side (RHS) becomes:
Combining RHS and LHS, we get:
This is simply the electric field for the Coulomb force.