# Divergence theorem

The **divergence theorem** (also called Gauss's theorem or Gauss-Ostrogradsky theorem) is a theorem which relates the flux of a vector field through a closed surface to the vector field inside the surface. The theorem states that the outward flux of a vector field through a closed surface is equal to the triple integral of the divergence of the vector field inside the surface.

What this theorem actually states is the physical fact that in the absence of the creation or destruction of matter, the density within a region of space can change only by having it flow into or away from the region through its boundary.

The theorem is very applicable in different areas of physics, among others electrostatics and fluid dynamics. Another very important application of the theorem is that several physical laws can be written in both differential and integral form, see, for instance, Gauss' law for an application.

## Mathematical statement

Let <math>V</math> be a compact volume with a piecewise smooth boundary <math>\partial V</math>. If <math>\mathbf{F}</math> is a continuously differentiable vector field defined in a neighbourhood of <math>V</math>, then

- <math >\iiint\limits_V \nabla \cdot \mathbf{F} \, d V =

\iint\limits_{\partial V}\mathbf{F} \cdot d\mathbf{S} </math>

where <math>d\mathbf{S}</math> is defined by <math>d\mathbf{S}=\mathbf{n} \, dS</math> and <math>\mathbf{n}</math> is the outward-pointing unit normal vector field.

## Corollaries

- By applying the divergence theorem to the cross product of a vector field <math>\mathbf{F}</math> and a nonzero constant vector, one can show that

- <math >\iiint\limits_V \nabla \times \mathbf{F} \, d V =

\iint\limits_{\partial V}d\mathbf{S}\times \mathbf{F} </math>

- By applying the divergence theorem to the product of a scalar function <math>f</math> and a nonzero vector, one can show that

- <math >\iiint\limits_V \nabla f \, d V =

\iint\limits_{\partial V} f\,d\mathbf{S}</math>

- By applying the divergence theorem to the product of a scalar function <math>g</math> and a vector field <math>\mathbf{F}</math>, one gets the following result

- <math >\iiint\limits_V (\mathbf{F}\cdot(\nabla g) + g(\nabla\cdot \mathbf{F})) \, d V =

\iint\limits_{\partial V}g\mathbf{F}\cdot d\mathbf{S}</math>

- If the vector field <math>\mathbf{F}</math> can be expressed as a gradient of a scalar function <math>f</math>, that is <math>\mathbf{F}=\nabla f</math>, then the above equation is the basis for Green's Identities.

## Physical interpretation

The divergence theorem can be interpreted as a conservation law, which states that the volume integral over all the sources and sinks is equal to the net flow through the volume's boundary.

This is easily shown by a simple physical example. Imagine an incompressible fluid flow (i.e. a given mass occupies a fixed volume) with velocity <math>\mathbf{F}</math>. Then the net flow through the boundary of the volume per unit time, is equal to the total amount of sources minus the total amount of sinks in the volume. But this sum of sources and sinks is just the volume integral of the divergence of <math>\mathbf{F}</math>.

## Extension

The divergence theorem can be generalized. Firstly, the domain *V* does not have to be three-dimensional, but it can have any dimension. Secondly, the conditions on the domain and the integrand can be weakened slightly. One possible formulation is as follows. Suppose that the domain *V* ⊂ **R**^{n} has a Lipschitz boundary ∂*V* and that the vector field <math>\mathbf{F}</math> is in the Sobolev space <math>H_1^1(V)^n</math>, meaning that its weak derivative is *L*_{1}-integrable. Then the conclusion of the divergence theorem still holds.