In vector calculus, the divergence theorem, also known as Gauss's theorem or Ostrogradsky's theorem, is a theorem relating the flux of a vector field through a closed surface to the divergence of the field in the volume enclosed.

More precisely, the divergence theorem states that the surface integral of a vector field over a closed surface, which is called the "flux" through the surface, is equal to the volume integral of the divergence over the region enclosed by the surface. Intuitively, it states that "the sum of all sources of the field in a region (with sinks regarded as negative sources) gives the net flux out of the region".

The divergence theorem is an important result for the mathematics of physics and engineering, particularly in electrostatics and fluid dynamics. In these fields, it 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. In two dimensions, it is equivalent to Green's theorem.

Explanation using liquid flow

Vector fields are often illustrated using the example of the velocity field of a fluid, such as a gas or liquid. A moving liquid has a velocity—a speed and a direction—at each point, which can be represented by a vector, so that the velocity of the liquid at any moment forms a vector field. Consider a closed surface S inside a body of liquid, enclosing a volume of liquid. The flux of liquid out of the volume at any time is equal to the volume rate of fluid crossing this surface, i.e., the surface integral of the velocity over the surface.

Under the assumption of an incompressible fluid, the amount of liquid inside a closed volume is constant; if there are no sources or sinks inside the volume then the flux of liquid out of S is zero. If the liquid is moving, it may flow into the volume at some points on the surface S and out of the volume at other points, but the amounts flowing in and out at any moment are equal, so the net flux of liquid out of the volume is zero.

However, if a source of liquid is inside the closed surface, such as a pipe through which liquid is introduced, the additional liquid will exert pressure on the surrounding liquid, causing an outward flow in all directions. This will cause a net outward flow through the surface S. The flux outward through S equals the volume rate of flow of fluid into S from the pipe. Similarly if there is a sink or drain inside S, such as a pipe which drains the liquid off, the external pressure of the liquid will cause a velocity throughout the liquid directed inward toward the location of the drain. The volume rate of flow of liquid inward through the surface S equals the rate of liquid removed by the sink.

If there are multiple sources and sinks of liquid inside S, the flux through the surface can be calculated by adding up the volume rate of liquid added by the sources and subtracting the rate of liquid drained off by the sinks. The volume rate of flow of liquid through a source or sink (with the flow through a sink given a negative sign) is equal to the divergence of the velocity field at the pipe mouth, so adding up (integrating) the divergence of the liquid throughout the volume enclosed by S equals the volume rate of flux through S. This is the divergence theorem.

The divergence theorem is employed in any conservation law which states that the total volume of all sinks and sources, that is the volume integral of the divergence, is equal to the net flow across the volume's boundary.

Mathematical statement

Suppose is a subset of <math>\mathbb{R}^n</math> (in the case of represents a volume in three-dimensional space) which is compact and has a piecewise smooth boundary (also indicated with <math>\partial V = S</math>). If is a continuously differentiable vector field defined on a neighborhood of , then:

:)\,\mathrm{d}S .</math>

The left side is a volume integral over the volume , and the right side is the surface integral over the boundary of the volume . The closed, measurable set <math>\partial V</math> is oriented by outward-pointing normals, and <math>\mathbf{\hat{n</math> is the outward pointing unit normal at almost each point on the boundary <math>\partial V</math>. (<math>\mathrm{d} \mathbf{S}</math> may be used as a shorthand for <math>\mathbf{n} \mathrm{d} S</math>.) In terms of the intuitive description above, the left-hand side of the equation represents the total of the sources in the volume , and the right-hand side represents the total flow across the boundary .

Informal derivation

The divergence theorem follows from the fact that if a volume is partitioned into separate parts, the flux out of the original volume is equal to the algebraic sum of the flux out of each component volume. This is true despite the fact that the new subvolumes have surfaces that were not part of the original volume's surface, because these surfaces are just partitions between two of the subvolumes and the flux through them just passes from one volume to the other and so cancels out when the flux out of the subvolumes is summed.

thumb|upright=2|A volume divided into two subvolumes. At right the two subvolumes are separated to show the flux out of the different surfaces.

See the diagram. A closed, bounded volume is divided into two volumes and by a surface <span style="color:green;">(green)</span>. The flux out of each component region is equal to the sum of the flux through its two faces, so the sum of the flux out of the two parts is

:<math>\Phi(V_\text{1}) + \Phi(V_\text{2}) = \Phi_\text{1} + \Phi_\text{31} + \Phi_\text{2} + \Phi_\text{32}</math>

where and are the flux out of surfaces and , is the flux through out of volume 1, and is the flux through out of volume 2. The point is that surface is part of the surface of both volumes. The "outward" direction of the normal vector <math>\mathbf{\hat n}</math> is opposite for each volume, so the flux out of one through is equal to the negative of the flux out of the other so these two fluxes cancel in the sum.

:<math>\Phi_\text{31} = \iint_{S_3} \mathbf{F} \cdot \mathbf{\hat n} \; \mathrm{d}S = -\iint_{S_3} \mathbf{F} \cdot (-\mathbf{\hat n}) \; \mathrm{d}S = -\Phi_\text{32}</math>

Therefore:

:<math>\Phi(V_\text{1}) + \Phi(V_\text{2}) = \Phi_\text{1} + \Phi_\text{2}</math>

Since the union of surfaces and is

:<math>\Phi(V_\text{1}) + \Phi(V_\text{2}) = \Phi(V)</math>

thumb|upright=2|The volume can be divided into any number of subvolumes and the flux out of V is equal to the sum of the flux out of each subvolume, because the flux through the <span style="color:green;">green</span> surfaces cancels out in the sum. In (b) the volumes are shown separated slightly, illustrating that each green partition is part of the boundary of two adjacent volumes

This principle applies to a volume divided into any number of parts, as shown in the diagram.

\int_{-\infty}^{\infty}u_{x_i}(x)\,dx_i\,dx' = 0</math> by the fundamental theorem of calculus, and <math>\int_{\partial \Omega}u\nu_i\,dS = 0</math> since <math>u</math> vanishes on a neighborhood of <math>\partial \Omega</math>. Thus the theorem holds for <math>u</math> with compact support in <math>\Omega</math>. Thus we have reduced to the case where <math>u</math> has compact support in some <math>U_j</math>.

| 3 = So assume <math>u</math> has compact support in some <math>U_j</math>. The last step now is to show that the theorem is true by direct computation. Change notation to <math>U = U_j</math>, and bring in the notation from (2) used to describe <math>U</math>. Note that this means that we have rotated and translated <math>\Omega</math>. This is a valid reduction since the theorem is invariant under rotations and translations of coordinates. Since <math>u(x) = 0</math> for <math>|x'| \geq r</math> and for <math>|x_n - g(x')| \geq h</math>, we have for each <math>i \in \{1, \dots, n\}</math> that

<math display="block">

\begin{align}

\int_{\Omega}u_{x_i}\,dV &= \int_{|x'| < r}\int_{g(x') - h}^{g(x')}u_{x_i}(x', x_n)\,dx_n\,dx' \\

&= \int_{\mathbb{R}^{n - 1\int_{-\infty}^{g(x')}u_{x_i}(x', x_n)\,dx_n\,dx'.

\end{align}

</math>

For <math>i = n</math> we have by the fundamental theorem of calculus that

<math display="block">\int_{\mathbb{R}^{n - 1\int_{-\infty}^{g(x')}u_{x_n}(x', x_n)\,dx_n\,dx' = \int_{\mathbb{R}^{n - 1u(x', g(x'))\,dx'.</math>

Now fix <math>i \in \{1, \dots, n - 1\}</math>. Note that

<math display="block">\int_{\mathbb{R}^{n - 1\int_{-\infty}^{g(x')}u_{x_i}(x', x_n)\,dx_n\,dx' = \int_{\mathbb{R}^{n - 1\int_{-\infty}^{0}u_{x_i}(x', g(x') + s)\,ds\,dx'</math>

Define <math>v : \mathbb{R}^{n} \to \mathbb{R}</math> by <math>v(x', s) = u(x', g(x') + s)</math>. By the chain rule,

<math display="block">v_{x_i}(x', s) = u_{x_i}(x', g(x') + s) + u_{x_n}(x', g(x') + s)g_{x_i}(x').</math>

But since <math>v</math> has compact support, we can integrate out <math>dx_i</math> first to deduce that

<math display="block">\int_{\mathbb{R}^{n - 1\int_{-\infty}^{0}v_{x_i}(x', s)\,ds\,dx' = 0.</math>

Thus

<math display="block">

\begin{align}

\int_{\mathbb{R}^{n - 1\int_{-\infty}^{0}u_{x_i}(x', g(x') + s)\,ds\,dx' &= \int_{\mathbb{R}^{n - 1\int_{-\infty}^{0}-u_{x_n}(x', g(x') + s)g_{x_i}(x')\,ds\,dx' \\

&= \int_{\mathbb{R}^{n - 1-u(x', g(x'))g_{x_i}(x')\,dx'.

\end{align}

</math>

In summary, with <math>\nabla u = (u_{x_1}, \dots, u_{x_n})</math> we have

<math display="block">\int_{\Omega}\nabla u\,dV = \int_{\mathbb{R}^{n - 1\int_{-\infty}^{g(x')}\nabla u\,dV = \int_{\mathbb{R}^{n - 1u(x', g(x'))(-\nabla g(x'), 1)\,dx'.</math>

Recall that the outward unit normal to the graph <math>\Gamma</math> of <math>g</math> at a point <math>(x', g(x')) \in \Gamma</math> is <math>\nu(x', g(x')) = \frac{1}{\sqrt{1 + |\nabla g(x')|^2(-\nabla g(x'), 1)</math> and that the surface element <math>dS</math> is given by <math display="inline">dS = \sqrt{1 + |\nabla g(x')|^2}\,dx'</math>. Thus

<math display="block">\int_{\Omega}\nabla u\,dV = \int_{\partial \Omega}u\nu\,dS.</math>

This completes the proof.

For compact Riemannian manifolds with boundary

We are going to prove the following:

Proof of Theorem.

We use the Einstein summation convention. By using a partition of unity, we may assume that <math>u</math> and <math>X</math> have compact support in a coordinate patch <math>O \subset \overline{\Omega}</math>. First consider the case where the patch is disjoint from <math>\partial \Omega</math>. Then <math>O</math> is identified with an open subset of <math>\mathbb{R}^n</math> and integration by parts produces no boundary terms:

<math display="block">

\begin{align}

(\operatorname{grad} u, X) &= \int_O \langle \operatorname{grad} u, X \rangle \sqrt g \, dx \\

&= \int_O \partial_j u X^j \sqrt g\,dx \\[5pt]

&= -\int_O u \partial_j \left(\sqrt g X^j\right)\,dx \\[5pt]

&= -\int_O u \frac{1}{\sqrt g}\partial_j \left(\sqrt g X^j\right)\sqrt g \, dx \\[5pt]

&= \left(u, -\frac{1}{\sqrt g}\partial_j \left(\sqrt g X^j \right)\right) \\[5pt]

&= (u, -\operatorname{div} X).

\end{align}

</math>

In the last equality we used the Voss–Weyl coordinate formula for the divergence, although the preceding identity could be used to define <math>-\operatorname{div}</math> as the formal adjoint of <math>\operatorname{grad}</math>. Now suppose <math>O</math> intersects <math>\partial \Omega</math>. Then <math>O</math> is identified with an open set in <math>\mathbb{R}_{+}^n = \{x \in \mathbb{R}^n : x_n \geq 0\}</math>. We zero extend <math>u</math> and <math>X</math> to <math>\mathbb{R}_+^n</math> and perform integration by parts to obtain

<math display="block">

\begin{align}

(\operatorname{grad} u, X) &= \int_O \langle \operatorname{grad} u, X \rangle \sqrt g \,dx \\

&= \int_{\mathbb{R}_+^n}\partial_j u X^j \sqrt g \, dx \\

&= (u, -\operatorname{div} X) - \int_{\mathbb{R}^{n - 1u(x', 0)X^n(x', 0)\sqrt{g(x', 0)} \, dx',

\end{align}

</math>

where <math>dx' = dx_1 \cdots dx_{n - 1}</math>.

By a variant of the straightening theorem for vector fields, we may choose <math>O</math> so that <math>\frac{\partial}{\partial x_n}</math> is the inward unit normal <math>-N</math> at <math>\partial \Omega</math>. In this case <math>\sqrt{g(x', 0)}\,dx' = \sqrt{g_{\partial \Omega}(x')} \, dx' = dS</math> is the volume element on <math>\partial \Omega</math> and the above formula reads

<math display="block">

(\operatorname{grad} u, X) = (u, -\operatorname{div} X) + \int_{\partial \Omega} u\langle X, N \rangle \,dS.

</math>

This completes the proof.

Corollaries

By replacing in the divergence theorem with specific forms, other useful identities can be derived (cf. vector identities).

  • With <math>\mathbf{F}\rightarrow \mathbf{F}g</math> for a scalar function and a vector field ,

::

:A special case of this is <math>\mathbf{F} = \nabla f</math>, in which case the theorem is the basis for Green's identities.

  • With <math>\mathbf{F}\rightarrow \mathbf{F}\times \mathbf{G}</math> for two vector fields and , where <math>\times</math> denotes a cross product,

::

  • With <math>\mathbf{F}\rightarrow \mathbf{F}\cdot \mathbf{G}</math> for two vector fields and , where <math>\cdot </math> denotes a dot product,

::

  • With <math>\mathbf{F}\rightarrow f\mathbf{c}</math> for a scalar function and vector field c:

::

:The last term on the right vanishes for constant <math>\mathbf{c}</math> or any divergence free (solenoidal) vector field, e.g. Incompressible flows without sources or sinks such as phase change or chemical reactions etc. In particular, taking <math>\mathbf{c}</math> to be constant:

::

  • With <math>\mathbf{F}\rightarrow \mathbf{c}\times\mathbf{F}</math> for vector field and constant vector c:

Inverse-square laws

Any inverse-square law can instead be written in a Gauss's law-type form (with a differential and integral form, as described above). Two examples are Gauss's law (in electrostatics), which follows from the inverse-square Coulomb's law, and Gauss's law for gravity, which follows from the inverse-square Newton's law of universal gravitation. The derivation of the Gauss's law-type equation from the inverse-square formulation or vice versa is exactly the same in both cases; see either of those articles for details. He discovered the divergence theorem in 1762.

Carl Friedrich Gauss was also using surface integrals while working on the gravitational attraction of an elliptical spheroid in 1813, when he proved special cases of the divergence theorem. But it was Mikhail Ostrogradsky, who gave the first proof of the general theorem, in 1826, as part of his investigation of heat flow. Special cases were proven by George Green in 1828 in An Essay on the Application of Mathematical Analysis to the Theories of Electricity and Magnetism,

:{\partial x_{i_q \, \mathrm{d}V=</math>

| intsubscpt = <math>\scriptstyle S</math>

| integrand = <math>T_{i_1i_2\cdots i_q\cdots i_n}n_{i_q}\, \mathrm{d}S .</math>

where on each side, tensor contraction occurs for at least one index. This form of the theorem is still in 3d, each index takes values 1, 2, and 3. It can be generalized further still to higher (or lower) dimensions (for example to 4d spacetime in general relativity).

See also

  • Kelvin–Stokes theorem
  • Generalized Stokes theorem
  • Differential form

References

  • Differential Operators and the Divergence Theorem at MathPages
  • The Divergence (Gauss) Theorem by Nick Bykov, Wolfram Demonstrations Project.
  • – This article was originally based on the GFDL article from PlanetMath at https://web.archive.org/web/20021029094728/http://planetmath.org/encyclopedia/Divergence.html