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

Flux through graphs and the divergence theorem

Over a small rectangle of the xy-plane, a graph z = f(x, y) is nearly a parallelogram with sides ⟨Δx, 0, f_x Δx⟩ and ⟨0, Δy, f_y Δy⟩, whose cross product gives n̂ dS = ⟨−f_x, −f_y, 1⟩ dx dy. The flux of z k̂ up through the paraboloid z = x² + y² over the unit disc is π/2. For a parametric surface r(u, v), n̂ dS = ±(r_u × r_v) du dv; for an implicit surface g = 0 with normal N = ∇g, n̂ dS = ±N/(N · k̂) dx dy. The divergence theorem turns the outward flux through a closed surface into ∫∫∫ div F dV, with div F = P_x + Q_y + R_z: the flux of z k̂ out of a sphere is its volume.

You need this first

Full reading path (26 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)
On this page · 5 sections
  1. Flux through a graph
  2. Parametric surfaces
  3. Implicit surfaces
  4. The divergence theorem
  5. Summary

The last lecture gave a formula for flux through a graph without proof. This one proves it, adds more kinds of surfaces, and ends with a way to avoid surface integrals altogether: the divergence theorem (transcript, p. 1).

Flux through a graph#

Let SS be the graph z=f(x,y)z = f(x, y) over a region RR of the xyxy-plane, and use xx and yy as the variables (transcript, p. 1; notes, p. 3). Take a small rectangle Δx\Delta x by Δy\Delta y at (x,y)(x, y). The piece of SS above it is nearly a parallelogram in space. By linear approximation, f(x+Δx,y)≈f+fxΔxf(x + \Delta x, y) \approx f + f_x\Delta x and f(x,y+Δy)≈f+fyΔyf(x, y + \Delta y) \approx f + f_y\Delta y, so its sides are ⟨1,0,fx⟩Δx\langle 1, 0, f_x\rangle\Delta x and ⟨0,1,fy⟩Δy\langle 0, 1, f_y\rangle\Delta y (p. 1; notes, p. 3). The cross product gives both the area and the normal direction at once (p. 1; notes, p. 3):

Flux element for a graph
n^ ΔS=⟨1,0,fx⟩×⟨0,1,fy⟩ Δx Δy=⟨−fx,−fy,1⟩ Δx Δy,n^ dS=±⟨−fx,−fy,1⟩ dx dy\hat n\,\Delta S = \langle 1, 0, f_x\rangle \times \langle 0, 1, f_y\rangle\,\Delta x\,\Delta y = \langle -f_x, -f_y, 1\rangle\,\Delta x\,\Delta y, \qquad \hat n\,dS = \pm\langle -f_x, -f_y, 1\rangle\,dx\,dy
In words

n hat capital delta S equals the average of 1, 0, f sub x times the average of 0, 1, f sub y capital delta x capital delta y equals the average of minus f sub x, minus f sub y, 1 capital delta x capital delta y, n hat d S equals plus or minus the average of minus f sub x, minus f sub y, 1 d x d y

Source: 18.02 lecture summaries, Week 11 (Prof. Auroux), Lecture 28, pp. 3–4, Lecture 28, p. 3

That is why n^ dS\hat n\,dS together is easier than n^\hat n and dSdS separately: dS=fx2+fy2+1 dx dydS = \sqrt{f_x^2 + f_y^2 + 1}\,dx\,dy, and the square root relates the area on SS to the area of its shadow (notes, p. 3). For a horizontal plane, fx=fy=0f_x = f_y = 0 and it gives k^ dx dy\hat k\,dx\,dy (p. 1).

Example (transcript, pp. 1–2). The flux of F⃗=z k^\vec F = z\,\hat k through the paraboloid z=x2+y2z = x^2 + y^2 above the unit disc, with the normal pointing up (into the paraboloid). The field points up, so the flux should be positive (p. 2; notes, p. 3). Here n^ dS=⟨−2x,−2y,1⟩ dx dy\hat n\,dS = \langle -2x, -2y, 1\rangle\,dx\,dy, so F⃗⋅n^ dS=z dx dy=(x2+y2) dx dy\vec F \cdot \hat n\,dS = z\,dx\,dy = (x^2 + y^2)\,dx\,dy; replace zz by f(x,y)f(x, y), then use polar coordinates on the disc (p. 2; notes, p. 3):

Flux through the paraboloid
∫∫SF⃗⋅n^ dS=∫∫unit disc(x2+y2) dx dy=∫02π∫01r2 r dr dθ=π2\int\int_S \vec F \cdot \hat n\,dS = \int\int_{\text{unit disc}} (x^2 + y^2)\,dx\,dy = \int_0^{2\pi}\int_0^1 r^2\,r\,dr\,d\theta = \frac{\pi}{2}
In words

the integral of the integral over S of vector capital F dot n hat d S equals the integral of the integral over unit disc of the quantity x squared plus y squared, d x d y equals the integral from 0 to 2 pi of the integral from 0 to 1 of r squared r d r d theta equals pi over 2

Parametric surfaces#

If SS is given by parametric equations r⃗(u,v)=⟨x(u,v),y(u,v),z(u,v)⟩\vec r(u, v) = \langle x(u, v), y(u, v), z(u, v)\rangle, a small change Δu\Delta u, Δv\Delta v gives a small parallelogram with sides ∂r⃗∂uΔu\frac{\partial\vec r}{\partial u}\Delta u and ∂r⃗∂vΔv\frac{\partial\vec r}{\partial v}\Delta v (transcript, pp. 2–3; notes, p. 4):

Parametric surfaces
n^ dS=±(∂r⃗∂u×∂r⃗∂v)du dv\hat n\,dS = \pm\left(\frac{\partial\vec r}{\partial u} \times \frac{\partial\vec r}{\partial v}\right)du\,dv
In words

n hat d S equals plus or minus ( partial vector r over partial u times partial vector r over partial v )d u d v

With u=xu = x, v=yv = y and z=f(x,y)z = f(x, y) it gives the graph formula again; for the sphere, the earlier formulas (p. 3). (The notes say this general form won't be needed on the exam, notes, pp. 3–4.)

Implicit surfaces#

If SS is given by an equation g(x,y,z)=0g(x, y, z) = 0, a normal vector (not a unit one) is the gradient, N⃗=∇g\vec N = \nabla g; for a slanted plane ax+by+cz=dax + by + cz = d, it is ⟨a,b,c⟩\langle a, b, c\rangle (transcript, p. 3; notes, p. 4). To find ΔS\Delta S, project the small piece onto the xyxy-plane: one direction is shrunk by cos⁡α\cos\alpha, where α\alpha is the angle between the surface and the horizontal, also the angle between N⃗\vec N and k^\hat k, so cos⁡α=N⃗⋅k^/∣N⃗∣\cos\alpha = \vec N \cdot \hat k/|\vec N| and ΔA=cos⁡α ΔS\Delta A = \cos\alpha\,\Delta S (pp. 3–4; notes, p. 4). Multiplying ΔS\Delta S by n^\hat n (pp. 3–4; notes, p. 4):

Implicit surfaces
dS=∣N⃗∣∣N⃗⋅k^∣ dx dy,n^ dS=±N⃗N⃗⋅k^ dx dydS = \frac{|\vec N|}{|\vec N \cdot \hat k|}\,dx\,dy, \qquad \hat n\,dS = \pm\frac{\vec N}{\vec N \cdot \hat k}\,dx\,dy
In words

d S equals the absolute value of vector capital N over the absolute value of vector capital N dot k hat, times d x d y, n hat d S equals plus or minus vector capital N over the quantity vector capital N dot k hat, times d x d y

Source: 18.02 lecture summaries, Week 11 (Prof. Auroux), Lecture 28, pp. 3–4, Lecture 28, p. 4

(The notes add that the first formula needs an absolute value, which Auroux had first forgotten, notes, p. 4.) If SS is vertical, N⃗⋅k^=0\vec N \cdot \hat k = 0 and one must project onto another plane, using i^\hat i or j^\hat j instead of k^\hat k (p. 4; notes, p. 4). For a graph, g=z−f(x,y)g = z - f(x, y) gives N⃗=⟨−fx,−fy,1⟩\vec N = \langle -f_x, -f_y, 1\rangle and N⃗⋅k^=1\vec N \cdot \hat k = 1: the same formula as before (p. 4).

The divergence theorem#

Instead of computing a surface integral, one can often avoid it. The divergence theorem (or Gauss–Green, or Gauss's theorem) is the space version of Green's theorem for flux (transcript, p. 4; notes, p. 4). If SS is a closed surface enclosing a region DD, with the normal pointing outwards, and F⃗\vec F is defined and differentiable everywhere in DD (p. 4; notes, p. 4):

Divergence theorem
∫∫SF⃗⋅n^ dS=∫∫∫Ddiv⁡F⃗ dV,div⁡(P i^+Q j^+R k^)=Px+Qy+Rz\int\int_S \vec F \cdot \hat n\,dS = \int\int\int_D \operatorname{div}\vec F\,dV, \qquad \operatorname{div}(P\,\hat i + Q\,\hat j + R\,\hat k) = P_x + Q_y + R_z
In words

the integral of the integral over S of vector capital F dot n hat d S equals the integral of the integral of the integral of _ capital D d i v vector capital F d capital V, d i v the quantity P i hat plus Q j hat plus capital R k hat, equals P sub x plus Q sub y plus capital R sub z

Source: 18.02 lecture summaries, Week 11 (Prof. Auroux), Lecture 28, pp. 3–4, Lecture 28, p. 4

The example of last lecture. For z k^z\,\hat k through the sphere of radius aa: div⁡F⃗=0+0+1=1\operatorname{div}\vec F = 0 + 0 + 1 = 1, so the flux is the volume, 43πa3\frac43\pi a^3, which was no accident (p. 4; notes, p. 4). (Here the transcript says "Green's theorem" three times: a slip for the divergence theorem.) And ⟨x,y,z⟩\langle x, y, z\rangle, with divergence 3, gave three times the volume, 4πa34\pi a^3 (p. 4). The theorem needs a closed surface: a hemisphere alone would need its flat bottom added (p. 4).

Physically, the divergence measures how much the flow is expanding, the sources or sinks per unit volume. The theorem then says what common sense suggests: the net amount of fluid leaving DD per unit time equals the total of the sources inside minus the sinks (p. 4; notes, p. 4). The proof comes next lecture (p. 4).

Worked example

A cube, a paraboloid and an area

(a) Find the outward flux of F⃗=⟨x,y,z⟩\vec F = \langle x, y, z\rangle through the surface of the unit cube 0≤x,y,z≤10 \le x, y, z \le 1, directly and by the divergence theorem. (b) Find the upward flux of k^\hat k through the paraboloid z=x2+y2z = x^2 + y^2 over the unit disc. (c) Find the area of that piece of paraboloid.

(a) Directly and by divergence

On the face x=1x = 1, n^=i^\hat n = \hat i and F⃗⋅n^=x=1\vec F \cdot \hat n = x = 1, so its flux is its area, 1; likewise the faces y=1y = 1 and z=1z = 1. On the faces through the origin, F⃗⋅n^=0\vec F \cdot \hat n = 0. Total 3. By the theorem: div⁡F⃗=3\operatorname{div}\vec F = 3, times the volume 1, gives 3.

(b) A constant field

k^⋅⟨−2x,−2y,1⟩ dx dy=dx dy\hat k \cdot \langle -2x, -2y, 1\rangle\,dx\,dy = dx\,dy, so the flux is the area of the shadow, π\pi.

(c) Surface area

dS=4x2+4y2+1 dx dydS = \sqrt{4x^2 + 4y^2 + 1}\,dx\,dy, so the area is ∫02π∫014r2+1 r dr dθ=2π⋅55−112≈5.33\int_0^{2\pi}\int_0^1 \sqrt{4r^2 + 1}\,r\,dr\,d\theta = 2\pi \cdot \frac{5\sqrt5 - 1}{12} \approx 5.33, larger than the shadow's π≈3.14\pi \approx 3.14 because the surface is tilted.

Summary#

  • For a graph z=f(x,y)z = f(x, y): n^ dS=±⟨−fx,−fy,1⟩ dx dy\hat n\,dS = \pm\langle -f_x, -f_y, 1\rangle\,dx\,dy, from the cross product of the sides of a small parallelogram.
  • The flux of zk^z\hat k up through z=x2+y2z = x^2 + y^2 over the unit disc is π/2\pi/2.
  • Parametric surfaces: n^ dS=±(r⃗u×r⃗v) du dv\hat n\,dS = \pm(\vec r_u \times \vec r_v)\,du\,dv. Implicit surfaces g=0g = 0: n^ dS=±∇g∇g⋅k^ dx dy\hat n\,dS = \pm\frac{\nabla g}{\nabla g \cdot \hat k}\,dx\,dy.
  • Divergence theorem: ∫∫SF⃗⋅n^ dS=∫∫∫Ddiv⁡F⃗ dV\int\int_S \vec F \cdot \hat n\,dS = \int\int\int_D \operatorname{div}\vec F\,dV for a closed surface oriented outwards; div⁡F⃗=Px+Qy+Rz\operatorname{div}\vec F = P_x + Q_y + R_z.
  • The divergence is the source rate; the outward flux is the total of the sources inside.

Symbols on this page

Show the 50 symbols used here
α\alpha alpha.
The angle between the small piece of surface and the horizontal. Say it: “alpha”.
Δ\Delta capital delta.
A change or difference in a quantity, e.g. Δx = x₂ − x₁. Say it: “capital delta”.
θ\theta theta.
An angle. Say it: “theta” (sounds like “thay-ta or thee-ta”).
π\pi pi.
The ratio of a circle's circumference to its diameter, π ≈ 3.14159. Say it: “pi”.
ρ\rho rho.
Density: mass (or energy divided by c²) per unit volume. ρ_c is the critical density, ρ̄ the mean density. Unit: kg/m³ (on some pages an energy density in natural units: GeV⁴, eV/cm³). Say it: “rho”.
ϕ\phi phi.
In the cosmology note, the gravitational potential. Unit: J/kg. Say it: “phi” (sounds like “fye”).
≈\approx approximately equal.
Is approximately equal to. Say it: “is approximately”.
≤\le less than or equal.
Is less than or equal to. Say it: “is less than or equal to”.
±\pm plus or minus.
Plus or minus: both signs, or an uncertainty (67.3 ± 1.2). Say it: “plus or minus”.
×\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”.
cos⁡\cos cosine.
Cosine of an angle. Say it: “cos”.
v⃗\vec v vector arrow.
A vector: a quantity with a size and a direction. Say it: “vector”.
aa a.
The coefficient of x in the plane ax + by + cz = d (or the radius of a sphere). Say it: “a”.
zz z.
The z coordinate. Say it: “z”.
GG G.
Newton's gravitational constant, G ≈ 6.674 × 10⁻¹¹ m³ kg⁻¹ s⁻². Unit: m³/(kg·s²). Say it: “capital G”.
cc c.
The coefficient of z in the plane ax + by + cz = d. Say it: “c”.
xx x.
The x coordinate. Say it: “x”.
yy y.
The y coordinate. Say it: “y”.
dd d.
The d of dS, dx, dy, du, dv, dV. Say it: “d”.
ff f.
The function whose graph z = f(x, y) is the surface. Say it: “f”.
gg g.
The function in the implicit equation g(x, y, z) = 0; in the cosmology note, the gravitational field. Say it: “g”.
FF F.
A vector field in space, ⟨P, Q, R⟩. Say it: “capital F”.
vv v.
The second parameter of a parametric surface. Say it: “v”.
rr r.
The position vector of a point of a parametric surface, r(u, v); in polar coordinates, the distance from the z-axis. Say it: “r”.
PP P.
The x component of the vector field. Say it: “P”.
QQ Q.
The y component of the vector field. Say it: “Q”.
DD D.
The solid region enclosed by the closed surface S. Say it: “capital D”.
AA A.
Area in the xy-plane (ΔA, the shadow of a small piece). Say it: “capital A”.
bb b.
The coefficient of y in the plane ax + by + cz = d. Say it: “b”.
NN N.
A normal vector (not of unit length) to the surface, such as ∇g. Say it: “capital N”.
RR R.
The z component of the vector field (also, in one place, the region of the xy-plane under a graph). Say it: “capital R”.
SS S.
The surface; dS is a small piece of its area. Say it: “S”.
uu u.
The first parameter of a parametric surface. Say it: “u”.
VV V.
Volume; dV is a small piece of volume. Say it: “capital V”.
i^\hat{i} i hat.
Unit vector in the x direction: length 1, pointing towards increasing x. Say it: “i hat”.
j^\hat{j} j hat.
Unit vector in the y direction: length 1, pointing towards increasing y. Say it: “j hat”.
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 unit normal vector to the surface (outwards for a 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”.
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: “capital R sub z”.
rur_{u} r sub u.
The partial derivative ∂r/∂u of the position vector. Say it: “r sub u”.
rvr_{v} r sub v.
The partial derivative ∂r/∂v of the position vector. Say it: “r sub v”.

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

Words on this page

Show the 29 words used here

New here

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.

Also used

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.
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.
proof.
A chain of reasoning showing beyond doubt that a statement follows from definitions and results already known. Explained in Limits and continuity.
surface integral.
An integral over a surface in space: the surface is cut into tiny patches, each multiplied by the value there, and all are added.
p..
Page, in a reference to a source; pp. means pages, as in pp. 3–5.
linear approximation.
Replacing a function near a point by the straight line, or flat plane, that best matches it there, using its first derivatives. Explained in Change of variables in double integrals.
cross product.
A way of multiplying two vectors that gives a third vector, at right angles to both, as long as the area of their parallelogram. Explained in Torque and the cross product.
field.
Something that has a value at every point of space, such as the temperature, the wind velocity or the electric field at each place. Explained in Newton's law of gravitation.
polar coordinates.
Coordinates in a flat plane that give a point's distance r from the origin and its angle θ from a fixed direction. Explained in Vectors.
parametric curve.
A description of a curve giving each coordinate as a function of one extra variable, such as time, like the path of a moving point. Explained in Parametric equations of lines and the cycloid.
normal vector.
A vector at right angles to a plane or surface; it fixes which way the plane faces. Explained in Planes through three points, and matrices.
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.
Gauss's theorem.
Another name for the divergence theorem: the total outward flow through a closed surface equals the total of the divergence inside it. Explained in Potential–density pairs: from point masses to dark matter halos.
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.
differentiable.
Having a derivative: at that point the graph has a single, definite, non-vertical tangent line, with no corner or break. Explained in The mean value theorem and inequalities.
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.
theorem.
A statement that has been proved true, step by step, from definitions and earlier results. Explained in Limits and continuity.
closed surface.
A surface with no edge that completely encloses a region of space, like the skin of a ball.
Gauss's law.
The law that the flux out of any closed surface is set by what is inside: the charge for electric fields, the mass for gravity. Explained in Gauss's law.
gravitational field.
The pull of gravity at each point of space, given as the force on each kilogram of mass placed there. Explained in The electric field.
Poisson's equation.
The equation linking a potential to its source: for gravity, the density of mass; for electricity, the density of charge. Explained in Why a static universe cannot work.
galaxy.
A huge system of stars, gas and dust, from thousands to over a trillion stars, held together by gravity inside a dark matter halo. Explained in Towards the universe: weighing the Sun and the Galaxy with orbits.
density.
How much of something (mass, charge, energy, particles or probability) there is in each unit of volume, area, length or other variable. Explained in Density and pressure.
linear perturbation theory.
Following small departures from a smooth state by keeping only terms in the equations that are proportional to the departures, not their squares. Explained in How small ripples grow: linear perturbation theory.

Academic

transcript.
A written record of exactly what was said in a recorded lecture, word for word.
no accident.
Not a matter of chance: there is a deeper reason why it happens.
likewise.
In the same way; similarly.
implicit.
Of a function: given by an equation linking x and y, such as x² + y² = 1, not by a formula y = f(x).

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

31 more cosmology pages that build on this

Pages that build on this

Practise

Check your understanding

  1. For the graph z=f(x,y)z = f(x, y), oriented upwards, n^ dS=\hat n\,dS =
  2. The divergence of F⃗=⟨x2,y,−3z⟩\vec F = \langle x^2, y, -3z\rangle is…
  3. The divergence theorem needs…
0 of 3 answered

Flashcards

1 / 3