Unit 5, lesson 42

The Divergence Theorem

How the net outward flux through a closed surface equals the total divergence inside it, and how to handle cavities, point singularities and Gauss's law with the right signs.

  • Theory part 83
  • Practice part 84
  • The Theorems of Stokes and Divergence

Pump air into a balloon and the net amount leaving through the rubber each second must come from somewhere inside. If you know how fast air is being created or squeezed at each point within, you can add that up instead of measuring at the surface. The divergence theorem turns this bookkeeping into an exact equation between a flux integral and a triple integral.

Key terms

Closed oriented boundary

Definition Let EE be a bounded solid region in space whose boundary ∂E\partial E is a finite union of closed piecewise smooth surfaces. The boundary is oriented by the outward unit normal n\mathbf{n}, which at each smooth point is perpendicular to ∂E\partial E and points away from EE.

In plain words The skin of a solid, with every normal arrow pointing out of the solid.

Example For the unit cube E=[0,1]3E = [0, 1]^3 the boundary has six faces. The face x=1x = 1 has outward normal i\mathbf{i}, and the face x=0x = 0 has outward normal −i-\mathbf{i}. The same pattern holds for the faces in yy and zz.

Outward flux

Definition For a vector field F\mathbf{F} continuous on ∂E\partial E, the outward flux is

∬∂EF⋅n dS,\iint_{\partial E} \mathbf{F} \cdot \mathbf{n} \, dS,

computed with the outward normal on every piece and summed over the pieces.

In plain words Net amount leaving the solid per unit time. Positive means more goes out than comes in.

Example For F=⟨x2,y,z⟩\mathbf{F} = \langle x^2, y, z \rangle on the unit cube, look at the faces in pairs. On x=1x = 1 the integrand is F⋅i=1\mathbf{F} \cdot \mathbf{i} = 1, and on x=0x = 0 it is −x2=0-x^2 = 0. The yy and zz faces behave the same way, each pair giving 11. The outward flux is 33.

Divergence over a solid

Definition For F=⟨P,Q,R⟩\mathbf{F} = \langle P, Q, R \rangle with continuous first partial derivatives,

∇⋅F=∂P∂x+∂Q∂y+∂R∂z,\nabla \cdot \mathbf{F} = \frac{\partial P}{\partial x} + \frac{\partial Q}{\partial y} + \frac{\partial R}{\partial z},

and its integral over the solid is ∭E∇⋅F dV\iiint_E \nabla \cdot \mathbf{F} \, dV.

In plain words Divergence is the outflow rate per unit volume at a point. Each small cell of the solid is a little source or sink, and the triple integral adds them all.

Example For F=⟨x2,y,z⟩\mathbf{F} = \langle x^2, y, z \rangle the divergence is 2x+22x + 2, and

∫01 ⁣ ⁣∫01 ⁣ ⁣∫01(2x+2) dx dy dz=1+2=3,\begin{aligned} \int_0^1 \!\! \int_0^1 \!\! \int_0^1 (2x + 2) \, dx \, dy \, dz &= 1 + 2 \\[0.4em] &= 3, \end{aligned}

the same as the outward flux.

The divergence theorem and its regularity assumptions

Definition Let EE be a bounded solid region whose boundary ∂E\partial E is a finite union of closed piecewise smooth surfaces, oriented by the outward unit normal. Let F\mathbf{F} have components with continuous first partial derivatives on an open set containing EE and its boundary. Then

∬∂EF⋅n dS=∭E∇⋅F dV.\iint_{\partial E} \mathbf{F} \cdot \mathbf{n} \, dS = \iiint_E \nabla \cdot \mathbf{F} \, dV.

Every hypothesis matters. The surface must be the complete boundary of EE, every piece must carry the outward normal, and F\mathbf{F} must be C1C^1 at every point of EE, inside and on the boundary. Drop any one and the equation can fail, as the singular field below shows.

In plain words Outflow through the skin equals the sum of all the sources inside. Neighboring cells exchange flow across shared walls, those exchanges cancel, and only the outer walls remain.

Example For F=⟨x3,y3,z3⟩\mathbf{F} = \langle x^3, y^3, z^3 \rangle and the ball of radius aa, the divergence is 3(x2+y2+z2)=3ρ23(x^2 + y^2 + z^2) = 3\rho^2. In spherical coordinates the outward flux is

∫02π ⁣ ⁣∫0π ⁣ ⁣∫0a3ρ2⋅ρ2sin⁡ϕ dρ dϕ dθ=3⋅a55⋅2⋅2π=12πa55.\begin{aligned} &\int_0^{2\pi} \!\! \int_0^\pi \!\! \int_0^a 3\rho^2 \cdot \rho^2 \sin\phi \, d\rho \, d\phi \, d\theta \\[0.4em] &= 3 \cdot \frac{a^5}{5} \cdot 2 \cdot 2\pi = \frac{12\pi a^5}{5}. \end{aligned}

Cavities

Definition If EE has holes inside it, its boundary has several pieces, an outer surface and one inner surface around each cavity. The outward normal of EE on an inner surface points away from EE, which means into the cavity. The theorem holds with all boundary pieces included, each with this orientation.

In plain words On the wall of a hollow, “out of the solid” means into the hole. Measured with the usual normal of the inner sphere, that flux enters with a minus sign.

Example Let EE be the shell 1≤ρ≤21 \le \rho \le 2 and F=⟨x,y,z⟩\mathbf{F} = \langle x, y, z \rangle, so ∇⋅F=3\nabla \cdot \mathbf{F} = 3.

PieceF⋅n\mathbf{F} \cdot \mathbf{n}AreaFlux
Outer sphere ρ=2\rho = 22216π16\pi32π32\pi
Inner sphere ρ=1\rho = 1−1-14π4\pi−4π-4\pi

The total is 28π28\pi, and 33 times the volume 43π(8−1)\frac{4}{3}\pi(8 - 1) is also 28π28\pi.

Excluded singularities

Definition Suppose F\mathbf{F} is C1C^1 on an open set containing EE except at one point P0P_0 in the interior of EE. Then the theorem does not apply to EE itself. Choose ε>0\varepsilon > 0 so small that the closed ball BB of radius ε\varepsilon centered at P0P_0 lies in the interior of EE, and apply the theorem to the solid EE with the open ball removed. Its boundary is ∂E\partial E together with the sphere ∂B\partial B, and on that sphere the outward normal of the new solid points toward P0P_0. If ∇⋅F=0\nabla \cdot \mathbf{F} = 0 away from P0P_0, this gives

∬∂EF⋅n dS=∬∂BF⋅nout dS,\iint_{\partial E} \mathbf{F} \cdot \mathbf{n} \, dS = \iint_{\partial B} \mathbf{F} \cdot \mathbf{n}_{\text{out}} \, dS,

where nout\mathbf{n}_{\text{out}} points away from P0P_0.

In plain words Cut the bad point out with a tiny sphere. Then the flux through the big surface equals the flux through the tiny one, which is usually easy to compute.

Example Let F=r∣r∣3\mathbf{F} = \frac{\mathbf{r}}{\lvert \mathbf{r} \rvert^3} with r=⟨x,y,z⟩\mathbf{r} = \langle x, y, z \rangle. Away from the origin a computation gives ∇⋅F=0\nabla \cdot \mathbf{F} = 0. On a sphere of radius ε\varepsilon the field has length 1/ε21/\varepsilon^2 and points outward, so the flux is

1ε2⋅4πε2=4π.\frac{1}{\varepsilon^2} \cdot 4\pi \varepsilon^2 = 4\pi.

The cube [−1,1]3[-1, 1]^3 contains the ball of radius ε=12\varepsilon = \frac{1}{2} about the origin in its interior, so its outward flux is 4π4\pi, not 00, even though the divergence is zero wherever it is defined. A direct computation agrees, since each of the six faces carries flux 2π3\frac{2\pi}{3} by symmetry. If the origin lies outside a solid, the field is C1C^1 on an open set containing the solid and the flux through its boundary is 00.

Gauss’s law

Definition A point charge qq at the origin produces the electric field

E=q4πε0r∣r∣3,\mathbf{E} = \frac{q}{4\pi\varepsilon_0} \frac{\mathbf{r}}{\lvert \mathbf{r} \rvert^3},

where ε0\varepsilon_0 is the permittivity of free space. For any closed piecewise smooth surface SS bounding a solid EE, with the origin not on SS, the outward flux of E\mathbf{E} is q/ε0q/\varepsilon_0 if the origin is inside EE and 00 if it is outside. For several point charges, none of them on SS, the fields add, and the flux is Q/ε0Q/\varepsilon_0, where QQ is the total charge inside EE.

In plain words The electric flux through a closed surface counts only the charge inside, no matter the shape of the surface. It is the previous example with a constant in front.

Example A charge of q=10−9q = 10^{-9} coulombs sits at the origin. In SI units the constant is

ε0≈8.854×10−12 C2N⋅m2,\varepsilon_0 \approx 8.854 \times 10^{-12} \ \frac{\text{C}^2}{\text{N} \cdot \text{m}^2},

and the field is measured in newtons per coulomb. Multiplying by area in square meters, the flux out of any closed surface enclosing the charge is

qε0≈112.9 N⋅m2C.\frac{q}{\varepsilon_0} \approx 112.9 \ \frac{\text{N} \cdot \text{m}^2}{\text{C}}.

Through the surface of the box [1,2]×[0,1]×[0,1][1, 2] \times [0, 1] \times [0, 1] it is 00, since the charge is outside.

Relationship among integral theorems

Definition The main theorems of vector calculus share one shape. The integral of a derivative over an oriented region equals the integral of the original object over its oriented boundary.

TheoremIntegral over the regionBoundary term
Fundamental theorem∫abf′(x) dx\int_a^b f'(x)\, dxf(b)−f(a)f(b) - f(a)
Line integrals∫C∇f⋅dr\int_C \nabla f \cdot d\mathbf{r}f(B)−f(A)f(B) - f(A) for CC from AA to BB
Green∬D(Qx−Py) dA\iint_D (Q_x - P_y) \, dA∮∂DP dx+Q dy\oint_{\partial D} P\,dx + Q\,dy
Stokes∬S(∇×F)⋅dS\iint_S (\nabla \times \mathbf{F}) \cdot d\mathbf{S}∮∂SF⋅dr\oint_{\partial S} \mathbf{F} \cdot d\mathbf{r}
Divergence∭E∇⋅F dV\iiint_E \nabla \cdot \mathbf{F} \, dV∬∂EF⋅dS\iint_{\partial E} \mathbf{F} \cdot d\mathbf{S}

Each one needs its own orientation of the boundary and a derivative that is continuous on the closed region.

In plain words Adding up a rate of change inside gives the net change measured at the edge. The edge is two points, a closed curve or a closed surface, depending on the dimension.

Example The flat version of the divergence theorem is the flux form of Green’s theorem, with n\mathbf{n} the outward normal of a plane region. For F=⟨x,y⟩\mathbf{F} = \langle x, y \rangle on the unit disk, F⋅n=1\mathbf{F} \cdot \mathbf{n} = 1 on the circle, so the outward flux is 2π2\pi. The divergence is 22, and 22 times the area π\pi is also 2π2\pi.

Check yourself

  1. Find the outward flux of F=⟨x3,y3,z⟩\mathbf{F} = \langle x^3, y^3, z \rangle through the closed surface of the solid cylinder x2+y2≤1x^2 + y^2 \le 1, 0≤z≤20 \le z \le 2.
Show the answer

The divergence is 3x2+3y2+1=3r2+13x^2 + 3y^2 + 1 = 3r^2 + 1, so in cylindrical coordinates

∫02 ⁣ ⁣∫02π ⁣ ⁣∫01(3r2+1) r dr dθ dz=2⋅2π⋅(34+12)=5π.\begin{aligned} &\int_0^2 \!\! \int_0^{2\pi} \!\! \int_0^1 (3r^2 + 1)\, r \, dr \, d\theta \, dz \\[0.4em] &= 2 \cdot 2\pi \cdot \Big(\frac{3}{4} + \frac{1}{2}\Big) = 5\pi. \end{aligned}
  1. Find the upward flux of F=⟨x,y,z⟩\mathbf{F} = \langle x, y, z \rangle through the paraboloid z=1−x2−y2z = 1 - x^2 - y^2, z≥0z \ge 0, by closing it with the disk at the bottom.
Show the answer

The divergence is 33 and the solid has volume π2\frac{\pi}{2}, so the outward flux through the closed surface is 3π2\frac{3\pi}{2}. On the bottom disk z=0z = 0 with outward normal −k-\mathbf{k} the integrand is −z=0-z = 0. So the flux through the paraboloid is 3π2\frac{3\pi}{2}.

  1. For F=r∣r∣3\mathbf{F} = \frac{\mathbf{r}}{\lvert \mathbf{r} \rvert^3}, find the outward flux through the sphere (x−3)2+y2+z2=1(x - 3)^2 + y^2 + z^2 = 1 and through the ellipsoid x24+y2+z29=1\frac{x^2}{4} + y^2 + \frac{z^2}{9} = 1.
Show the answer

The first sphere does not enclose the origin, so the field is C1C^1 on the ball it bounds and the flux is 00. The ellipsoid encloses the origin, so cutting out a small ball gives 4π4\pi.

How this lesson connects

It also uses Divergence, vector surface flux, multiple integrals, outward orientation and the fundamental theorem of calculus.