Introduction

We have already defined divergence in 3D:

The scalar field describes the rate of 3D expansion of at each point in space. One can show this by integrating a vector integral across a small sphere of radius , dividing by the volume of this sphere, and then taking the limit .

The divergence theorem relates the 3D integral of over the interior of a region of space to the vector surface integral of over the boundary of the same region:

Divergence theorem

For a 3D region with boundary , we have:

As for its 2D version, this theorem says that when the elements of local expansion times volume, quantified as , are added up across the full interior of , the result is equal to the total flux exiting across its boundary .

As before, to express the logic behind this theorem, one first divides the region into small cubes, adds the expansion elements for each cube, and takes the limit as the cube size goes to zero. Flux across an internal face of a cube corresponds to flux exiting one cube and simultaneously flux entering another cube, so internal cancellation occurs. Only flux exiting the boundary (crossing an external face) is not cancelled and thus contributes to the final result.