26. Green's theorem

📖 Reading · 9 min
💡 Every code box below is live — edit it and hit Run.

§12.3's conservative-field test, P_y=Q_x, was justified through Clairaut's theorem — a plausible but somewhat indirect argument. Green's theorem supplies the real reason: it's a direct bridge between a line integral around a closed curve and a double integral over the region that curve encloses, and §12.3's test falls out as one immediate special case.

The theorem

Let C be a positively oriented (counterclockwise), simple closed curve bounding a region D. If P and Q have continuous partial derivatives on D: \oint_CP\,dx+Q\,dy=\iint_D\left(\frac{\partial Q}{\partial x}-\frac{\partial P}{\partial y}\right)dA

In words: circulation of \vec F=\langle P,Q\rangle around the boundary of a region equals the double integral, over the region's interior, of the single quantity Q_x-P_y. This quantity — Q_x-P_y — will be named the scalar curl in §12.5, and it measures the field's local rotational tendency at each point; Green's theorem says summing that local rotation over the whole interior gives exactly the net circulation around the boundary.

Why §12.3's test now has a real explanation

If P_y=Q_x everywhere in D, the integrand Q_x-P_y is identically zero, so:

\oint_CP\,dx+Q\,dy=\iint_D0\,dA=0

for every closed curve C bounding a region inside the domain where P_y=Q_x holds — recovering §12.3's claim that a conservative field has zero circulation around any closed loop, now derived directly from Green's theorem rather than argued through the Fundamental Theorem of Line Integrals alone. Both routes reach the same conclusion; Green's theorem reaches it by literally converting the circulation into a double integral that vanishes term by term.

Computing area via Green's theorem

Choose P=-\frac y2, Q=\frac x2 — then Q_x-P_y=\frac12-\left(-\frac12\right)=1, so Green's theorem gives:

\oint_C\left(-\frac y2\right)dx+\left(\frac x2\right)dy=\iint_D1\,dA=\text{Area}(D)

\boxed{\text{Area}(D)=\frac12\oint_C\big(x\,dy-y\,dx\big)}

This turns an area computation into a boundary-only calculation — no need to describe the interior of a region at all (no Type I/II description, no polar conversion), only its boundary curve, parametrized once. This is especially valuable for regions whose boundary has a clean parametrization but whose interior would be awkward to describe directly — exactly the situation for an ellipse, worked below.

Doing it in Python

Verifying Green's theorem directly for \vec F(x,y)=\langle-y,x\rangle over the unit disk — computing both sides independently and confirming they match §12.2's circulation result:

import sympy as sp

x, y, t = sp.symbols('x y t')

# right side: double integral of Q_x - P_y over the disk
P, Q = -y, x
Q_x = sp.diff(Q, x)
P_y = sp.diff(P, y)
double_integral = sp.integrate(
    sp.integrate(Q_x - P_y, (y, -sp.sqrt(1 - x**2), sp.sqrt(1 - x**2))),
    (x, -1, 1)
)
print(f"double integral of (Q_x - P_y) over the disk = {double_integral}")

# left side: circulation, computed directly (as in section 12.2)
x_t, y_t = sp.cos(t), sp.sin(t)
r_prime = sp.Matrix([sp.diff(x_t, t), sp.diff(y_t, t)])
F = sp.Matrix([P, Q]).subs({x: x_t, y: y_t})
circulation = sp.integrate(F.dot(r_prime), (t, 0, 2*sp.pi))
print(f"circulation around the unit circle = {circulation}")
print(f"match: {double_integral == circulation}")

Computing the area of an ellipse using Green's theorem's boundary-only formula — an ellipse's interior is awkward to describe directly, but its boundary parametrizes cleanly:

import sympy as sp

t, a, b = sp.symbols('t a b', positive=True)
x_t, y_t = a * sp.cos(t), b * sp.sin(t)
dx, dy = sp.diff(x_t, t), sp.diff(y_t, t)

area = sp.Rational(1, 2) * sp.integrate(x_t * dy - y_t * dx, (t, 0, 2*sp.pi))
print(f"area of the ellipse = {sp.simplify(area)}")
print("matches the standard ellipse area formula pi*a*b")

Worked example

Verify Green's theorem for \vec F(x,y)=\langle-y,x\rangle over the unit disk, and confirm it reproduces §12.2's circulation calculation.

Right side — the double integral. P=-y\Rightarrow P_y=-1. Q=x\Rightarrow Q_x=1.

Q_x-P_y=1-(-1)=2

\iint_D2\,dA=2\cdot\text{Area(unit disk)}=2\cdot\pi(1)^2=\boxed{2\pi}

Left side — the circulation, from §12.2's own worked computation of this exact field around this exact curve: \boxed{2\pi}.

Sanity check. Both sides give 2\pi — a direct confirmation of Green's theorem, using a field and curve already computed independently two lessons ago by pure line-integral means. It's also a satisfying closure: §12.0 first introduced \langle-y,x\rangle as "a rotational field," §12.2 measured its circulation directly and got a nonzero number, §12.3 showed P_y\ne Q_x meant it wasn't conservative, and now Green's theorem explains why the circulation came out nonzero: the scalar curl Q_x-P_y=2 is constant and positive throughout the disk, meaning the field genuinely rotates at every single point inside, not just around the boundary. ✓

Your turn

1. Use Green's theorem to evaluate \oint_Cy\,dx+x^2\,dy where C is the boundary of the square [0,1]\times[0,1] (positively oriented).

2. Use the area formula \text{Area}=\frac12\oint(x\,dy-y\,dx) to find the area enclosed by the circle x=3\cos t, y=3\sin t, t\in[0,2\pi] (a direct sanity check against \pi r^2).

3. True or false: Green's theorem applies to any closed curve C, regardless of whether it's traced clockwise or counterclockwise.

Solutions

1. P=y\Rightarrow P_y=1. Q=x^2\Rightarrow Q_x=2x.

\oint_Cy\,dx+x^2\,dy=\iint_D(2x-1)\,dA=\int_0^1\int_0^1(2x-1)\,dy\,dx=\int_0^1(2x-1)\,dx=\Big[x^2-x\Big]_0^1=0

\boxed{0}

2. x=3\cos t,y=3\sin t\Rightarrow dx=-3\sin t\,dt,\ dy=3\cos t\,dt.

x\,dy-y\,dx=(3\cos t)(3\cos t\,dt)-(3\sin t)(-3\sin t\,dt)=9\cos^2t\,dt+9\sin^2t\,dt=9\,dt

\text{Area}=\frac12\int_0^{2\pi}9\,dt=\frac12\cdot9\cdot2\pi=9\pi

\boxed{9\pi}

— matching \pi(3)^2=9\pi exactly, confirming the boundary-only formula against the elementary circle-area formula.

3. False. Green's theorem, as stated, requires positive orientation (counterclockwise). Tracing C clockwise instead reverses the sign of the line integral (§12.2's direction-dependence, applied to a closed curve specifically), so the correct statement for a clockwise-oriented curve is \oint_{C,\text{clockwise}}P\,dx+Q\,dy=-\iint_D(Q_x-P_y)\,dA — the formula still applies, but only after accounting for the sign flip that orientation reversal always introduces.

Check yourself in code

Verify Green's theorem for \vec F(x,y)=\langle-y,x\rangle over the unit disk: compute the double integral of Q_x-P_y and the direct circulation, and confirm they match.

Print exactly this:

double integral = 2*pi
circulation = 2*pi
match: True
import sympy as sp

x, y, t = sp.symbols('x y t')

P, Q = -y, x
Q_x = sp.diff(Q, x)
P_y = sp.diff(P, y)
double_integral = sp.integrate(
    sp.integrate(Q_x - P_y, (y, -sp.sqrt(1 - x**2), sp.sqrt(1 - x**2))),
    (x, -1, 1)
)
print("double integral = ...")

x_t, y_t = sp.cos(t), sp.sin(t)
r_prime = sp.Matrix([sp.diff(x_t, t), sp.diff(y_t, t)])
F = sp.Matrix([P, Q]).subs({x: x_t, y: y_t})
circulation = sp.integrate(F.dot(r_prime), (t, 0, 2*sp.pi))
print("circulation = ...")
print("match: ...")
import sympy as sp

x, y, t = sp.symbols('x y t')

P, Q = -y, x
Q_x = sp.diff(Q, x)
P_y = sp.diff(P, y)
double_integral = sp.integrate(
    sp.integrate(Q_x - P_y, (y, -sp.sqrt(1 - x**2), sp.sqrt(1 - x**2))),
    (x, -1, 1)
)
print(f"double integral = {double_integral}")

x_t, y_t = sp.cos(t), sp.sin(t)
r_prime = sp.Matrix([sp.diff(x_t, t), sp.diff(y_t, t)])
F = sp.Matrix([P, Q]).subs({x: x_t, y: y_t})
circulation = sp.integrate(F.dot(r_prime), (t, 0, 2*sp.pi))
print(f"circulation = {circulation}")
print(f"match: {double_integral == circulation}")

Green's theorem, \oint_CP\,dx+Q\,dy=\iint_D(Q_x-P_y)\,dA, converts a circulation integral around a positively oriented closed curve into a double integral of the scalar curl Q_x-P_y over the enclosed region — directly explaining §12.3's conservative-field test, since P_y=Q_x everywhere makes that double integral vanish identically. Choosing P=-\frac y2,Q=\frac x2 turns the same theorem into a boundary-only area formula, \text{Area}=\frac12\oint(x\,dy-y\,dx), useful whenever a region's boundary is easy to parametrize but its interior is not.

Next: the scalar curl Q_x-P_y gets promoted to a full three-dimensional vector operator, alongside its sibling divergence — the two local measurements that Stokes' theorem and the divergence theorem will generalize Green's theorem around in the rest of this module.