Lesson 9 of 15

The Exterior Derivative

The Exterior Derivative

The exterior derivative dd generalizes the gradient, curl, and divergence into a single unified operator. It maps pp-forms to (p+1)(p+1)-forms.

For a 1-form ω=Pdx+Qdy\omega = P\,dx + Q\,dy on R2\mathbb{R}^2, the exterior derivative is a 2-form:

dω=(QxPy)dxdyd\omega = \left(\frac{\partial Q}{\partial x} - \frac{\partial P}{\partial y}\right) dx \wedge dy

The coefficient QxPy\frac{\partial Q}{\partial x} - \frac{\partial P}{\partial y} is the curl of the vector field (P,Q)(P, Q).

Closed and Exact Forms

A form ω\omega is:

  • Closed if dω=0d\omega = 0 — the curl vanishes
  • Exact if ω=df\omega = df for some function ff — it is the differential of something

Stokes's theorem says: Mω=Mdω\int_{\partial M} \omega = \int_M d\omega.

Examples

One-form ω\omegadωd\omega coefficient
ydxxdyy\,dx - x\,dy11=2-1 - 1 = -2
xdx+ydy=d(x2+y22)x\,dx + y\,dy = d(\frac{x^2+y^2}{2})00 (exact)
x2dx+xydyx^2\,dx + xy\,dyy0=yy - 0 = y

Your Task

Implement exterior_d(P, Q) that computes the exterior derivative of the 1-form ω=Pdx+Qdy\omega = P\,dx + Q\,dy. Return a function of (x,y)(x, y) giving the coefficient of dxdydx \wedge dy.

Python runtime loading...
Loading...
Click "Run" to execute your code.