More precisely, the divergence theorem states that thesurface integral of a vector field over a closed surface, which is called the "flux" through the surface, is equal to thevolume 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".
Vector fields are often illustrated using the example of thevelocity field of afluid, 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 avector, so that the velocity of the liquid at any moment forms a vector field. Consider an imaginary closed surfaceS inside a body of liquid, enclosing a volume of liquid. Theflux of liquid out of the volume at any time is equal to the volume rate of fluid crossing this surface, i.e., thesurface integral of the velocity over the surface.
Since liquids are incompressible, the amount of liquid inside a closed volume is constant; if there are nosources or sinks inside the volume then the flux of liquid out ofS is zero. If the liquid is moving, it may flow into the volume at some points on the surfaceS and out of the volume at other points, but the amounts flowing in and out at any moment are equal, so thenet flux of liquid out of the volume is zero.
However if asource 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 surfaceS. The flux outward throughS equals the volume rate of flow of fluid intoS from the pipe. Similarly if there is asink or drain insideS, 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 surfaceS equals the rate of liquid removed by the sink.
If there are multiple sources and sinks of liquid insideS, 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 thedivergence of the velocity field at the pipe mouth, so adding up (integrating) the divergence of the liquid throughout the volume enclosed byS equals the volume rate of flux throughS. This is the divergence theorem.[2]
The divergence theorem is employed in anyconservation 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]
The left side is avolume integral over the volumeV, and the right side is thesurface integral over the boundary of the volumeV. The closed, measurable set is oriented by outward-pointingnormals, and is the outward pointing unit normal at almost each point on the boundary. ( may be used as a shorthand for.) In terms of the intuitive description above, the left-hand side of the equation represents the total of the sources in the volumeV, and the right-hand side represents the total flow across the boundaryS.
The divergence theorem follows from the fact that if a volumeV is partitioned into separate parts, theflux out of the original volume is equal to the algebraic sum of the flux out of each component volume.[6][7] 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.
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 volumeV is divided into two volumesV1 andV2 by a surfaceS3(green). The fluxΦ(Vi) out of each component regionVi 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Φ1 andΦ2 are the flux out of surfacesS1 andS2,Φ31 is the flux throughS3 out of volume 1, andΦ32 is the flux throughS3 out of volume 2. The point is that surfaceS3 is part of the surface of both volumes. The "outward" direction of thenormal vector is opposite for each volume, so the flux out of one throughS3 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 surfacesS1 andS2 isS
The volume can be divided into any number of subvolumes and the flux out ofV is equal to the sum of the flux out of each subvolume, because the flux through thegreen 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.[7] 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.
As the volume is subdivided into smaller parts, the ratio of the flux out of each volume to the volume approaches
The fluxΦ out of each volume is the surface integral of the vector fieldF(x) 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 areaS(Vi) approaches zero. However, from the definition ofdivergence, the ratio of flux to volume,, the part in parentheses below, does not in general vanish but approaches thedivergencedivF as the volume approaches zero.[7]
As long as the vector fieldF(x) has continuous derivatives, the sum above holds even in thelimit when the volume is divided into infinitely small increments
As approaches zero volume, it becomes the infinitesimaldV, the part in parentheses becomes the divergence, and the sum becomes avolume integral overV
Since this derivation is coordinate free, it shows that the divergence does not depend on the coordinates used.
Theorem—Let be open and bounded with boundary. If is on an open neighborhood of, that is,, then for each,where is the outward pointing unit normal vector to.Equivalently,
The first step is to reduce to the case where. Pick such that on. Note that and on. Hence it suffices to prove the theorem for. Hence we may assume that.
Let be arbitrary. The assumption that has boundary means that there is an open neighborhood of in such that is the graph of a function with lying on one side of this graph. More precisely, this means that after a translation and rotation of, there are and and a function, such that with the notation
it holds thatand for,
Since is compact, we can cover with finitely many neighborhoods of the above form. Note that is an open cover of. By using apartition of unity subordinate to this cover, it suffices to prove the theorem in the case where either has compactsupport in or has compact support in some. If has compact support in, then for all, by the fundamental theorem of calculus, and since vanishes on a neighborhood of. Thus the theorem holds for with compact support in. Thus we have reduced to the case where has compact support in some.
So assume has compact support in some. The last step now is to show that the theorem is true by direct computation. Change notation to, and bring in the notation from (2) used to describe. Note that this means that we have rotated and translated. This is a valid reduction since the theorem is invariant under rotations and translations of coordinates. Since for and for, we have for each thatFor we have by the fundamental theorem of calculus thatNow fix. Note thatDefine by. By the chain rule,But since has compact support, we can integrate out first to deduce thatThusIn summary, with we haveRecall that the outward unit normal to the graph of at a point is and that the surface element is given by. ThusThis completes the proof.
Theorem—Let be a compact manifold with boundary with metric tensor. Let denote the manifold interior of and let denote the manifold boundary of. Let denote inner products of functions and denote inner products of vectors. Suppose and is a vector field on. Thenwhere is the outward-pointing unit normal vector to.
Proof of Theorem.[9]We use the Einstein summation convention. By using a partition of unity, we may assume that and have compact support in a coordinate patch. First consider the case where the patch is disjoint from. Then is identified with an open subset of and integration by parts produces no boundary terms:In the last equality we used the Voss-Weyl coordinate formula for the divergence, although the preceding identity could be used to define as the formal adjoint of. Now suppose intersects. Then is identified with an open set in. We zero extend and to and perform integration by parts to obtainwhere.By a variant of thestraightening theorem for vector fields, we may choose so that is the inward unit normal at. In this case is the volume element on and the above formula readsThis completes the proof.
By replacingF in the divergence theorem with specific forms, other useful identities can be derived (cf.vector identities).[10]
With for a scalar functiong and a vector fieldF,
A special case of this is, in which case the theorem is the basis forGreen's identities.
With for two vector fieldsF andG, where denotes a cross product,
With for two vector fieldsF andG, where denotes adot product,
With for a scalar functionf and vector fieldc:[11]
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:
The vector field corresponding to the example shown. Vectors may point into or out of the sphere.The divergence theorem can be used to calculate a flux through aclosed surface that fully encloses a volume, like any of the surfaces on the left. It cannot directly be used to calculate the flux through surfaces with boundaries, like those on the right. (Surfaces are blue, boundaries are red.)
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:
Since the functiony is positive in one hemisphere ofW and negative in the other, in an equal and opposite way, its total integral overW is zero. The same is true forz:
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 areGauss's law (inelectrostatics),Gauss's law for magnetism, andGauss's law for gravity.
Continuity equations offer more examples of laws with both differential and integral forms, related to each other by the divergence theorem. Influid dynamics,electromagnetism,quantum mechanics,relativity theory, and a number of other fields, there arecontinuity 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 ofsources orsinks 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).[12]
Anyinverse-square law can instead be written in aGauss's law-type form (with a differential and integral form, as described above). Two examples areGauss's law (in electrostatics), which follows from the inverse-squareCoulomb's law, andGauss's law for gravity, which follows from the inverse-squareNewton'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.[12]
Joseph-Louis Lagrange introduced the notion of surface integrals in 1760 and again in more general terms in 1811, in the second edition of hisMécanique Analytique. Lagrange employed surface integrals in his work on fluid mechanics.[13] He discovered the divergence theorem in 1762.[14]
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.[15][13] He proved additional special cases in 1833 and 1839.[16] But it wasMikhail Ostrogradsky, who gave the first proof of the general theorem, in 1826, as part of his investigation of heat flow.[17] Special cases were proven byGeorge Green in 1828 inAn Essay on the Application of Mathematical Analysis to the Theories of Electricity and Magnetism,[18][16]Siméon Denis Poisson in 1824 in a paper on elasticity, andFrédéric Sarrus in 1828 in his work on floating bodies.[19][16]
One can use thegeneralised Stokes' theorem to equate then-dimensional volume integral of the divergence of a vector fieldF over a regionU to the(n − 1)-dimensional surface integral ofF over the boundary ofU:
This equation is also known as the divergence theorem.
suggestively, replacing the vector fieldF with a rank-n tensor fieldT, this can be generalized to:[20]
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 4dspacetime ingeneral relativity[21]).
^Benford, Frank A. (May 2007)."Notes on Vector Calculus"(PDF).Course materials for Math 105: Multivariable Calculus. Prof. Steven Miller's webpage, Williams College. Retrieved14 March 2022.
^abKatz, Victor (2009). "Chapter 22: Vector Analysis".A History of Mathematics: An Introduction. Addison-Wesley. pp. 808–9.ISBN978-0-321-38700-4.
^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: Gauthier-Villars, 1867), vol. 1, pages 151–316;on pages 263–265, Lagrange transforms triple integrals into double integrals using integration by parts.
^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),Историко-математические исследования (Istoriko-Matematicheskie Issledovaniya / Historical-Mathematical 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.
^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 onpages 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.