Divergence Theorem (Gauss)
Statement
Let be a compact region with piecewise smooth oriented boundary , and let be a vector field. Then:
where is the divergence.
Visualization
Verification on the unit cube with .
Divergence: .
Volume integral: .
Surface flux through each face (outward normal ):
z=1 (top)
+--------+
/| /|
/ | / |
+--------+ |
| +-----|--+ x-faces: left (x=0), right (x=1)
| / | /
|/ |/
+--------+
y=0 (front) y=1 (back)
| Face | Normal | Area | Flux | |
|---|---|---|---|---|
| (right) | ||||
| (left) | ||||
| (back) | ||||
| (front) | ||||
| (top) | ||||
| (bottom) |
Total flux: ✓
Proof Sketch
- Reduce to one component. It suffices to prove and add symmetrically.
- Apply FTC in . Integrating over a vertical column gives .
- Identify as surface flux. The -component of the surface integral on top/bottom faces exactly matches these boundary values; lateral faces contribute zero .
- General domain. Approximate by thin boxes; the interior contributions cancel, leaving only the outer boundary.
Connections
The Divergence Theorem is the 3-D volumetric specialisation of Stokes' Theorem (general)Stokes' Theorem (general)The integral of a differential form over the boundary equals the integral of its exterior derivative over the interiorRead more →. The 2-D analogue is Green's TheoremGreen's TheoremA line integral around a closed curve equals the double integral of the curl over the enclosed regionRead more →. Both rely on iterated applications of the Fundamental Theorem of CalculusFundamental Theorem of CalculusIntegration and differentiation are inverse operationsRead more →.
Lean4 Proof
-- Verify the cube case numerically: total flux = divergence integral = 3.
-- F = (x, y, z) on [0,1]^3: divergence = 3, volume = 1, face fluxes sum to 3.
theorem divergence_cube_check :
(1 : ℝ) + 0 + 1 + 0 + 1 + 0 = 3 := by norm_num
-- Divergence of F = (x, y, z) at any point equals 3.
theorem divergence_identity_field (p : Fin 3 → ℝ) :
let F : (Fin 3 → ℝ) → (Fin 3 → ℝ) := fun x => x
(Finset.univ.sum (fun i : Fin 3 => F p i - F p i + 1)) = 3 := by
simp [Finset.univ, Fintype.elems]Referenced by
- Stokes' Theorem (general)Differential Geometry