Calculus III · Vector Calculus

The Divergence Theorem

The total outward flux through a closed surface equals the total source strength inside it — built from scratch, every step shown.

01The Big Idea — Sources and Flux

The Divergence Theorem connects two completely different ways to measure the same thing. Before any formula, here is the physical idea in one picture.

Imagine a room where someone is blowing up balloons — air is being produced at various points inside. You want to know the total rate at which air is being created. Again, you have two methods:

Two Ways to Measure Total Source Strength

Method 1 — Stand outside and measure the flow. Seal the room. Measure the total rate at which air flows outward through every part of the walls. If air is being produced inside, it must exit somewhere. The total outward flux through the walls equals the total production rate inside. This is a surface integral — \(\oiint_S \vec{F}\cdot d\vec{A}\).


Method 2 — Walk inside and measure at every point. At each interior point, measure the local divergence — how fast the field is "spreading out" from that point. Sum this over the entire volume. This is a volume integral — \(\iiint_V \nabla\cdot\vec{F}\,dV\).

The Divergence Theorem says these give exactly the same answer. Total outward flux through the surface = total divergence (source strength) inside the volume. The boundary reflects the interior.

Sources inside (positive divergence, arrows pointing outward at each interior point) produce a net outward flux through the closed surface \(S\). The Divergence Theorem equates the two counts.
🎈
Conservation as geometry. If nothing is created or destroyed inside — \(\nabla\cdot\vec{F}=0\) everywhere — then the total outward flux is zero. Whatever enters the surface must exit it. This is the mathematical form of conservation laws: conservation of mass, conservation of charge, conservation of energy. The Divergence Theorem is how "local conservation" (a point-by-point condition) becomes "global conservation" (a statement about boundaries).

02Divergence — What It Actually Measures

The Divergence Theorem involves \(\nabla\cdot\vec{F}\), the divergence of a vector field. Let's understand it geometrically before touching the formula.

The Expand-or-Compress Test

Place a tiny blob of fluid at a point in a vector field. If the blob expands over time, the field has positive divergence there — stuff is flowing outward, as if there's a source. If the blob compresses, divergence is negative — there's a sink pulling stuff in. If the blob deforms but keeps the same volume, divergence is zero.

Left: positive divergence — the blob expands, arrows point away. Center: zero divergence — blob deforms but keeps volume (like an incompressible fluid). Right: negative divergence — blob shrinks, arrows point in (a sink).

Deriving the Formula from a Tiny Cube

Consider a tiny cube with sides \(\Delta x, \Delta y, \Delta z\) and one corner at \((x_0, y_0, z_0)\). We want the net outward flux through all six faces. Let's work through the \(x\)-faces first.

Flux out the right face (\(x = x_0 + \Delta x\), normal \(+\hat{x}\))
$$\Phi_{\text{right}} = F_x(x_0+\Delta x,\,y_0,\,z_0)\;\Delta y\,\Delta z$$
Flux out the left face (\(x = x_0\), normal \(-\hat{x}\), so flux is \(-F_x\))
$$\Phi_{\text{left}} = -F_x(x_0,\,y_0,\,z_0)\;\Delta y\,\Delta z$$
Net \(x\)-flux — use Taylor expansion: \(F_x(x_0+\Delta x)\approx F_x(x_0) + \frac{\partial F_x}{\partial x}\Delta x\)
$$\Phi_{\text{right}}+\Phi_{\text{left}} = \frac{\partial F_x}{\partial x}\,\Delta x\,\Delta y\,\Delta z$$
📦
What this says physically: if \(\partial F_x/\partial x > 0\), the \(x\)-component of the field grows as you move right — so more exits the right face than enters the left face. The difference is exactly \(\partial F_x/\partial x\) times the volume. Each coordinate direction contributes independently, and we add all three.
Do the same for \(y\)-faces and \(z\)-faces — same logic, different coordinates
$$\Phi_y = \frac{\partial F_y}{\partial y}\,\Delta x\,\Delta y\,\Delta z \qquad \Phi_z = \frac{\partial F_z}{\partial z}\,\Delta x\,\Delta y\,\Delta z$$
Total net outward flux through all six faces of the tiny cube
$$\Phi_{\text{total}} = \left(\frac{\partial F_x}{\partial x}+\frac{\partial F_y}{\partial y}+\frac{\partial F_z}{\partial z}\right)\Delta x\,\Delta y\,\Delta z$$
Divide by volume \(\Delta V = \Delta x\,\Delta y\,\Delta z\) → flux per unit volume
$$\frac{\Phi_{\text{total}}}{\Delta V} = \frac{\partial F_x}{\partial x}+\frac{\partial F_y}{\partial y}+\frac{\partial F_z}{\partial z} \;\equiv\; \nabla\cdot\vec{F}$$
Divergence — Definition
$$\boxed{\nabla\cdot\vec{F} = \frac{\partial F_x}{\partial x}+\frac{\partial F_y}{\partial y}+\frac{\partial F_z}{\partial z}}$$

Divergence is the net outward flux per unit volume at a point. It is a scalar — a single number at each point measuring whether the field is spreading out (positive) or converging in (negative).

TermMeansSignPhysical picture
\(\partial F_x/\partial x\)Rate of change of \(x\)-flow in \(x\)-directionpositiveMore exits right face than enters left face — net production of \(x\)-flux.
\(\partial F_y/\partial y\)Rate of change of \(y\)-flow in \(y\)-directionpositiveMore exits top face than enters bottom. Same logic in the \(y\)-direction.
\(\partial F_z/\partial z\)Rate of change of \(z\)-flow in \(z\)-directionpositiveMore exits front face than enters back. The three terms together capture all outward "leaking."
\(\nabla\cdot\vec{F}=0\)Solenoidal (divergence-free) fieldzeroWhatever flows in, flows back out. Incompressible fluid, magnetic fields (\(\nabla\cdot\vec{B}=0\)), electric fields in charge-free regions.

Geometric Examples of Divergence

Four canonical fields and their divergences. A radial outward field has positive divergence at the origin (source). A uniform field has zero divergence. A field that grows in its own direction has positive divergence throughout. A circular swirl has zero divergence (no sources, just rotation).
🧲
Magnetic fields always have zero divergence. \(\nabla\cdot\vec{B}=0\) is one of Maxwell's equations. It means magnetic monopoles don't exist — there are no magnetic "sources." Every field line that enters a closed surface must exit it. If you put a magnet inside a box, the total magnetic flux through the box is always zero. This is not an approximation — it's a fundamental law, and it's a statement about the divergence of \(\vec{B}\).

03Closed Surface Integrals — Total Outward Flux

The left side of the Divergence Theorem is a surface integral over a closed surface. Let's make sure we understand this precisely.

What "Closed" Means

A closed surface completely encloses a volume — it has no boundary edge. Think of a sphere, a cube, an egg, a torus (donut) — any surface you could fill with water without spilling. An open surface (like a bowl or a disk) is not closed — it has a boundary edge where Stokes' theorem would apply instead.

Flux through a tiny surface patch \(d\vec{A} = \hat{n}\,dA\)
$$d\Phi = \vec{F}\cdot d\vec{A} = \vec{F}\cdot\hat{n}\,dA = |\vec{F}|\cos\theta\,dA$$

\(\theta\) is the angle between the field and the outward normal. Field pointing straight out: full positive flux. Field pointing straight in: full negative flux. Field tangent to surface: zero flux.

Total outward flux through the closed surface \(S\)
$$\oiint_S \vec{F}\cdot d\vec{A} = \oiint_S \vec{F}\cdot\hat{n}\,dA$$

The double-circle on \(\oiint\) signals a closed surface (like \(\oint\) signals a closed loop for Stokes). For a closed surface, the normal \(\hat{n}\) is always taken to point outward by convention.

A closed surface (sphere) with field arrows. Where the field exits (aligns with outward \(\hat{n}\)): positive flux. Where it enters (opposes \(\hat{n}\)): negative flux. The surface integral sums the signed contributions — net outward flux.
SymbolNameUnitsWhat it means
\(\oiint_S\)Closed surface integralIntegration over a complete closed surface. The double circle emphasizes it's closed — no edges, no gaps.
\(\hat{n}\)Outward unit normalAt every point on \(S\), \(\hat{n}\) points perpendicularly away from the enclosed volume. For a sphere: \(\hat{n}=\hat{r}\). For a cube: \(\hat{n}=\pm\hat{x},\pm\hat{y},\pm\hat{z}\) on each face.
\(d\vec{A}\)Oriented area element\(d\vec{A}=\hat{n}\,dA\). A tiny patch of the surface with area \(dA\) and outward direction \(\hat{n}\) attached. Think of it as a small outward-pointing arrow whose length is the area of the patch.
\(\vec{F}\cdot\hat{n}\)Normal component of fieldF unitsThe component of \(\vec{F}\) perpendicular to the surface — the only part that passes through it. Tangential components slide along the surface and contribute nothing to flux.

04Building the Theorem — The Cancellation Argument

Now we assemble the proof. It follows the same beautiful tiling argument as Stokes' theorem, but in one higher dimension.

Step 1: Fill the Volume with Tiny Cubes

Pack the volume \(V\) with a grid of tiny cubes, each with volume \(\Delta V = \Delta x\,\Delta y\,\Delta z\). From Section 2, the net outward flux through each cube is exactly:

Flux through one tiny cube
$$\oiint_{\text{cube}} \vec{F}\cdot d\vec{A} = (\nabla\cdot\vec{F})\,\Delta V$$

This is precisely what we derived in Section 2: net outward flux per unit volume = divergence, so net outward flux = divergence × volume.

Step 2: Sum Over All Cubes

The volume is tiled with tiny cubes. Every interior face is shared by two adjacent cubes — the outward normal of one cube is the inward normal of its neighbor. Their flux contributions cancel exactly. Only the outer surface survives.
Sum over all cubes
$$\sum_{\text{cubes}} \oiint_{\text{cube}} \vec{F}\cdot d\vec{A} = \sum_{\text{cubes}} (\nabla\cdot\vec{F})\,\Delta V$$

Step 3: Interior Faces Cancel in Pairs

Consider any interior face — shared between cube \(A\) on the left and cube \(B\) on the right. For cube \(A\), the outward normal on this face points right (\(+\hat{x}\)). For cube \(B\), the outward normal on the same face points left (\(-\hat{x}\)). Same face, same field, opposite normals — contributions are equal and opposite:

Cancellation on shared interior face
$$\vec{F}\cdot(+\hat{x})\,\Delta A + \vec{F}\cdot(-\hat{x})\,\Delta A = 0$$
After cancellation, only the outer boundary surface survives
$$\sum_{\text{cubes}} \oiint_{\text{cube}} \vec{F}\cdot d\vec{A} \;=\; \oiint_S \vec{F}\cdot d\vec{A}$$

Step 4: Pass to the Limit

As cube sizes shrink to zero, the sum becomes an integral
$$\sum_{\text{cubes}} (\nabla\cdot\vec{F})\,\Delta V \;\longrightarrow\; \iiint_V \nabla\cdot\vec{F}\,dV$$
Combining Steps 3 and 4 — the Divergence Theorem falls out
$$\boxed{\oiint_S \vec{F}\cdot d\vec{A} = \iiint_V \nabla\cdot\vec{F}\,dV}$$
🏗️
The proof in one sentence: Tile the volume with cubes, note each cube satisfies a tiny local version of the theorem, sum them all up, watch interior faces cancel in pairs, and what remains is exactly the outer surface integral on the left and the volume integral on the right. The theorem is just the rigorous limit of this cancellation process — the same logic in 3D that Stokes uses in 2D.

05The Theorem — Precisely Stated

The Divergence Theorem (Gauss's Theorem)
$$\boxed{\oiint_S \vec{F}\cdot d\vec{A} = \iiint_V \nabla\cdot\vec{F}\,dV}$$

where \(S = \partial V\) is the closed surface bounding the volume \(V\), and \(\hat{n}\) in \(d\vec{A}=\hat{n}\,dA\) is the outward unit normal on \(S\).

SymbolNameUnitsWhat it means
\(\oiint_S\)Closed surface integralOver the complete boundary surface of \(V\). Must enclose the volume — no gaps, no edges. The outward normal convention is built in.
\(\vec{F}\cdot d\vec{A}\)Outward flux elementF·m²Amount of \(\vec{F}\) flowing outward through each tiny area patch. Positive = outflow, negative = inflow.
\(\iiint_V\)Volume integralTriple integral over the entire enclosed volume \(V\). Every interior point contributes its divergence, weighted by its infinitesimal volume element \(dV\).
\(\nabla\cdot\vec{F}\)Divergence of \(\vec{F}\)F/mThe local source density at each point — outward flux per unit volume. A positive number means the field is being "created" there; negative means it's being "destroyed" (a sink).
\(S = \partial V\)Boundary of \(V\)\(\partial\) is the boundary operator. The surface \(S\) must be the complete boundary of \(V\) — enclosing it on all sides. This is the 3D version of Stokes' \(C = \partial S\).

Required Conditions

When the Theorem Applies

1. \(\vec{F}\) must have continuous first-order partial derivatives throughout \(V\) and on \(S\). If \(\vec{F}\) has a singularity inside \(V\) (like a point charge at the origin), you must handle it carefully — either exclude it with a small sphere, or use the theorem's consequences (like Gauss's Law) directly.

2. \(V\) must be a bounded, simply-connected region (no holes through it).

3. \(S = \partial V\) must be a piecewise smooth, closed, orientable surface.

4. The normal \(\hat{n}\) on \(S\) must be the outward normal — pointing away from \(V\).

06Worked Examples

Example 1 — Point Source (Radial Field Through a Sphere)

Let \(\vec{F} = \vec{r}/r^3 = (x,y,z)/(x^2+y^2+z^2)^{3/2}\). This is the electric field of a unit positive charge at the origin (up to constants). Compute the flux through a sphere of radius \(R\) centered at the origin.

Method 1 — Direct surface integral. On the sphere of radius \(R\): \(\hat{n} = \hat{r}\) and \(\vec{F} = \hat{r}/R^2\)
$$\vec{F}\cdot\hat{n} = \frac{1}{R^2} \quad\text{(constant everywhere on the sphere)}$$ $$\oiint_S \vec{F}\cdot d\vec{A} = \frac{1}{R^2}\cdot 4\pi R^2 = 4\pi$$
Method 2 — Try the volume integral. Compute \(\nabla\cdot\vec{F}\) for \(r\neq 0\):
$$\nabla\cdot\left(\frac{\vec{r}}{r^3}\right) = 0 \quad\text{for }r\neq 0$$

This looks like it should give zero — but the surface integral gave \(4\pi\)! The resolution: \(\vec{F}\) has a singularity at the origin. The "source" is entirely concentrated at that one point.

Resolution — The Dirac delta: the divergence of a point source is
$$\nabla\cdot\left(\frac{\vec{r}}{r^3}\right) = 4\pi\,\delta^3(\vec{r})$$ $$\iiint_V 4\pi\,\delta^3(\vec{r})\,dV = 4\pi \quad\checkmark$$

The delta function is zero everywhere except the origin, but integrates to 1. The entire \(4\pi\) comes from the point source at the origin — exactly as physical intuition demands. This is how Gauss's Law is derived (Section 7).

Example 2 — Verifying on a Simple Box

Let \(\vec{F} = (x^2, y^2, z^2)\) and \(V\) be the unit cube \([0,1]^3\).

Right side — compute divergence
$$\nabla\cdot\vec{F} = \frac{\partial}{\partial x}(x^2)+\frac{\partial}{\partial y}(y^2)+\frac{\partial}{\partial z}(z^2) = 2x+2y+2z$$
Integrate over the unit cube
$$\iiint_{[0,1]^3}(2x+2y+2z)\,dx\,dy\,dz$$ $$= 2\int_0^1\int_0^1\int_0^1 x\,dx\,dy\,dz + 2\int_0^1\int_0^1\int_0^1 y\,dx\,dy\,dz + 2\int_0^1\int_0^1\int_0^1 z\,dx\,dy\,dz$$ $$= 2\cdot\tfrac{1}{2}\cdot1\cdot1 + 2\cdot1\cdot\tfrac{1}{2}\cdot1 + 2\cdot1\cdot1\cdot\tfrac{1}{2} = 1+1+1 = 3$$
Left side — flux through each of the six faces. Take the \(x\)-faces:
$$\text{Right face } (x=1,\;\hat{n}=+\hat{x}):\; \int_0^1\int_0^1 F_x(1,y,z)\,dy\,dz = \int_0^1\int_0^1 1\,dy\,dz = 1$$ $$\text{Left face } (x=0,\;\hat{n}=-\hat{x}):\; -\int_0^1\int_0^1 F_x(0,y,z)\,dy\,dz = -\int_0^1\int_0^1 0\,dy\,dz = 0$$
By symmetry, \(y\)- and \(z\)-faces give the same pattern. Total flux:
$$\Phi = (1-0)+(1-0)+(1-0) = 3 \quad\checkmark$$
Both sides give 3. The field \(\vec{F}=(x^2,y^2,z^2)\) carries more flux out the faces at \(x=1,y=1,z=1\) than enters at \(x=0,y=0,z=0\), because \(F\) is larger at the far faces. That imbalance is exactly the divergence \(2x+2y+2z\) integrated over the cube.

Example 3 — Zero Divergence (Incompressible Flow)

Let \(\vec{F} = (-y, x, 0)\) — circular flow in the \(xy\)-plane. Compute its divergence:

Divergence of circular flow
$$\nabla\cdot\vec{F} = \frac{\partial(-y)}{\partial x}+\frac{\partial(x)}{\partial y}+\frac{\partial(0)}{\partial z} = 0+0+0 = 0$$

So for any closed surface containing this field, the total outward flux is zero — as much flow enters as exits. This field has no sources or sinks, just pure rotation. This is an example of a solenoidal (divergence-free) field.

07Gauss's Law — Divergence Theorem in Action

Gauss's Law is one of Maxwell's four equations and one of the most powerful tools in electrostatics. It is a direct consequence of the Divergence Theorem applied to Coulomb's law.

Starting from Coulomb's Law

The electric field of a point charge \(q\) at the origin is:

Coulomb's field
$$\vec{E} = \frac{q}{4\pi\epsilon_0}\frac{\vec{r}}{r^3} = \frac{q}{4\pi\epsilon_0}\frac{\hat{r}}{r^2}$$
Compute flux through any closed surface surrounding the charge — use Divergence Theorem
$$\oiint_S \vec{E}\cdot d\vec{A} = \iiint_V \nabla\cdot\vec{E}\,dV = \frac{q}{4\pi\epsilon_0}\iiint_V 4\pi\,\delta^3(\vec{r})\,dV = \frac{q}{\epsilon_0}$$
Gauss's Law — Integral Form
$$\boxed{\oiint_S \vec{E}\cdot d\vec{A} = \frac{Q_{\text{enc}}}{\epsilon_0}}$$

The total electric flux through any closed surface equals the enclosed charge divided by \(\epsilon_0\). This works for any closed surface — sphere, cube, potato — because the Divergence Theorem says the flux only cares about the divergence inside, and the only divergence (source) is the charge itself.

Gauss's Law: any closed surface surrounding the same charge gives the same total flux \(Q/\epsilon_0\), regardless of shape. The field lines passing through each surface are identical — the shape doesn't matter, only what's inside.

Why Any Surface Works

This is the Divergence Theorem in action. Outside the charge, \(\nabla\cdot\vec{E}=0\) — the field has no sources there. The only divergence is at the charge itself. So the volume integral picks up the same contribution regardless of how big or what shape you draw your surface — as long as it encloses the charge, you always get \(Q_{\text{enc}}/\epsilon_0\).

The Differential Form

The integral form of Gauss's Law can be converted back to a differential (point-by-point) law by applying the Divergence Theorem in reverse:

Apply Divergence Theorem to left side of Gauss's Law
$$\oiint_S \vec{E}\cdot d\vec{A} = \iiint_V \nabla\cdot\vec{E}\,dV = \frac{1}{\epsilon_0}\iiint_V \rho\,dV$$
Since this holds for any volume \(V\), the integrands must be equal
$$\boxed{\nabla\cdot\vec{E} = \frac{\rho}{\epsilon_0}}$$

This is Gauss's Law in differential form — one of Maxwell's equations. Charge density \(\rho\) is the source of electric divergence. Wherever there's charge, the field diverges outward from it.

🔬 Applications of Gauss's Law

Field of a uniformly charged sphere: By symmetry, \(\vec{E}\) is radial and constant on a concentric sphere of radius \(r\). Gauss's Law gives \(E\cdot 4\pi r^2 = Q_{\text{enc}}/\epsilon_0\) immediately, without any integration. Outside the sphere: \(E = Q/(4\pi\epsilon_0 r^2)\) — exactly like a point charge. Inside a hollow sphere: \(E = 0\) (no enclosed charge). The Divergence Theorem is what makes this shortcut valid — symmetry plus Gauss's Law instead of brute-force Coulomb integration.

Infinite line charge: Cylindrical Gauss surface of radius \(r\), length \(L\). Flux exits only through the curved side (end caps are parallel to \(\vec{E}\)). \(E\cdot 2\pi rL = \lambda L/\epsilon_0 \Rightarrow E = \lambda/(2\pi\epsilon_0 r)\). Done in one line instead of a complicated integral.

08The Continuity Equation — Conservation Laws

The Divergence Theorem is the mathematical engine behind every conservation law in physics. Let's derive the continuity equation — the universal statement of "stuff is conserved."

Setting Up

Let \(\rho(\vec{r},t)\) be some density — mass density, charge density, number density of particles. Let \(\vec{J} = \rho\vec{v}\) be the associated flux (density times velocity — how much stuff flows through a surface per unit time per unit area).

Rate of change of total stuff in volume \(V\)
$$\frac{d}{dt}\iiint_V \rho\,dV = \iiint_V \frac{\partial\rho}{\partial t}\,dV$$

We can bring \(\partial/\partial t\) inside the integral because \(V\) is fixed in space.

Conservation: the only way \(\rho\) can change inside \(V\) is if stuff flows in or out through the boundary surface
$$\frac{d}{dt}\iiint_V \rho\,dV = -\oiint_S \vec{J}\cdot d\vec{A}$$

Minus sign: outward flux decreases the interior amount. If net flux is outward (positive), stuff is leaving, so \(\rho\) inside decreases.

Apply Divergence Theorem to the right side
$$-\oiint_S \vec{J}\cdot d\vec{A} = -\iiint_V \nabla\cdot\vec{J}\,dV$$
Combine: both sides are volume integrals over the same arbitrary \(V\)
$$\iiint_V \frac{\partial\rho}{\partial t}\,dV = -\iiint_V \nabla\cdot\vec{J}\,dV$$
Since \(V\) is arbitrary, the integrands must be equal everywhere
$$\boxed{\frac{\partial\rho}{\partial t} + \nabla\cdot\vec{J} = 0}$$
The Continuity Equation

This is the most fundamental conservation law. In words: the local rate of increase of density (\(\partial\rho/\partial t\)) plus the local outflow rate (\(\nabla\cdot\vec{J}\)) is zero. Density can only change because stuff flows. There are no spontaneous appearances or disappearances.


This holds for: mass (\(\rho\) = mass density, \(\vec{J} = \rho\vec{v}\)), electric charge (\(\rho\) = charge density, \(\vec{J}\) = current density), energy, probability (quantum mechanics), and more.

⚖️
How conservation goes from global to local. We started with "stuff is conserved" — a global statement. The Divergence Theorem converts the surface term into a volume integral, so both sides of the conservation equation are volume integrals over the same region. Since the region is arbitrary, the integrand on each side must be equal pointwise. That's how you get a local differential conservation law from a global integral one. This trick — use Divergence Theorem, then invoke "holds for any V" — appears throughout mathematical physics.
🔬 Continuity Everywhere

Fluid dynamics: For incompressible fluids (\(\rho\) = const), \(\partial\rho/\partial t = 0\), so \(\nabla\cdot\vec{v}=0\) — the velocity field is divergence-free. A fluid element's volume is preserved as it moves. This is why incompressible flow has zero divergence.

Electromagnetism: \(\partial\rho_{\text{charge}}/\partial t + \nabla\cdot\vec{J}=0\) says charge is locally conserved — it doesn't teleport. Combined with Gauss's Law, this was one of the inconsistencies that Maxwell resolved by adding the displacement current term to Ampère's law, predicting electromagnetic waves.

Quantum mechanics: The probability density \(|\psi|^2\) and probability current \(\vec{J}_\psi = (\hbar/2mi)(\psi^*\nabla\psi - \psi\nabla\psi^*)\ satisfy the continuity equation. Probability is locally conserved — the particle doesn't vanish from one place and reappear somewhere else; it flows continuously through space. This is a direct consequence of the Schrödinger equation plus the Divergence Theorem.

09Summary — The Complete Picture

ConceptFormulaGeometric meaning
Divergence Theorem\(\oiint_S \vec{F}\cdot d\vec{A} = \iiint_V \nabla\cdot\vec{F}\,dV\)Total outward flux = total source strength inside
Divergence\(\nabla\cdot\vec{F} = \partial_x F_x + \partial_y F_y + \partial_z F_z\)Net outward flux per unit volume; local source density
Tiny cube flux\(\oiint_{\text{cube}}\vec{F}\cdot d\vec{A} = (\nabla\cdot\vec{F})\,\Delta V\)Local version; integrand of the theorem
Interior cancellationShared faces: \(\hat{n}_A = -\hat{n}_B\)Inner faces cancel pairwise; only outer surface survives
Solenoidal field\(\nabla\cdot\vec{F}=0\)No sources/sinks; inflow = outflow through any closed surface
Gauss's Law (integral)\(\oiint_S \vec{E}\cdot d\vec{A} = Q_{\text{enc}}/\epsilon_0\)Electric flux through any closed surface = charge inside / \(\epsilon_0\)
Gauss's Law (differential)\(\nabla\cdot\vec{E} = \rho/\epsilon_0\)Charge is the source of electric field divergence, pointwise
Continuity equation\(\partial_t\rho + \nabla\cdot\vec{J} = 0\)Local conservation: density only changes by flow
Point source divergence\(\nabla\cdot(\hat{r}/r^2) = 4\pi\,\delta^3(\vec{r})\)All the divergence is concentrated at the singular point
The Single Thread

The Divergence Theorem is about accountability. Whatever flows out through the walls of a region was either there when you started, or was created inside. If you know the source strength at every interior point (the divergence), you know exactly how much exits through the boundary — and vice versa.


The proof is pure geometry: tile the volume with cubes, each satisfying a tiny local version of the theorem, sum them up, and watch all interior faces cancel because every shared face is one cube's outflow and its neighbor's inflow. The boundary is all that remains.


In physics, this is how local differential laws (Maxwell's equations, Navier-Stokes, Schrödinger) become global integral measurements (flux through surfaces, total charge, total probability). The Divergence Theorem is the bridge between the infinitesimal and the macroscopic — between what's true at a point and what you measure in a lab.

Stokes' vs. Divergence — The Unified View

Both theorems are special cases of one master theorem: the generalized Stokes' theorem, \(\int_M d\omega = \int_{\partial M} \omega\). In both cases, an integral over the interior of something (a surface for Stokes, a volume for Divergence) equals an integral over its boundary (a curve for Stokes, a surface for Divergence). The interior is always one dimension higher than its boundary, and they're linked by a differential operator (curl for Stokes, divergence for the Divergence Theorem). The proof is always the same: tile, sum, cancel interior, boundary survives.