Generalise the Fundamental Theorem of Calculus: the integral of a derivative over a region equals the value of the function on the boundary.


divergence theorem (Gauss)

Think of as fluid velocity. is the net outflow per unit volume at a point (sources create fluid, sinks () destroy it).

The total flux crossing the closed boundary equals the sum of all sources minus sinks inside. If water flows out of a lake (the surface integral) and there’s a non-zero net flow, there must be a spring or leak inside.

Stokes’ theorem

The circulation of around a closed loop equals the flux of curl through any surface bounded by that loop.

is the local rotation (vorticity) — direction along the axis of spin, magnitude its strength. Sum the spin of paddlewheels (spinning at a rate proportional to the component of curl normal to it) across the surface = the net push felt along the rim. Any two surfaces sharing the same boundary give the same flux of curl.

stokes.png

Green’s theorem (Stokes in 2D)

Specialise Stokes to a flat surface in the xy-plane: .

The 2D curl is a scalar — circulation per unit area in the plane. Green’s is Stokes with the 3D surface squashed flat. The curl vector collapses to a single scalar component normal to the plane.

greens.png

Jacobian decomposition

The Jacobian contains all vector calculus:

J = jax.jacfwd(F)(x)                                 # 3×3 Jacobian
div = jnp.trace(J)                                   # ∂F_x/∂x + ∂F_y/∂y + ∂F_z/∂z
curl = jnp.array([J[2,1]-J[1,2], J[0,2]-J[2,0], J[1,0]-J[0,1]])
curl_2d = J[1,0] - J[0,1]                            # ∂Q/∂x - ∂P/∂y