Flux through surfaces, sources inside a balloon, and the theorem that lets any surface with the same rim give the same answer
Green’s theorem has two big siblings in space. The divergence theorem weighs everything flowing out through a closed surface against the sources inside it. Stokes’ theorem says that the swirl threading a surface depends only on its rim, so a flat disk and a long, rippling butterfly net on the same hoop catch exactly the same amount. Both are the fundamental theorem of calculus, one dimension up.
Choose a field and a surface, then tilt, turn and lift the surface. Its colour shows where the flow crosses along the yellow normals and where against them; the readout adds it all up. In the uniform field, tilt the disk and compare the flux with πR² cos α.
Colour: sky where F · n > 0 (the flow crosses along the yellow normals), rose where it crosses against them, dark where it slides along the surface. The flux is ∬ F(r(u, v)) · (r_u × r_v) du dv by 64 × 128 Gauss–Legendre nodes; the normals of the open surfaces point away from the rim’s inside, and the cylinder’s outward. Arrow lengths are compressed and hidden near the point source, where the field blows up; particles move at compressed speeds. Drag to orbit.
An oriented surface S comes with a choice of unit normal n at each point. If F is the velocity of a fluid, the volume crossing a small patch of area dS per unit time is the patch times the normal component of the velocity, F · n dS: flow along the surface carries nothing across. Adding up gives the flux,
∬_S F · n dS = ∬_D F(r(u, v)) · (r_u × r_v) du dv
where r(u, v) parametrises S over a region D of the (u, v)-plane. The cross product does two jobs at once: its direction is the normal and its length |r_u × r_v| is the area stretch, the same Jacobian idea as in the change-of-variables lesson. Reversing the orientation flips the sign.
For a uniform field of strength |F| crossing a flat disk of area A whose normal makes angle α with F, the flux is |F| A cos α, the same cos α as in the dot product. For the point source F = r/|r|³ the flux through a surface is the solid angle it subtends at the source: 2π for a hemisphere centred on it, 4π for any closed surface around it.
Drag the white handle at the centre of the sphere or box, or use the sliders, and resize it. The outward flux through the surface always matches what is inside. Slide it across a charge and watch the flux jump, then add sources and sinks of your own.
Units with 4πε₀ = 1, so a charge q has field q(r − p)/|r − p|³ and Gauss’s law reads flux = 4π × charge enclosed. The flux is integrated over the surface itself by adaptive 3 × 3 Gauss–Legendre patches, refined where a nearby charge makes the integrand peak; it is not computed from the charges. Surface colour: sky for outward flow, rose for inward. Added charges get random positions and charges of ±0.5, ±1 or ±1.5.
Let E be a solid region whose boundary ∂E is a closed surface with outward normal n, and let F have continuous partial derivatives on E. Then
∯_∂E F · n dS = ∭_E div F dV, with div F = ∂P/∂x + ∂Q/∂y + ∂R/∂z
The proof idea is the tile argument behind Green’s theorem, in three dimensions. Cut E into tiny boxes. The net outflow from one box of volume ΔV is close to div F ΔV, which is what divergence means. Where two boxes meet, the flow out of one is the flow into the other, so the inner faces cancel, and the sum over all boxes is the flux through the outer surface.
The field of a point charge, q(r − p)/|r − p|³, has zero divergence everywhere except at p, where it is not defined. All of its divergence is concentrated at the charge, with total 4πq, so the flux out of any closed surface is 4π times the charge inside: charges outside send in exactly as much as they let out. In SI units, with E = q(r − p)/(4πε₀|r − p|³), this is Gauss’s law, ∯ E · n dS = Q/ε₀, one of Maxwell’s equations.
The theorem was found more than once. Lagrange used a special case in 1762 and Gauss proved cases of it in 1813; Mikhail Ostrogradsky gave a general proof in 1826, and in Russian it is still called Ostrogradsky’s theorem.
The golden rim is fixed. Reshape the net hanging from it with the sliders, or press Morph, and watch the colours shift while the flux of the curl stays exactly equal to the circulation round the rim. Try each field, or type your own.
Colour: sky where curl F crosses the net along its normal, rose where it crosses against it. The normal and the rim’s direction are matched by the right-hand rule: curl your fingers the way the beads run and your thumb points along the normal, up for the flat disk. The flux is integrated over the net’s parametrisation with 48 × 96 Gauss–Legendre nodes, the circulation round the rim with 192; the two are computed independently and agree to many digits for smooth fields. Drag to orbit.
Let S be an oriented surface whose boundary is a closed curve C, oriented so that, walking along C with your head pointing along n, the surface is on your left: the right-hand rule. For F with continuous partial derivatives,
∬_S (curl F) · n dS = ∮_C F · dr, with curl F = (R_y − Q_z, P_z − R_x, Q_x − P_y)
When S is flat, in the xy-plane, only the third component of the curl counts and this is Green’s theorem. The proof idea is the same as before: tile S by tiny patches, each with circulation close to (curl F) · n times its area, and let the shared edges cancel.
Why does the shape of the net not matter? Two nets on the same rim together enclose a solid. The divergence of a curl is always zero, so by the divergence theorem the flux of curl F out through the closed surface is zero: whatever enters through one net leaves through the other. Curl fields are the ones whose flux depends only on the boundary.
The theorem first appeared in a letter from William Thomson, later Lord Kelvin, to George Gabriel Stokes in 1850. Stokes set it as a question in the Cambridge Smith’s Prize examination of 1854, and his name stuck.
Set side by side, the great theorems of this module and the fundamental theorem of calculus all say one thing:
In each, a derivative integrated over a region equals the original quantity integrated over the region’s boundary, with matching orientations (the endpoints count with signs, − at a and + at b). In the language of differential forms, developed by Élie Cartan, gradient, curl and divergence are all one operation, the exterior derivative d, and the four statements become a single one, often called the generalized Stokes theorem:
∫_Ω dω = ∫_∂Ω ω
Here Ω is a compact oriented k-dimensional manifold with boundary, in any number of dimensions, ∂Ω its boundary with the induced orientation, and ω a smooth form of degree k − 1. Two more facts fit the same pattern: a boundary has no boundary of its own, and d applied twice gives zero, which in three dimensions is curl(∇φ) = 0 and div(curl F) = 0. The edge of a region knows the total of the derivative inside, and that is what calculus has been about since the very first secant line.
Spot a mistake or have an idea?