3
Part Zero · Foundations

Multivariable calculus and vector fields

A spring bubbles up somewhere in the middle of a pond, but you cannot see the bottom. Can you tell how much water the spring is producing just by standing at the edge of a circle around it and measuring what flows out across the circle?

Yes, and the reason is one of the two great theorems of this chapter. Physics is full of quantities that have a size and a direction at every point: the velocity of water, the electric field, the flow of heat. To reason about them we need calculus that works in more than one dimension.

Fields of arrows

A vector field attaches an arrow to every point. The plate shows three, with tracer particles drifting along them. Look at , where water pours outward from the middle; , where it circles; and , where it flows straight but faster on one bank than the other.

Divergence: how much comes out

Draw a tiny box anywhere in the flow and ask how much more water leaves it than enters it, per unit area. That number is the divergence. For a field F=(Fx,Fy)\mathbf F = (F_x, F_y) it is

∇⋅F=∂Fx∂x+∂Fy∂y\nabla\cdot\mathbf F = \frac{\partial F_x}{\partial x} + \frac{\partial F_y}{\partial y}

The whirlpool and the river have zero divergence everywhere: whatever flows into a box flows out. The spring has all of its divergence concentrated at the single point where the water appears.

Watching the boundary

Now answer the opening question. Around the spring, draw a circle of radius 1.0 and add up the flow crossing it. The flow weakens as 1/r1/r, but the circle grows as 2πr2\pi r, so the total, the flux, comes out at exactly 2π2\pi for every circle.

That is the divergence theorem: the flux out through a closed boundary equals the total divergence inside it.

∮∂VF⋅dA=∫V∇⋅F dV\oint_{\partial V}\mathbf F\cdot d\mathbf A = \int_V \nabla\cdot\mathbf F\, dV

In three dimensions the same thing happens with a field that weakens as 1/r21/r^2, like gravity or the electric field of a charge: the flux through any sphere around the source is 4π4\pi, whatever its radius. That fact is Gauss’s law, and you will meet it again in electromagnetism. Established

Curl: does it make things spin?

Drop a tiny paddle wheel into the flow. If it turns, the field has curl there. In a whirlpool it spins, as you would expect. Now . The water flows perfectly straight, yet the wheel turns, because one side of it is pushed harder than the other.

(∇×F)z=∂Fy∂x−∂Fx∂y(\nabla\times\mathbf F)_z = \frac{\partial F_y}{\partial x} - \frac{\partial F_x}{\partial y}

For the whirlpool F=(−y,x)\mathbf F = (-y, x) the curl is 2 everywhere; for the river F=(y,0)\mathbf F = (y, 0) it is −1-1. Curl measures local rotation, not whether the flow goes round in circles.

Stokes’ theorem

Walk once around a loop in the whirlpool and add up how much the flow pushes you along. That total is the circulation. Stokes’ theorem says it equals the total curl inside the loop:

∮∂SF⋅dr=∫S(∇×F)⋅dA\oint_{\partial S}\mathbf F\cdot d\mathbf r = \int_S (\nabla\times\mathbf F)\cdot d\mathbf A

For the whirlpool and a circle of radius RR: the curl is 2, the area is πR2\pi R^2, so the circulation is 2πR22\pi R^2. Walking around the edge, the speed is RR and the distance is 2πR2\pi R: the same answer, as it must be.

Gradient: the way uphill

A third operation turns a single number at each point, such as temperature or height, into a field of arrows. The gradient ∇f=(∂f/∂x,∂f/∂y)\nabla f = (\partial f/\partial x, \partial f/\partial y) points in the direction where ff rises fastest, and its length is how fast. The plate shows a hill as contour lines, and the gradient arrows crossing every contour at right angles.

Forces often come from gradients: a ball rolls along −∇V-\nabla V, straight down the steepest slope of its potential energy. That single idea will carry us into quantum mechanics.

Counting area in circles

Problems with round symmetry are easier in polar coordinates, but area has to be counted honestly. A small patch between radius rr and r+drr+dr and angle θ\theta and θ+dθ\theta+d\theta is not dr dθdr\,d\theta; it is r dr dθr\,dr\,d\theta, because patches further out are wider. The plate shows equal steps in rr and θ\theta making bigger and bigger patches.

In three dimensions, with the usual spherical angles, the volume element is dV=r2sin⁡θ dr dθ dϕdV = r^2\sin\theta\,dr\,d\theta\,d\phi. The factor in front is called the Jacobian. You will need this one for the hydrogen atom.

DeeperThe Jacobian is the determinant of the matrix of partial derivatives of (x,y,z)(x,y,z) with respect to (r,θ,ϕ)(r,\theta,\phi). For polar coordinates, x=rcos⁡θx = r\cos\theta, y=rsin⁡θy = r\sin\theta, and det⁡(cos⁡θ−rsin⁡θsin⁡θrcos⁡θ)=r\det\begin{pmatrix}\cos\theta & -r\sin\theta\\ \sin\theta & r\cos\theta\end{pmatrix} = r.

What you now have

Gradient, divergence and curl, and two theorems that trade what happens inside a region for what happens on its edge. Maxwell’s equations are written in exactly this language.

· · ·

Three questions to carry with you.

Why is the flux of a 1/r² field through a sphere independent of the radius?tap
The field falls as 1/r² while the sphere’s area grows as r², so the product stays 4π.
How can a straight flow have curl?tap
If its speed changes across the flow, one side of a paddle wheel is pushed harder than the other, so the wheel turns.
Why is the polar area element r dr dθ rather than dr dθ?tap
A step dθ in angle covers an arc of length r dθ, which grows with distance from the centre.

And one to work out. A charge produces the field E=r^/r2\mathbf E = \hat{\mathbf r}/r^2. What is the flux through a sphere of radius 3?

flux =

Sources: H. M. Schey, Div, Grad, Curl, and All That. J. Marsden and A. Tromba, Vector Calculus. Results checked by hand and code: flux of r̂/r through a circle = 2π; flux of r̂/r² through a sphere = 4π; curl of (−y, x) = 2.

Next · Chapter 4
Ordinary differential equations

Radioactive decay, an RC circuit and a swinging bridge obey the same few equations.

Turn the page