BetaFree coursewareRewritten from MIT OpenCourseWareCC BY-NC-SA 4.0
Open CosmologyPhysics & cosmology, from high school to a graduate year

The divergence theorem, its proof and the diffusion equation

The del operator ∇ = ⟨∂/∂x, ∂/∂y, ∂/∂z⟩ is a notation: ∇f is the gradient and ∇ · F the divergence. For an incompressible fluid with velocity F, the divergence is the source rate, and the divergence theorem says the net outflow through a closed surface equals the sources inside. The proof splits F into components; for R k̂ and a vertically simple region, the top and bottom fluxes give exactly ∫∫∫ R_z dV and the vertical sides give nothing; other regions are cut into such pieces. Applied to smoke in still air, with flow F = −k∇u, it gives the diffusion (heat) equation ∂u/∂t = k∇²u.

You need this first

Full reading path (27 pages)
  1. Vectors (8.01)
  2. Vectors and the dot product (18.02)
  3. Determinants and the cross product (18.02)
  4. Planes through three points, and matrices (18.02)
  5. Equations of planes and square systems (18.02)
  6. Parametric equations of lines and the cycloid (18.02)
  7. Velocity, acceleration and Kepler's second law (18.02)
  8. Functions of two variables and partial derivatives (18.02)
  9. Tangent planes, critical points and least squares (18.02)
  10. The second derivative test (18.02)
  11. Differentials and the chain rule (18.02)
  12. The gradient and directional derivatives (18.02)
  13. Lagrange multipliers (18.02)
  14. Non-independent variables (18.02)
  15. Double integrals (18.02)
  16. Double integrals in polar coordinates, and their uses (18.02)
  17. Change of variables in double integrals (18.02)
  18. Vector fields and line integrals (18.02)
  19. Gradient fields and path independence (18.02)
  20. Testing for gradient fields, potentials and curl (18.02)
  21. Green's theorem (18.02)
  22. Flux and the normal form of Green's theorem (18.02)
  23. Simply connected regions (18.02)
  24. Triple integrals and cylindrical coordinates (18.02)
  25. Spherical coordinates and gravitational attraction (18.02)
  26. Vector fields in space and flux through surfaces (18.02)
  27. Flux through graphs and the divergence theorem (18.02)
On this page · 5 sections
  1. The del notation
  2. What the theorem says physically
  3. Proof of the divergence theorem
  4. The diffusion equation
  5. Summary

This lecture finishes the divergence theorem: a notation, its physical meaning, a proof, and an application to diffusion (transcript, p. 1).

The del notation#

The symbol ∇\nabla, read "del", is a notation: a formal vector of differentiation operators, not a real vector (transcript, p. 1; notes, p. 1):

Del
∇=⟨∂∂x,∂∂y,∂∂z⟩,∇f=⟨fx,fy,fz⟩,∇⋅F⃗=Px+Qy+Rz\nabla = \left\langle \frac{\partial}{\partial x}, \frac{\partial}{\partial y}, \frac{\partial}{\partial z}\right\rangle, \qquad \nabla f = \langle f_x, f_y, f_z\rangle, \qquad \nabla \cdot \vec F = P_x + Q_y + R_z
In words

del equals the average of partial over partial x, partial over partial y, partial over partial z, del f equals the average of f sub x, f sub y, f sub z, del dot vector capital F equals P sub x plus Q sub y plus R sub z

Source: 18.02 lecture summaries, Week 12 (Prof. Auroux), Lecture 29, p. 1, Lecture 29, p. 1

"Multiplying" it by a function gives the gradient; its dot product with F⃗=⟨P,Q,R⟩\vec F = \langle P, Q, R\rangle gives the divergence (p. 1). It becomes really useful for the curl, ∇×F⃗\nabla \times \vec F, next week (p. 1).

What the theorem says physically#

The divergence is the source rate: the flux generated per unit volume (transcript, p. 1; notes, p. 1). Think of an incompressible fluid, such as water, where a given mass always occupies the same volume (gases are compressible), flowing with velocity F⃗\vec F. With the normal pointing outwards (p. 1; notes, p. 1):

Physical meaning
∫∫∫Ddiv⁡F⃗ dV=∫∫SF⃗⋅n^ dS=net amount leaving D per unit time\int\int\int_D \operatorname{div}\vec F\,dV = \int\int_S \vec F \cdot \hat n\,dS = \text{net amount leaving } D \text{ per unit time}
In words

the integral of the integral of the integral of _ capital D d i v vector capital F d V equals the integral of the integral over S of vector capital F dot n hat d S equals net amount leaving capital D per unit time

which, since the fluid cannot be compressed, must be the total amount of sources (minus sinks) inside DD (p. 1; notes, p. 1). A purely rotating flow has zero divergence (p. 1). The divergence is not the gradient: the gradient takes a function to a vector field, the divergence a vector field to a function (pp. 1–2). And this fluid picture does not quite fit force fields such as electric fields (p. 2).

Proof of the divergence theorem#

Split into components. It is enough to prove ∫∫SR k^⋅n^ dS=∫∫∫DRz dV\int\int_S R\,\hat k \cdot \hat n\,dS = \int\int\int_D R_z\,dV, and the same for PP and QQ, then add (transcript, p. 2; notes, p. 1).

A vertically simple region: bottom and top are graphs, z1(x,y)≤z≤z2(x,y)z_1(x, y) \le z \le z_2(x, y), over a region UU of the xyxy-plane (p. 2; notes, p. 1). The triple integral, zz first (p. 2; notes, p. 1):

Triple integral side
∫∫∫DRz dV=∫∫U∫z1z2Rz dz dx dy=∫∫U(R(x,y,z2(x,y))−R(x,y,z1(x,y)))dx dy\int\int\int_D R_z\,dV = \int\int_U \int_{z_1}^{z_2} R_z\,dz\,dx\,dy = \int\int_U \Big(R\big(x, y, z_2(x, y)\big) - R\big(x, y, z_1(x, y)\big)\Big)dx\,dy
In words

the integral of the integral of the integral of _ capital D R sub z d V equals the integral of the integral of _ capital U the integral from z sub 1 to z sub 2 of R sub z d z d x d y equals the integral of the integral of _ capital U the quantity R (x, y, z sub 2 (x, y) ) minus R (x, y, z sub 1 (x, y) ), d x d y

Source: 18.02 lecture summaries, Week 12 (Prof. Auroux), Lecture 29, p. 1, Lecture 29, p. 1

The flux has three parts (pp. 2–3; notes, p. 1):

  • top: n^ dS=⟨−∂z2/∂x,−∂z2/∂y,1⟩ dx dy\hat n\,dS = \langle -\partial z_2/\partial x, -\partial z_2/\partial y, 1\rangle\,dx\,dy (the graph formula), so the flux of R k^R\,\hat k is ∫∫UR(x,y,z2) dx dy\int\int_U R(x, y, z_2)\,dx\,dy;
  • bottom: the outward normal points down, n^ dS=−⟨−∂z1/∂x,−∂z1/∂y,1⟩ dx dy\hat n\,dS = -\langle -\partial z_1/\partial x, -\partial z_1/\partial y, 1\rangle\,dx\,dy, giving −∫∫UR(x,y,z1) dx dy-\int\int_U R(x, y, z_1)\,dx\,dy;
  • sides: vertical, so n^\hat n is horizontal while R k^R\,\hat k is vertical: no flux.

The sum matches the triple integral (p. 3). Any region can be cut into vertically simple pieces (Auroux shows a doughnut): the triple integrals add up, and the fluxes through the cuts cancel, being counted twice with opposite normals (p. 3; notes, p. 1). The idea is the same as for Green's theorem (p. 3).

The diffusion equation#

Diffusion is how a substance spreads in a still fluid: smoke in air, ink dropped in water (transcript, p. 3; notes, p. 1). Let u(x,y,z,t)u(x, y, z, t) be the concentration. The diffusion equation is a partial differential equation for it (p. 3; notes, p. 1):

Diffusion equation
∂u∂t=k ∇2u=k(∂2u∂x2+∂2u∂y2+∂2u∂z2)\frac{\partial u}{\partial t} = k\,\nabla^2 u = k\left(\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} + \frac{\partial^2 u}{\partial z^2}\right)
In words

partial u over partial t equals k del squared u equals k the quantity partial squared u over partial x squared plus partial squared u over partial y squared plus partial squared u over partial z squared

where ∇2u=∇⋅∇u\nabla^2 u = \nabla \cdot \nabla u is the Laplacian. It is also the heat equation, with uu the temperature (pp. 3–4; notes, p. 1). It comes from two inputs (p. 4; notes, p. 1):

  1. Physics. Let F⃗\vec F be the flow of smoke. It goes from high to low concentration, faster where the concentration changes more abruptly: F⃗=−k∇u\vec F = -k\nabla u.
  2. Conservation. For a region DD with boundary SS, the flux out of DD is minus the rate of change of the smoke inside. By the divergence theorem on the left, and by differentiating under the integral sign on the right (p. 4; notes, p. 1):
Conservation of smoke
∫∫∫Ddiv⁡F⃗ dV=∫∫SF⃗⋅n^ dS=−ddt∫∫∫Du dV=−∫∫∫D∂u∂t dV\int\int\int_D \operatorname{div}\vec F\,dV = \int\int_S \vec F \cdot \hat n\,dS = -\frac{d}{dt}\int\int\int_D u\,dV = -\int\int\int_D \frac{\partial u}{\partial t}\,dV
In words

the integral of the integral of the integral of _ capital D d i v vector capital F d V equals the integral of the integral over S of vector capital F dot n hat d S equals minus d over d t the integral of the integral of the integral of _ capital D u d V equals minus the integral of the integral of the integral of _ capital D partial u over partial t, times d V

Dividing by the volume of DD: the averages of div⁡F⃗\operatorname{div}\vec F and of −∂u/∂t-\partial u/\partial t over DD are equal, for every region. Shrinking DD to a point gives ∂u/∂t=−div⁡F⃗\partial u/\partial t = -\operatorname{div}\vec F (pp. 4–5; notes, p. 1). Combined with F⃗=−k∇u\vec F = -k\nabla u, this is ∂u/∂t=k∇⋅∇u=k∇2u\partial u/\partial t = k\nabla \cdot \nabla u = k\nabla^2 u (p. 5; notes, p. 1).

Worked example

Checking two solutions of the diffusion equation

(a) Find the Laplacian of u=x2+y2+z2u = x^2 + y^2 + z^2, and find aa so that u=a t+x2+y2+z2u = a\,t + x^2 + y^2 + z^2 solves ut=k∇2uu_t = k\nabla^2 u. (b) Check that u=e−3ktsin⁡xsin⁡ysin⁡zu = e^{-3k t}\sin x\sin y\sin z solves the equation.

(a) A steadily rising solution

∇2(x2+y2+z2)=2+2+2=6\nabla^2(x^2 + y^2 + z^2) = 2 + 2 + 2 = 6. With u=at+x2+y2+z2u = at + x^2 + y^2 + z^2, ut=au_t = a and k∇2u=6kk\nabla^2 u = 6k, so a=6ka = 6k: the concentration rises everywhere at the same rate, fed from far away where uu is large.

(b) A decaying pattern

Each second derivative of sin⁡xsin⁡ysin⁡z\sin x\sin y\sin z in xx, yy or zz gives minus the function, so ∇2u=−3u\nabla^2 u = -3u and k∇2u=−3kuk\nabla^2 u = -3k u. And ut=−3kuu_t = -3k u. They agree: the pattern keeps its shape and fades exponentially.

Summary#

  • ∇=⟨∂/∂x,∂/∂y,∂/∂z⟩\nabla = \langle \partial/\partial x, \partial/\partial y, \partial/\partial z\rangle: ∇f\nabla f is the gradient, ∇⋅F⃗\nabla \cdot \vec F the divergence.
  • For an incompressible flow, the divergence is the source rate, and the divergence theorem says outflow equals sources inside.
  • Proof: one component at a time; on a vertically simple region the top and bottom fluxes of Rk^R\hat k give ∫∫∫Rz dV\int\int\int R_z\,dV and the sides give nothing; cut other regions into such pieces.
  • Diffusion (heat) equation: ∂u/∂t=k∇2u\partial u/\partial t = k\nabla^2 u, from F⃗=−k∇u\vec F = -k\nabla u and conservation, ∂u/∂t=−div⁡F⃗\partial u/\partial t = -\operatorname{div}\vec F.

Symbols on this page

Show the 41 symbols used here
≤\le less than or equal.
Is less than or equal to. Say it: “is less than or equal to”.
×\times times.
Times (multiplication). Between two vectors: the cross product. Say it: “times”.
⋅\cdot dot.
Times (multiplication). Between two vectors: the dot product. Say it: “times”.
⟨\langle angle brackets.
The average (mean value) of what is inside, ⟨…⟩. Say it: “the average of”.
∂\partial partial.
Partial derivative: the rate of change with one variable, holding the others fixed. Say it: “partial”.
∇\nabla nabla (del).
Del: ∇f is the gradient, ∇·v the divergence, ∇×v the curl, ∇² the Laplacian. Say it: “del”.
∫\int integral.
Integral: the sum of infinitely many small pieces, such as the area under a curve. Say it: “the integral of”.
sin⁡\sin sine.
Sine of an angle. Say it: “sine”.
v⃗\vec v vector arrow.
A vector: a quantity with a size and a direction. Say it: “vector”.
aa a.
In the worked example, the constant rate a = 6k. Say it: “a”.
zz z.
The z coordinate. Say it: “z”.
kk k.
The diffusion constant in F = −k∇u. Unit: m²/s. Say it: “k”.
xx x.
The x coordinate. Say it: “x”.
yy y.
The y coordinate. Say it: “y”.
tt t.
Time. Unit: s. Say it: “t”.
dd d.
The d of dV, dS, dx, dy, dz, d/dt. Say it: “d”.
ee e.
The base of natural logarithms, about 2.718. Say it: “e”.
ff f.
A function of x, y, z (for the gradient). Say it: “f”.
FF F.
A vector field: the velocity of the fluid, or the flow of smoke. Say it: “capital F”.
PP P.
The x component of F. Say it: “P”.
QQ Q.
The y component of F. Say it: “Q”.
DD D.
The solid region inside the closed surface. Say it: “capital D”.
RR R.
The z component of F. Say it: “R”.
SS S.
The closed surface bounding D; dS is a small piece of its area. Say it: “S”.
uu u.
The concentration of smoke (or the temperature), a function of x, y, z and t. Say it: “u”.
UU U.
The shadow of the region D in the xy-plane. Say it: “capital U”.
VV V.
Volume; dV is a small piece of volume. Say it: “V”.
k^\hat{k} k hat.
Unit vector in the z direction: length 1, pointing towards increasing z. Say it: “k hat”.
n^\hat{n} n hat.
The outward unit normal to the closed surface. Say it: “n hat”.
fxf_{x} f sub x.
The partial derivative ∂f/∂x. Say it: “f sub x”.
fyf_{y} f sub y.
The partial derivative ∂f/∂y. Say it: “f sub y”.
fzf_{z} f sub z.
The partial derivative ∂f/∂z. Say it: “f sub z”.
PxP_{x} P sub x.
The partial derivative ∂P/∂x. Say it: “P sub x”.
QyQ_{y} Q sub y.
The partial derivative ∂Q/∂y. Say it: “Q sub y”.
RzR_{z} R sub z.
The partial derivative ∂R/∂z. Say it: “R sub z”.
z1z_{1} z sub 1.
The bottom surface z = z₁(x, y) of a vertically simple region. Say it: “z sub 1”.
z2z_{2} z sub 2.
The top surface z = z₂(x, y) of a vertically simple region. Say it: “z sub 2”.
utu_{t} u sub t.
The partial derivative ∂u/∂t. Say it: “u sub t”.
uxxu_{\text{xx}} u sub xx.
The second partial derivative ∂²u/∂x². Say it: “u sub xx”.
uyyu_{\text{yy}} u sub yy.
The second partial derivative ∂²u/∂y². Say it: “u sub yy”.
uzzu_{\text{zz}} u sub zz.
The second partial derivative ∂²u/∂z². Say it: “u sub zz”.

Tap or click a symbol in a formula to see the same explanation. All symbols: symbols and notation.

Words on this page

Show the 35 words used here

New here

diffusion.
The slow spreading of a substance or of heat through a still medium, by random motion, from where there is more to less.
incompressible.
Of a fluid: one whose volume cannot be squeezed smaller, so a given mass always takes up the same space, as water nearly does.
diffusion equation.
The equation for how a concentration or temperature spreads out: it changes fastest where it differs most from the average around it.
Laplacian.
The sum of a function's second partial derivatives, or the divergence of its gradient: how much a value differs from the average around it.

Also used

divergence theorem.
The theorem that the flux of a vector field out of a closed surface equals the integral of its divergence over the region inside. Explained in Flux through graphs and the divergence theorem.
proof.
A chain of reasoning showing beyond doubt that a statement follows from definitions and results already known. Explained in Limits and continuity.
p..
Page, in a reference to a source; pp. means pages, as in pp. 3–5.
vector.
A quantity with both a size and a direction, such as a velocity or a force, drawn as an arrow. Explained in Vectors.
differentiation.
Finding a derivative: working out how fast a function changes. Explained in The derivative: slope of the tangent line and rate of change.
operator.
A rule that acts on a function, vector or state and turns it into another one, such as 'take the derivative'. Explained in The chain rule and higher derivatives.
gradient.
The vector of a function's partial derivatives; it points the way the function increases fastest, and its length is that fastest rate. Explained in Graphs, straight lines and slope.
dot product.
A way of multiplying two vectors that gives a number: multiply matching components and add, or lengths times the cosine of the angle between them. Explained in Vectors and the dot product.
divergence.
A measure of how much a vector field spreads out from each point: the amount flowing out of a tiny region per unit size. Explained in Flux and the normal form of Green's theorem.
curl.
A measure of how much a vector field turns or swirls around each point. Explained in Testing for gradient fields, potentials and curl.
flux.
How much of a field, or of a flow of matter or energy, passes through a surface (per second, for a flow). Explained in Towards the universe: what starlight tells us.
velocity.
How fast and in which direction something moves: a vector whose length is the speed and whose direction is the direction of motion. Explained in Velocity, acceleration and Kepler's second law.
vector field.
A rule that attaches an arrow, with a size and a direction, to every point of space, such as the wind velocity at each place. Explained in Fields: scalar, vector, gravitational and electric.
force field.
A vector field that gives the force a body would feel at each point, such as the Earth's gravitational pull. Explained in Vector fields and line integrals.
electric field.
The electric push or pull at each point of space, given as the force on each coulomb of charge placed there. Explained in The electric field.
vertically simple.
Of a region in the plane: one that every vertical line crosses in a single piece, between a lower and an upper curve. Explained in Green's theorem.
graph.
The picture of a function: the curve y = f(x) for one variable, or the surface z = f(x, y) for two. Explained in Graphs, straight lines and slope.
triple integral.
An integral over a region of space: cut the region into tiny boxes, multiply each by the function's value there, and add. Explained in Triple integrals and cylindrical coordinates.
Green's theorem.
The theorem that an integral around a closed curve in the plane equals a double integral of the curl, or divergence, over the region inside. Explained in Green's theorem.
differential equation.
An equation that links an unknown function to its derivatives; solving it means finding the function. Explained in Circular motion dynamics: worked problems.
conserved.
Keeping the same total value as time passes, as energy and momentum do when nothing outside changes them. Explained in Conservation of energy.
rate of change.
How fast one quantity changes compared with another, often time: the change in the first divided by the change in the second. Explained in Rates of change and area under a graph.
integral.
A sum of very many very small pieces, such as the area under a graph; it undoes taking a derivative. Explained in Rates of change and area under a graph.
second derivative.
The derivative of a derivative: how fast a rate of change itself is changing. Explained in Acceleration in one dimension.
continuity equation.
An equation saying that something such as mass or charge is conserved: it changes in a region only by flowing across the edge. Explained in Mean free path, effusion, sound and diffusion.
heat.
Energy that passes between bodies because their temperatures differ, rather than by one doing mechanical work on the other. Explained in Temperature and thermal energy.

Academic

notation.
A system of symbols used to write ideas down briefly, such as dy/dx for a derivative.
transcript.
A written record of exactly what was said in a recorded lecture, word for word.
formally.
Following the rules or symbols exactly as written, sometimes without checking that each step makes sense.
argument.
A chain of reasoning that leads to a conclusion; in maths also the input of a function, such as x in sin x.
theory.
An organised body of ideas, laws and methods about a subject: a tested explanation of nature, or a branch or method of mathematics.

Tap or click a word, here or in the text, for its meaning in this lesson. All words: the glossary. How many words are marked in the text: Reading options (the “Aa” button).

Where this leads

In cosmology

33 more cosmology pages that build on this

Pages that build on this

Practise

Check your understanding

  1. In del notation, the divergence of F⃗\vec F is…
  2. In the diffusion equation, why does the smoke flow along −∇u-\nabla u?
  3. For u=x2+y2+z2u = x^2 + y^2 + z^2, the Laplacian ∇2u\nabla^2 u is…
0 of 3 answered

Flashcards

1 / 3