{
  "id": "divergence-theorem",
  "title": "Divergence Theorem",
  "lang": "en",
  "source_lang": "en",
  "summary": "The divergence theorem equates the outward flux through a region’s boundary with the integral of a vector field’s divergence over its interior.",
  "category": "mathematics",
  "subcategory": "analysis",
  "type": "concept",
  "aliases": [
    "Gauss’s theorem",
    "Gauss–Ostrogradsky theorem",
    "Ostrogradsky’s theorem",
    "Gauss–Green theorem"
  ],
  "generated_at": "2026-10-04",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/divergence-theorem/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/divergence-theorem/",
      "json": "https://aiwiki.page/zh/divergence-theorem.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "The divergence theorem is a theorem of calculus relating the behavior of a vector field inside a region to its net outward flow through the region’s boundary. It states that the integral of the field’s divergence over a volume equals its outward flux through the enclosing surface. It is a higher-dimensional counterpart of the fundamental theorem of calculus and a central tool for connecting local equations with global balance laws. (ocw.mit.edu)"
    },
    {
      "heading": "Mathematical statement",
      "text": "Let \\(V\\) be a bounded solid region in three-dimensional Euclidean space, with a piecewise smooth boundary \\(\\partial V\\). Let\n\n\\[\\mathbf F=(F_1,F_2,F_3)\\]\n\nhave continuously differentiable components on an open neighborhood of \\(\\overline V\\). If \\(\\mathbf n\\) is the outward unit normal to the boundary, then\n\n\\[\\boxed{ \\iiint_V \\nabla\\cdot\\mathbf F\\,dV = \\iint_{\\partial V}\\mathbf F\\cdot\\mathbf n\\,dS }.\\]\n\nHere \\(dV\\) denotes the volume element and \\(dS\\) the surface-area element. The divergence is the scalar function\n\n\\[\\nabla\\cdot\\mathbf F = \\frac{\\partial F_1}{\\partial x} + \\frac{\\partial F_2}{\\partial y} + \\frac{\\partial F_3}{\\partial z},\\]\n\nformed from the field’s partial derivatives. The boundary integral is a surface integral measuring signed normal flow. (openstax.org)\n\nOrientation is essential: reversing the normal reverses the flux. The boundary must include every enclosing surface, including caps and the boundaries of cavities. On an internal cavity, “outward” means outward from \\(V\\), hence into the cavity rather than away from its center. Edges and corners are compatible with the piecewise smooth formulation; the normal need not exist at every boundary point. (openstax.org)"
    },
    {
      "heading": "Local and global interpretation",
      "text": "Divergence measures local net outward flux per unit volume. Positive divergence indicates a local excess of outflow over inflow, while negative divergence indicates the reverse. For a sufficiently regular field, this interpretation can be expressed using shrinking balls \\(B_\\varepsilon(p)\\):\n\n\\[\\nabla\\cdot\\mathbf F(p) = \\lim_{\\varepsilon\\to0} \\frac{1}{\\operatorname{Vol}(B_\\varepsilon(p))} \\iint_{\\partial B_\\varepsilon(p)} \\mathbf F\\cdot\\mathbf n\\,dS.\\]\n\nThe theorem aggregates these local contributions into the total flux through a finite region’s boundary. (ocw.mit.edu)\n\nIf \\(\\nabla\\cdot\\mathbf F=0\\) throughout a region, its total outward boundary flux is zero. This does not require the field itself to vanish, nor does it require zero flux through each part of the boundary: outward flow through one part can balance inward flow through another. A circulating field such as\n\n\\[\\mathbf F=(-y,x,0)\\]\n\nprovides a simple example. (live.ocw.mit.edu)"
    },
    {
      "heading": "Why the theorem holds",
      "text": "The elementary proof begins with a rectangular box\n\n\\[V=[a,b]\\times[c,d]\\times[e,f].\\]\n\nIntegrating the first divergence term in the \\(x\\)-direction gives\n\n\\[\\iiint_V\\frac{\\partial F_1}{\\partial x}\\,dV = \\int_c^d\\int_e^f \\bigl[F_1(b,y,z)-F_1(a,y,z)\\bigr]\\,dz\\,dy.\\]\n\nThis is exactly the combined outward flux through the two faces perpendicular to the \\(x\\)-axis. The subtraction reflects their opposite outward normals. The other two partial derivatives similarly account for the remaining four faces. Adding the three expressions establishes the theorem for the box. (ocw.mit.edu)\n\nFor a more general region, subdivision reveals the same mechanism. Each internal interface is counted twice, with opposite normals, so its two flux contributions cancel. Only the exterior boundary remains. A rigorous proof must also control the limiting subdivision and the approximation of curved boundaries; the box argument supplies the underlying cancellation principle. (ocw.mit.edu)"
    },
    {
      "heading": "Examples and computational use",
      "text": "Radial field on a ball\n\nFor the position field\n\n\\[\\mathbf F(x,y,z)=(x,y,z),\\]\n\nthe divergence is \\(3\\). On a ball \\(B_R\\) of radius \\(R\\),\n\n\\[\\iiint_{B_R}\\nabla\\cdot\\mathbf F\\,dV = 3\\left(\\frac{4\\pi R^3}{3}\\right) = 4\\pi R^3.\\]\n\nOn its spherical boundary, \\(\\mathbf n=(x,y,z)/R\\), so \\(\\mathbf F\\cdot\\mathbf n=R\\). Direct surface integration therefore gives the same result:\n\n\\[R(4\\pi R^2)=4\\pi R^3.\\]\n\nMore generally, this field’s outward flux through any admissible boundary is three times the enclosed volume. (ocw.mit.edu)\n\nReplacing a difficult surface integral\n\nThe theorem can simplify a flux calculation when differentiation removes complicated terms. For example,\n\n\\[\\mathbf F= \\bigl(e^{y^2},\\,y+\\sin(z^2),\\,z-1\\bigr)\\]\n\nhas divergence \\(2\\). Its outward flux through any admissible closed boundary is consequently\n\n\\[2\\,\\operatorname{Vol}(V).\\]\n\nNo parametrization of the boundary is needed. This illustrates the computational strategy of examining the divergence before attempting direct surface integration. (openstax.org)\n\nCompleting an open surface\n\nThe theorem does not apply directly to an open surface. If an additional surface \\(C\\) closes a surface \\(S\\), with both oriented outward from the resulting solid, then\n\n\\[\\iint_S\\mathbf F\\cdot\\mathbf n\\,dS = \\iiint_V\\nabla\\cdot\\mathbf F\\,dV - \\iint_C\\mathbf F\\cdot\\mathbf n\\,dS.\\]\n\nA curved surface can therefore be handled by adding a simple planar cap and subtracting its flux. The cap’s orientation must be determined from the enclosed region. (ocw.mit.edu)"
    },
    {
      "heading": "Applications to conservation laws",
      "text": "The divergence theorem connects integral balance laws with differential equations. Suppose \\(u(\\mathbf x,t)\\) is a quantity per unit volume, \\(\\mathbf J\\) its flux density, and \\(s\\) its production rate per unit volume. For a fixed control volume \\(V\\), the balance law is\n\n\\[\\frac{d}{dt}\\int_Vu\\,dV = -\\int_{\\partial V}\\mathbf J\\cdot\\mathbf n\\,dS +\\int_Vs\\,dV.\\]\n\nUnder suitable regularity assumptions, applying the theorem gives\n\n\\[\\int_V \\left( \\frac{\\partial u}{\\partial t} +\\nabla\\cdot\\mathbf J-s \\right)dV=0.\\]\n\nIf the balance holds for every admissible control volume and the integrand is continuous, it implies the local continuity equation\n\n\\[\\frac{\\partial u}{\\partial t}+\\nabla\\cdot\\mathbf J=s.\\]\n\nThe source-free version expresses local conservation. (maths.dur.ac.uk)\n\nIn fluid mechanics, setting \\(u=\\rho\\) and \\(\\mathbf J=\\rho\\mathbf v\\) yields mass conservation. In electromagnetism, the theorem relates the integral and differential forms of Gauss’s law:\n\n\\[\\int_{\\partial V}\\mathbf E\\cdot\\mathbf n\\,dS = \\frac{1}{\\varepsilon_0}\\int_V\\rho_e\\,dV, \\qquad \\nabla\\cdot\\mathbf E=\\frac{\\rho_e}{\\varepsilon_0}.\\]\n\nHere \\(\\rho_e\\) is electric charge density and \\(\\varepsilon_0\\) is vacuum permittivity. Gauss’s law is a physical law; the divergence theorem is the mathematical identity connecting its two formulations. (maths.dur.ac.uk)"
    },
    {
      "heading": "Relation to other integral theorems",
      "text": "In \\(n\\) dimensions, the corresponding statement is\n\n\\[\\int_\\Omega \\sum_{i=1}^{n}\\frac{\\partial F_i}{\\partial x_i}\\,dx = \\int_{\\partial\\Omega}\\mathbf F\\cdot\\mathbf n\\,dS.\\]\n\nIn one dimension, it becomes\n\n\\[\\int_a^bF'(x)\\,dx=F(b)-F(a),\\]\n\nwith the endpoints carrying opposite boundary orientations. In two dimensions, it is the flux form of Green’s theorem. (ocw.mit.edu)\n\nThe divergence theorem and the classical curl form of Stokes’ theorem are distinct vector-calculus identities, but both are instances of the generalized Stokes theorem,\n\n\\[\\int_M d\\omega=\\int_{\\partial M}\\omega.\\]\n\nIn the language of differential forms, a vector field in three dimensions determines the flux two-form\n\n\\[\\omega = F_1\\,dy\\wedge dz + F_2\\,dz\\wedge dx + F_3\\,dx\\wedge dy.\\]\n\nIts exterior derivative is\n\n\\[d\\omega = (\\nabla\\cdot\\mathbf F)\\,dx\\wedge dy\\wedge dz,\\]\n\nso the generalized boundary formula becomes precisely the divergence theorem. (maths.dur.ac.uk)\n\nApplying the theorem to products of scalar functions and their gradients also produces Green’s identities, higher-dimensional integration-by-parts formulas used in boundary-value problems. For example, applying it to \\(\\mathbf F=u\\nabla v\\) gives\n\n\\[\\int_V \\left(\\nabla u\\cdot\\nabla v+u\\,\\Delta v\\right)dV = \\int_{\\partial V}u\\,\\frac{\\partial v}{\\partial n}\\,dS,\\]\n\nwhere \\(\\Delta\\) is the Laplace operator and \\(\\partial v/\\partial n=\\nabla v\\cdot\\mathbf n\\). (sam.math.ethz.ch)"
    },
    {
      "heading": "Singularities and limits of the classical statement",
      "text": "Smoothness throughout the enclosed region cannot be replaced by smoothness only on the boundary. Consider\n\n\\[\\mathbf F(\\mathbf x)=\\frac{\\mathbf x}{|\\mathbf x|^3}, \\qquad \\mathbf x\\ne0.\\]\n\nIts divergence is zero away from the origin, yet its outward flux through every sphere centered at the origin is \\(4\\pi\\). There is no contradiction: the field is undefined and unbounded at the origin, so the classical theorem cannot be applied to a ball containing that point. (live.ocw.mit.edu)\n\nRemoving a small ball around the singularity makes the theorem applicable to the remaining shell. The outer flux \\(4\\pi\\) is then balanced by an inner-boundary flux of \\(-4\\pi\\). In a distributional formulation, the singular source is represented by\n\n\\[\\nabla\\cdot\\frac{\\mathbf x}{|\\mathbf x|^3} = 4\\pi\\delta_0,\\]\n\nwhere \\(\\delta_0\\) is the Dirac delta distribution at the origin. This restores the local-to-global identity while explicitly accounting for the point source. (live.ocw.mit.edu)"
    },
    {
      "heading": "Historical development",
      "text": "The theorem’s development involved several nineteenth-century formulations rather than a single introduction in modern notation. Work by George Green, Carl Friedrich Gauss, and Mikhail Ostrogradsky established Cartesian-coordinate versions; later work by Oliver Heaviside and Josiah Willard Gibbs contributed to its vector formulation. This history accounts for names such as Gauss’s theorem and Gauss–Ostrogradsky theorem. (sciencedirect.com)"
    }
  ],
  "links": [
    "calculus",
    "vector-field",
    "integral",
    "flux",
    "fundamental-theorem-of-calculus",
    "euclidean-space",
    "partial-derivative",
    "continuity-equation",
    "conservation-of-mass",
    "electromagnetism",
    "gauss-law",
    "greens-theorem",
    "stokes-theorem",
    "differential-form",
    "gradient",
    "greens-identities",
    "boundary-value-problem",
    "laplace-operator",
    "dirac-delta-distribution",
    "carl-friedrich-gauss"
  ],
  "sources": [
    {
      "title": "3 Measures on Volumes and the Divergence Theorem",
      "url": "https://ocw.mit.edu/ans7870/18/18.013a/textbook/HTML/chapter22/section03.html"
    },
    {
      "title": "8 The Divergence Theorem — Calculus Volume 3",
      "url": "https://openstax.org/books/calculus-volume-3/pages/6-8-the-divergence-theorem"
    },
    {
      "title": "02SC MattuckNotes: The Divergence Theorem Part 1",
      "url": "https://ocw.mit.edu/courses/18-02sc-multivariable-calculus-fall-2010/9c15c202ca57e69f25a98a0c76b2fb8b_MIT18_02SC_MNotes_v10.1.pdf"
    },
    {
      "title": "Chapter 15: Vector Calculus",
      "url": "https://live.ocw.mit.edu/courses/res-18-001-calculus-fall-2023/mitres_18_001_f17_ch15.pdf"
    },
    {
      "title": "MITOCW: Divergence Theorem Lecture Transcript",
      "url": "https://ocw.mit.edu/courses/18-02sc-multivariable-calculus-fall-2010/wu8kXZSAp20_transcript.pdf"
    },
    {
      "title": "4 Integral Theorems — MATH 2031 Lecture Notes",
      "url": "https://www.maths.dur.ac.uk/users/anthony.yeates/amv2_202400m/theorems.html"
    },
    {
      "title": "Green's Identities",
      "url": "https://www.sam.math.ethz.ch/betl/doc/html/xhtml/ch01s02.html"
    }
  ],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}