Unit 6, chapter 27

Count outward flow from the sources inside

How the divergence theorem equates the outward flux through a closed surface with the triple integral of the divergence inside, using surface integrals, outward unit normals and the cancellation of shared faces.

  • Chapter 27
  • Line integrals, Green's theorem and the divergence theorem

The field F(x,y,z)=(x,y,z)\mathbf{F}(x, y, z) = (x, y, z) points straight away from the origin at every point, so it carries a net flow out through the unit sphere. How large is that flow, measured as the flux ∬SF⋅n dS\iint_S \mathbf{F} \cdot \mathbf{n}\,dS with n\mathbf{n} the outward unit normal? This page computes it in two ways that both give 4π4\pi, once directly on the sphere and once with the divergence theorem, which adds the divergence 33 over the ball of volume 43π\tfrac{4}{3}\pi. It also explains why the inside determines the flow through the outside, and why the answer depends on the normal being outward and of length one.

Key terms

Surface integral

Definition Let SS be a surface with a continuously differentiable parametrization r(u,v)\mathbf{r}(u, v), (u,v)(u, v) in a closed bounded region RR of the plane, that is one to one on the interior of RR and whose normal vector N=ru×rv\mathbf{N} = \mathbf{r}_u \times \mathbf{r}_v is nonzero there. The area element of SS is

dS=∥N∥ du dv,dS = \lVert \mathbf{N} \rVert\,du\,dv,

and for a function ff that is continuous on SS, the surface integral of ff over SS is

∬Sf dS=∬Rf(r) ∥N∥ du dv,\begin{aligned} &\iint_S f\,dS \\[0.4em] &\quad = \iint_R f(\mathbf{r})\,\lVert \mathbf{N} \rVert\,du\,dv, \end{aligned}

with f(r)f(\mathbf{r}) short for f(r(u,v))f(\mathbf{r}(u, v)). Another such parametrization of SS gives the same value. With f=1f = 1 the integral is the area of SS, and a piecewise smooth surface, such as the surface of a cube, is handled piece by piece.

In plain words Cut the surface into small patches, multiply the value of ff on each patch by the area of the patch, and add. The length of N\mathbf{N} is the stretch factor that converts a small rectangle in the parameter plane into the area of the patch it maps to.

Example The unit sphere has the parametrization x=sin⁡φcos⁡θx = \sin\varphi \cos\theta, y=sin⁡φsin⁡θy = \sin\varphi \sin\theta, z=cos⁡φz = \cos\varphi, with polar angle 0≤φ≤π0 \le \varphi \le \pi and azimuth 0≤θ≤2π0 \le \theta \le 2\pi. A computation gives rφ×rθ=sin⁡φ r\mathbf{r}_\varphi \times \mathbf{r}_\theta = \sin\varphi\,\mathbf{r}, which has length sin⁡φ\sin\varphi, so dS=sin⁡φ dφ dθdS = \sin\varphi\,d\varphi\,d\theta. The inner integral is

∫0πsin⁡φ dφ=2,\int_0^{\pi} \sin\varphi\,d\varphi = 2,

and integrating this constant over 0≤θ≤2π0 \le \theta \le 2\pi gives the area of the sphere, 2⋅2π=4π2 \cdot 2\pi = 4\pi.

Outward unit normal

Definition Let SS be the boundary surface of a bounded solid region EE. At each point where SS has a tangent plane, the outward unit normal n\mathbf{n} is the vector of length 11 that is perpendicular to the tangent plane and points away from EE. Where SS is part of a level surface g(x,y,z)=cg(x, y, z) = c with ∇g≠0\nabla g \neq \mathbf{0}, it is n=±∇g/∥∇g∥\mathbf{n} = \pm \nabla g / \lVert \nabla g \rVert, with the sign that points outward. For the sphere of radius aa centered at the origin,

n=1a(x,y,z).\mathbf{n} = \frac{1}{a}(x, y, z).

In plain words The outward unit normal is an arrow of length one that sticks straight out of the surface. It only picks out a direction, because the size of each patch is already counted by dSdS.

Example On the unit sphere the position vector (x,y,z)(x, y, z) has length 11 and points away from the ball, so it is the outward unit normal. On the sphere of radius 22 the position vector has length 22, so the outward unit normal is 12(x,y,z)\tfrac{1}{2}(x, y, z), and using (x,y,z)(x, y, z) itself would double every flux computed with it. The inward unit normal is −n-\mathbf{n}.

Flux

Definition Let SS be a piecewise smooth surface with a unit normal n\mathbf{n} that varies continuously on each smooth piece, and let F\mathbf{F} be continuous on SS. The flux of F\mathbf{F} through SS in the direction of n\mathbf{n} is

Φ=∬SF⋅n dS.\Phi = \iint_S \mathbf{F} \cdot \mathbf{n}\,dS.

For a closed surface the standard choice is the outward unit normal, which gives the outward flux. When a parametrization has its normal vector N=ru×rv\mathbf{N} = \mathbf{r}_u \times \mathbf{r}_v pointing in the direction of n\mathbf{n}, the product n dS\mathbf{n}\,dS equals N du dv\mathbf{N}\,du\,dv, so

Φ=∬RF(r)⋅N du dv.\Phi = \iint_R \mathbf{F}(\mathbf{r}) \cdot \mathbf{N}\,du\,dv.

Choosing the opposite normal changes the sign of the flux.

In plain words Flux measures how much of the field crosses the surface, counted in the chosen direction. Only the part of the field perpendicular to the surface matters. A field tangent to the surface crosses nothing, and a field crossing against n\mathbf{n} counts as negative.

Example For F=(x,y,z)\mathbf{F} = (x, y, z) on the unit sphere with outward normal n=(x,y,z)\mathbf{n} = (x, y, z),

F⋅n=x2+y2+z2=1\mathbf{F} \cdot \mathbf{n} = x^2 + y^2 + z^2 = 1

at every point of the sphere. So each patch contributes exactly its area, and the outward flux is the area of the sphere, 4π4\pi. With the inward normal the flux is −4π-4\pi.

Divergence

Definition Let F=(F1,F2,F3)\mathbf{F} = (F_1, F_2, F_3) have continuous first partial derivatives on an open set in space. The divergence of F\mathbf{F} is the function

∇⋅F=∂F1∂x+∂F2∂y+∂F3∂z.\nabla \cdot \mathbf{F} = \frac{\partial F_1}{\partial x} + \frac{\partial F_2}{\partial y} + \frac{\partial F_3}{\partial z}.

At each point p\mathbf{p} of that open set, it equals the limit of the outward flux through the sphere of radius ε\varepsilon centered at p\mathbf{p}, divided by the volume 43πε3\tfrac{4}{3}\pi\varepsilon^3 of the ball inside, as ε→0+\varepsilon \to 0^+.

In plain words Divergence measures how much the field spreads out from a point, as the net outward flow from a tiny ball per unit of its volume. It compares neighboring arrows, so it can be nonzero at a point where the arrow itself is zero.

Example For F=(x,y,z)\mathbf{F} = (x, y, z) each of the three partial derivatives is 11, so

∇⋅F=1+1+1=3\nabla \cdot \mathbf{F} = 1 + 1 + 1 = 3

at every point, including the origin, where F=0\mathbf{F} = \mathbf{0}. The field (y,−x,0)(y, -x, 0), which only circles around the zz-axis, has divergence 0+0+0=00 + 0 + 0 = 0.

Cancellation across shared faces

Definition Suppose a solid region EE is cut into finitely many pieces E1,…,EnE_1, \dots, E_n with piecewise smooth boundaries, and F\mathbf{F} is continuous on EE together with its boundary. When each piece uses its own outward unit normal nk\mathbf{n}_k, a face shared by two pieces is counted twice with opposite normals, so its two contributions cancel, and

∑k=1n∬∂EkF⋅nk dS=∬∂EF⋅n dS.\begin{aligned} &\sum_{k=1}^{n} \iint_{\partial E_k} \mathbf{F} \cdot \mathbf{n}_k\,dS \\[0.4em] &\quad = \iint_{\partial E} \mathbf{F} \cdot \mathbf{n}\,dS. \end{aligned}

For a small box with sides Δx\Delta x, Δy\Delta y and Δz\Delta z, the two faces perpendicular to the xx-axis together contribute about ∂F1∂x Δx Δy Δz\frac{\partial F_1}{\partial x}\,\Delta x\,\Delta y\,\Delta z, and the other two pairs of faces behave the same way. So the outward flux of a small box is approximately (∇⋅F) ΔV(\nabla \cdot \mathbf{F})\,\Delta V, and adding over all the boxes gives a Riemann sum for the triple integral of the divergence. This is the counterpart in space of the cancellation along shared edges behind Green’s theorem.

In plain words Every inside wall between two boxes is crossed in opposite directions by its two boxes, so it adds nothing to the total. Only the outer walls remain, and together they form the boundary surface.

Example Take F=(x2,0,0)\mathbf{F} = (x^2, 0, 0) on the unit cube [0,1]3[0, 1]^3, cut by the plane x=12x = \tfrac{1}{2}. The field is parallel to the xx-axis, so only faces perpendicular to that axis carry flux. The left half sends 14\tfrac{1}{4} out through x=12x = \tfrac{1}{2}, where F1=14F_1 = \tfrac{1}{4}, and 00 through x=0x = 0. The right half sends 11 out through x=1x = 1 and −14-\tfrac{1}{4} through x=12x = \tfrac{1}{2}, where its outward normal points in the negative xx direction. The two contributions on the shared face cancel, and the sum 14+34=1\tfrac{1}{4} + \tfrac{3}{4} = 1 is the outward flux of the whole cube. It matches the integral of ∇⋅F=2x\nabla \cdot \mathbf{F} = 2x over the cube, which is 11.

Divergence theorem

Definition Let EE be a bounded solid region whose boundary SS is a closed piecewise smooth surface, or several such surfaces as for a hollow ball, oriented by the outward unit normal n\mathbf{n}. If F\mathbf{F} has continuously differentiable components on an open set containing EE and SS, then

∬SF⋅n dS=∭E∇⋅F dV.\begin{aligned} &\iint_S \mathbf{F} \cdot \mathbf{n}\,dS \\[0.4em] &\quad = \iiint_E \nabla \cdot \mathbf{F}\,dV. \end{aligned}

Both conditions matter. An open surface, such as a hemisphere without its base, is not the boundary of a solid, so it has to be closed off before the theorem applies. A singularity inside EE can break the formula. The inverse square field F=r/∥r∥3\mathbf{F} = \mathbf{r} / \lVert \mathbf{r} \rVert^3, with r=(x,y,z)\mathbf{r} = (x, y, z), has divergence 00 at every point except the origin, where it is undefined, yet its outward flux through the unit sphere is 4π4\pi, since F⋅n=1\mathbf{F} \cdot \mathbf{n} = 1 there.

In plain words The net flow out through a closed surface equals the total spreading of the field inside it. Regions of positive divergence add outward flow, regions of negative divergence take it away, and the theorem adds them all.

Example For the unit sphere with the outward normal and F=(x,y,z)\mathbf{F} = (x, y, z), the components are polynomials, so they are continuously differentiable on all of space, and the enclosed region is the full unit ball BB. With ∇⋅F=3\nabla \cdot \mathbf{F} = 3,

∬SF⋅n dS=∭B3 dV=3⋅43π=4π,\begin{aligned} &\iint_S \mathbf{F} \cdot \mathbf{n}\,dS = \iiint_B 3\,dV \\[0.4em] &\quad = 3 \cdot \tfrac{4}{3}\pi = 4\pi, \end{aligned}

which matches the direct computation on the sphere.

Check yourself

  1. Use the divergence theorem to find the outward flux of F=(2x,−y,3z)\mathbf{F} = (2x, -y, 3z) through the sphere x2+y2+z2=4x^2 + y^2 + z^2 = 4.
Show the answer

The components are polynomials, so they are continuously differentiable everywhere, and the sphere is the closed boundary of the ball BB of radius 22. The divergence is 2−1+3=42 - 1 + 3 = 4, and the ball has volume 43π⋅23=323π\tfrac{4}{3}\pi \cdot 2^3 = \tfrac{32}{3}\pi. So the outward flux is

∭B4 dV=128π3.\iiint_B 4\,dV = \frac{128\pi}{3}.
  1. A student computes the outward flux of F=(x,y,z)\mathbf{F} = (x, y, z) through the sphere of radius 22 centered at the origin by taking n=(x,y,z)\mathbf{n} = (x, y, z). This gives F⋅n=4\mathbf{F} \cdot \mathbf{n} = 4 and a flux of 4⋅16π=64π4 \cdot 16\pi = 64\pi. Find the error and the correct flux, and check it with the divergence theorem.
Show the answer

On this sphere the vector (x,y,z)(x, y, z) has length 22, so it is not a unit normal. The outward unit normal is 12(x,y,z)\tfrac{1}{2}(x, y, z), which gives

F⋅n=x2+y2+z22=2.\mathbf{F} \cdot \mathbf{n} = \frac{x^2 + y^2 + z^2}{2} = 2.

The sphere has area 4π⋅22=16π4\pi \cdot 2^2 = 16\pi, so the flux is 2⋅16π=32π2 \cdot 16\pi = 32\pi. The divergence theorem agrees, since the divergence 33 times the volume 323π\tfrac{32}{3}\pi of the ball is 32π32\pi.

  1. Find the upward flux of F=(x,y,z+1)\mathbf{F} = (x, y, z + 1) through the upper half of the unit sphere, the part with z≥0z \ge 0, without its base.
Show the answer

The hemisphere S1S_1 is not closed, so the divergence theorem does not apply to it alone. Add the disk S2S_2 given by x2+y2≤1x^2 + y^2 \le 1 and z=0z = 0. Together they bound the solid half ball HH, whose outward normal is upward on S1S_1 and equal to (0,0,−1)(0, 0, -1) on S2S_2. The divergence is 1+1+1=31 + 1 + 1 = 3 and HH has volume 23π\tfrac{2}{3}\pi, so the total outward flux is 2π2\pi.

On the disk z=0z = 0, so F⋅n=−(0+1)=−1\mathbf{F} \cdot \mathbf{n} = -(0 + 1) = -1, and the flux through S2S_2 is −1-1 times the area π\pi, which is −π-\pi. Therefore

∬S1F⋅n dS=2π−(−π)=3π.\begin{aligned} &\iint_{S_1} \mathbf{F} \cdot \mathbf{n}\,dS \\[0.4em] &\quad = 2\pi - (-\pi) = 3\pi. \end{aligned}

Forgetting the base would give the wrong value 2π2\pi. As a direct check, on the hemisphere n=(x,y,z)\mathbf{n} = (x, y, z) and F⋅n=1+z\mathbf{F} \cdot \mathbf{n} = 1 + z. The hemisphere has area 2π2\pi. With z=cos⁡φz = \cos\varphi and dS=sin⁡φ dφ dθdS = \sin\varphi\,d\varphi\,d\theta, the inner integral of zz is

∫0π/2cos⁡φsin⁡φ dφ=12,\int_0^{\pi/2} \cos\varphi \sin\varphi\,d\varphi = \frac{1}{2},

so the integral of zz over the hemisphere is 12⋅2π=π\tfrac{1}{2} \cdot 2\pi = \pi, and the flux is 2π+π=3π2\pi + \pi = 3\pi.

How this lesson connects