Divergence theorem
In vector calculus, the divergence theorem, also known as Gauss's theorem or Ostrogradsky's theorem,[1] is a result that relates the flux of a vector field through a closed surface to the divergence of the field in the volume enclosed.
Part of a series of articles about  
Calculus  





Specialized 

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 inside 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, in particular in 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. 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 liquid. A moving liquid has a velocity, a speed and direction, at each point which can be represented by a vector, so the velocity of the liquid forms a vector field. Consider an imaginary closed surface S inside a liquid, enclosing a volume of liquid. The flux of liquid out of the volume is equal to the volume rate of fluid crossing this surface, the surface integral of the velocity over the surface.
Since 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 subtract 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.[2]
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.[3]
Mathematical statement
Suppose V is a subset of (in the case of n = 3, V represents a volume in threedimensional space) which is compact and has a piecewise smooth boundary S (also indicated with ∂V = S ). If F is a continuously differentiable vector field defined on a neighborhood of V, then we have:[4]
The left side is a volume integral over the volume V, the right side is the surface integral over the boundary of the volume V. The closed manifold ∂V is quite generally the boundary of V oriented by outwardpointing normals, and n is the outward pointing unit normal field of the boundary ∂V. (dS may be used as a shorthand for ndS.) The symbol within the two integrals stresses once more that ∂V is a closed surface. In terms of the intuitive description above, the lefthand side of the equation represents the total of the sources in the volume V, and the righthand side represents the total flow across the boundary S.
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 sum of the flux out of each component volume.[5] 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.
See the diagram. A closed, bounded volume is divided into two volumes and by a surface (green). 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
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 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. Therefore
Since the union of surfaces and is
This principle applies to a volume divided into any number of parts, as shown in the diagram.[5] Since the integral over each internal partition (green surfaces) appears with opposite signs in the flux of the two adjacent volumes they cancel out, and the only contribution to the flux is the integral over the external surfaces (grey). Since the external surfaces of all the component volumes equal the original surface.
The flux out of each volume is the surface integral of the vector field over the surface
The goal is to divide the original volume into infinitely many infinitesimal volumes. As the volume is divided into smaller and smaller parts, the surface integral on the right, the flux out of each subvolume, approaches zero because the surface area approaches zero. However, from the definition of divergence, the ratio of flux to volume, , the part in parentheses below, does not in general vanish but approaches the divergence as the volume approaches zero.[5]
As long as the vector field has continuous derivatives, the sum above holds even in the limit when the volume is divided into infinitely small increments
As approaches zero volume, it becomes the infinitesimal , the part in parentheses becomes the divergence, and the sum becomes a volume integral over
Since this derivation is coordinate free, it shows that the divergence does not depend on the coordinates used.
Corollaries
By replacing in the divergence theorem with specific forms, other useful identities can be derived (cf. vector identities).[4]
 With for a scalar function g and a vector field F,
 A special case of this is F = ∇ f , in which case the theorem is the basis for Green's identities.
 With for two vector fields F and G,
 With for a scalar function f and vector field c:[6]

 The last term on the right vanishes for constant 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 to be constant:
 With for vector field F and constant vector c:[6]
 By reordering the triple product on the right hand side and taking out the constant vector of the integral,
 Hence,
Example
Suppose we wish to evaluate
where S is the unit sphere defined by
and F is the vector field
The direct computation of this integral is quite difficult, but we can simplify the derivation of the result using the divergence theorem, because the divergence theorem says that the integral is equal to:
where W is the unit ball:
Since the function y is positive in one hemisphere of W and negative in the other, in an equal and opposite way, its total integral over W is zero. The same is true for z:
Therefore,
because the unit ball W has volume 4π/3.
Applications
Differential form and integral form of physical laws
As a result of the divergence theorem, a host of physical laws can be written in both a differential form (where one quantity is the divergence of another) and an integral form (where the flux of one quantity through a closed surface is equal to another quantity). Three examples are Gauss's law (in electrostatics), Gauss's law for magnetism, and Gauss's law for gravity.
Continuity equations
Continuity equations offer more examples of laws with both differential and integral forms, related to each other by the divergence theorem. In fluid dynamics, electromagnetism, quantum mechanics, relativity theory, and a number of other fields, there are continuity equations that describe the conservation of mass, momentum, energy, probability, or other quantities. Generically, these equations state that the divergence of the flow of the conserved quantity is equal to the distribution of sources or sinks of that quantity. The divergence theorem states that any such continuity equation can be written in a differential form (in terms of a divergence) and an integral form (in terms of a flux).[7]
Inversesquare laws
Any inversesquare law can instead be written in a Gauss's lawtype form (with a differential and integral form, as described above). Two examples are Gauss's law (in electrostatics), which follows from the inversesquare Coulomb's law, and Gauss's law for gravity, which follows from the inversesquare Newton's law of universal gravitation. The derivation of the Gauss's lawtype equation from the inversesquare formulation or vice versa is exactly the same in both cases; see either of those articles for details.[7]
History
The theorem was first discovered by Lagrange in 1762,[8] then later independently rediscovered by Gauss in 1813,[9] by Ostrogradsky, who also gave the first proof of the general theorem, in 1826,[10] by Green in 1828,[11] SimeonDenis Poisson in 1824 and Frédéric Sarrus in 1828.[12]
Examples
To verify the planar variant of the divergence theorem for a region R:
and the vector field:
The boundary of R is the unit circle, C, that can be represented parametrically by:
such that 0 ≤ s ≤ 2π where s units is the length arc from the point s = 0 to the point P on C. Then a vector equation of C is
At a point P on C:
Therefore,
Because M = 2y, ∂M/∂x = 0, and because N = 5x, ∂N/∂y = 0. Thus
Applied Example
Let's say we wanted to evaluate the flux of the following vector field defined by bounded by the following inequalities:
We know from the Divergence Theorem that :
We need to determine
The divergence of a three dimensional vector field, , is defined as
Thus, we can set up the following integrals:
Now that we have set up the integral, we can evaluate it.
Generalizations
Multiple dimensions
One can use the general Stokes' Theorem to equate the ndimensional volume integral of the divergence of a vector field F over a region U to the (n − 1)dimensional surface integral of F over the boundary of U:
This equation is also known as the divergence theorem.
When n = 2, this is equivalent to Green's theorem.
When n = 1, it reduces to the Fundamental theorem of calculus.
Tensor fields
Writing the theorem in Einstein notation:
suggestively, replacing the vector field F with a rankn tensor field T, this can be generalized to:[13]
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[14]).
See also
Notes
 Katz, Victor J. (1979). "The history of Stokes's theorem". Mathematics Magazine. 52 (3): 146–156. doi:10.2307/2690275. JSTOR 2690275. reprinted in Anderson, Marlow (2009). Who Gave You the Epsilon?: And Other Tales of Mathematical History. Mathematical Association of America. pp. 78–79. ISBN 9780883855690.
 R. G. Lerner; G. L. Trigg (1994). Encyclopaedia of Physics (2nd ed.). VHC. ISBN 9783527269549.
 Byron, Frederick; Fuller, Robert (1992), Mathematics of Classical and Quantum Physics, Dover Publications, p. 22, ISBN 9780486671642
 M. R. Spiegel; S. Lipschutz; D. Spellman (2009). Vector Analysis. Schaum’s Outlines (2nd ed.). USA: McGraw Hill. ISBN 9780071615457.
 Purcell, Edward M.; David J. Morin (2013). Electricity and Magnetism. Cambridge Univ. Press. pp. 56–58. ISBN 1107014026.
 MathWorld
 C.B. Parker (1994). McGraw Hill Encyclopaedia of Physics (2nd ed.). McGraw Hill. ISBN 9780070514003.
 In his 1762 paper on sound, Lagrange treats a special case of the divergence theorem: Lagrange (1762) "Nouvelles recherches sur la nature et la propagation du son" (New researches on the nature and propagation of sound), Miscellanea Taurinensia (also known as: Mélanges de Turin ), 2: 11 – 172. This article is reprinted as: "Nouvelles recherches sur la nature et la propagation du son" in: J.A. Serret, ed., Oeuvres de Lagrange, (Paris, France: GauthierVillars, 1867), vol. 1, pages 151–316; on pages 263–265, Lagrange transforms triple integrals into double integrals using integration by parts.
 C. F. Gauss (1813) "Theoria attractionis corporum sphaeroidicorum ellipticorum homogeneorum methodo nova tractata," Commentationes societatis regiae scientiarium Gottingensis recentiores, 2: 355–378; Gauss considered a special case of the theorem; see the 4th, 5th, and 6th pages of his article.
 Mikhail Ostragradsky presented his proof of the divergence theorem to the Paris Academy in 1826; however, his work was not published by the Academy. He returned to St. Petersburg, Russia, where in 1828–1829 he read the work that he'd done in France, to the St. Petersburg Academy, which published his work in abbreviated form in 1831.
 His proof of the divergence theorem – "Démonstration d'un théorème du calcul intégral" (Proof of a theorem in integral calculus) – which he had read to the Paris Academy on February 13, 1826, was translated, in 1965, into Russian together with another article by him. See: Юшкевич А.П. (Yushkevich A.P.) and Антропова В.И. (Antropov V.I.) (1965) "Неопубликованные работы М.В. Остроградского" (Unpublished works of MV Ostrogradskii), Историкоматематические исследования (IstorikoMatematicheskie Issledovaniya / HistoricalMathematical Studies), 16: 49–96; see the section titled: "Остроградский М.В. Доказательство одной теоремы интегрального исчисления" (Ostrogradskii M. V. Dokazatelstvo odnoy teoremy integralnogo ischislenia / Ostragradsky M.V. Proof of a theorem in integral calculus).
 M. Ostrogradsky (presented: November 5, 1828 ; published: 1831) "Première note sur la théorie de la chaleur" (First note on the theory of heat) Mémoires de l'Académie impériale des sciences de St. Pétersbourg, series 6, 1: 129–133; for an abbreviated version of his proof of the divergence theorem, see pages 130–131.
 Victor J. Katz (May1979) "The history of Stokes' theorem," Archived April 2, 2015, at the Wayback Machine Mathematics Magazine, 52(3): 146–156; for Ostragradsky's proof of the divergence theorem, see pages 147–148.
 George Green, An Essay on the Application of Mathematical Analysis to the Theories of Electricity and Magnetism (Nottingham, England: T. Wheelhouse, 1838). A form of the "divergence theorem" appears on pages 10–12.
 Other early investigators who used some form of the divergence theorem include:
 Poisson (presented: February 2, 1824 ; published: 1826) "Mémoire sur la théorie du magnétisme" (Memoir on the theory of magnetism), Mémoires de l'Académie des sciences de l'Institut de France, 5: 247–338; on pages 294–296, Poisson transforms a volume integral (which is used to evaluate a quantity Q) into a surface integral. To make this transformation, Poisson follows the same procedure that is used to prove the divergence theorem.
 Frédéric Sarrus (1828) "Mémoire sur les oscillations des corps flottans" (Memoir on the oscillations of floating bodies), Annales de mathématiques pures et appliquées (Nismes), 19: 185–211.
 K.F. Riley; M.P. Hobson; S.J. Bence (2010). Mathematical methods for physics and engineering. Cambridge University Press. ISBN 9780521861533.
 see for example:
J.A. Wheeler; C. Misner; K.S. Thorne (1973). Gravitation. W.H. Freeman & Co. pp. 85–86, §3.5. ISBN 9780716703440., and
R. Penrose (2007). The Road to Reality. Vintage books. ISBN 9780679776314.
External links
 Hazewinkel, Michiel, ed. (2001) [1994], "Ostrogradski formula", Encyclopedia of Mathematics, Springer Science+Business Media B.V. / Kluwer Academic Publishers, ISBN 9781556080104
 Differential Operators and the Divergence Theorem at MathPages
 The Divergence (Gauss) Theorem by Nick Bykov, Wolfram Demonstrations Project.
 Weisstein, Eric W. "Divergence Theorem". MathWorld. – This article was originally based on the GFDL article from PlanetMath at https://web.archive.org/web/20021029094728/http://planetmath.org/encyclopedia/Divergence.html