31 min read

Every integral you have computed so far lives on a straight axis. The definite integral $\int_a^b f(x)\,dx$ from Chapter 13 sums $f$ across an interval — a one-dimensional stretch of the $x$-axis. The double integral $\iint_D f\,dA$ from Chapter 32...

Prerequisites

  • Chapter 28: Vector-Valued Functions
  • Chapter 34: Vector Fields

Learning Objectives

  • Compute line integrals $\int_C f \, ds$ of scalar fields.
  • Compute line integrals $\int_C \mathbf{F} \cdot d\mathbf{r}$ of vector fields.
  • Apply the Fundamental Theorem for Line Integrals (conservative fields).
  • Apply Green's theorem to convert line integrals to double integrals.
  • Compute work done by a force along a path.

Chapter 35 — Line Integrals

35.1 Integration Escapes the Straight Line

Every integral you have computed so far lives on a straight axis. The definite integral $\int_a^b f(x)\,dx$ from Chapter 13 sums $f$ across an interval — a one-dimensional stretch of the $x$-axis. The double integral $\iint_D f\,dA$ from Chapter 32 sums $f$ across a flat region of the plane. In both cases the domain of integration is a featureless chunk of $\mathbb{R}^n$.

But the world is not made of straight axes. A wire bends; a river curves; a hiker's trail switchbacks up a mountain. To compute the mass of a curved wire, the work a force does along a winding path, or the circulation of a swirling fluid, we need to integrate along a curve. That is the line integral — the subject of this chapter and the gateway to all of vector calculus.

There are two genuinely different kinds of line integral, and keeping them straight is the first skill to master:

  1. The scalar line integral $\int_C f\,ds$ adds up a scalar function $f$ along a curve $C$, weighting each bit of the curve by its arc length. Its archetype is the mass of a wire.
  2. The vector line integral $\int_C \mathbf{F}\cdot d\mathbf{r}$ adds up the component of a vector field $\mathbf{F}$ that points along an oriented curve. Its archetype is the work done by a force.

The Key Insight. A line integral chops a curve into tiny pieces, evaluates something on each piece, multiplies by the size of the piece, and sums — then takes the limit as the pieces shrink. This is the same Riemann-sum logic that built every integral since Chapter 13. The only new ingredient is that the pieces lie along a curve, so we parametrize the curve and pull everything back to an ordinary integral in the parameter $t$.

This chapter culminates in two results that are, quietly, the same theorem you met in Chapter 14 — the Fundamental Theorem of Calculus — wearing higher-dimensional clothing. The Fundamental Theorem for Line Integrals says that integrating a gradient along a path depends only on the endpoints, exactly as $\int_a^b F'\,dx = F(b)-F(a)$. And Green's Theorem relates an integral around a closed loop to a double integral over the region inside, the first true "boundary equals interior" statement in the family that will end with Stokes' and the Divergence Theorem (Chapter 37) and the universal FTC $\int_{\partial M}\omega = \int_M d\omega$ (Chapter 38). Calculus is the mathematics of change, and FTC is its beating heart; here that heart starts beating in two dimensions.

35.2 Scalar Line Integrals: The Mass of a Wire

Begin with the physical picture, because it carries the entire idea. Imagine a thin wire bent into the shape of a curve $C$ in space, made of a material whose density varies from point to point. Let $f(x,y,z)$ be the linear density (mass per unit length) at the point $(x,y,z)$. How much does the whole wire weigh?

Chop the wire into $n$ tiny segments. The $k$-th segment has some small length $\Delta s_k$ and sits near a point where the density is roughly $f(P_k)$. Its mass is approximately $f(P_k)\,\Delta s_k$. Summing and refining,

$$M = \lim_{n\to\infty}\sum_{k=1}^n f(P_k)\,\Delta s_k = \int_C f\,ds.$$

The symbol $ds$ is the arc-length element — an infinitesimal piece of curve length. To compute it, we use the machinery from Chapter 28. Parametrize $C$ by a smooth vector-valued function $\mathbf{r}(t) = \langle x(t), y(t), z(t)\rangle$ for $a \le t \le b$. As $t$ advances by $dt$, the curve advances by the velocity vector $\mathbf{r}'(t)$ scaled by $dt$, so the length swept is its magnitude:

$$ds = |\mathbf{r}'(t)|\,dt = \sqrt{x'(t)^2 + y'(t)^2 + z'(t)^2}\,dt.$$

Substituting turns the abstract "$\int_C$" into an ordinary single-variable integral you already know how to evaluate:

$$\boxed{\;\int_C f\,ds = \int_a^b f\big(\mathbf{r}(t)\big)\,|\mathbf{r}'(t)|\,dt.\;}$$

Geometric Intuition. Picture the curve $C$ lying flat on the floor and the graph of $f$ rising above it like a curtain whose height at each point of $C$ equals $f$ there. The scalar line integral $\int_C f\,ds$ is the area of that curtain — the area of the vertical "fence" erected along the curve. When $f \equiv 1$, the curtain is one unit tall everywhere and its area is just the length of the curve: $\int_C 1\,ds = \text{length of } C$. Every scalar line integral is an arc-length integral with a height built in.

Worked Example 1: A Straight Segment

Let $C$ be the line segment from $(0,0)$ to $(1,1)$, and let $f(x,y) = x + y$.

Parametrize the segment as $\mathbf{r}(t) = \langle t, t\rangle$ for $0 \le t \le 1$. Then $\mathbf{r}'(t) = \langle 1, 1\rangle$ and $|\mathbf{r}'(t)| = \sqrt{1^2 + 1^2} = \sqrt 2$. On the curve, $f(\mathbf{r}(t)) = t + t = 2t$. Therefore

$$\int_C (x+y)\,ds = \int_0^1 2t\cdot\sqrt 2\,dt = 2\sqrt 2\cdot\frac{t^2}{2}\bigg|_0^1 = \sqrt 2.$$

The $\sqrt 2$ is the diagonal's length factor; it would be wrong to leave it out, and that omission is the most common error in the whole topic.

Common Pitfall. Many students write $\int_C f\,ds$ as $\int_a^b f(\mathbf{r}(t))\,dt$ — forgetting the $|\mathbf{r}'(t)|$ factor entirely. But $ds$ is arc length, not $dt$. Without $|\mathbf{r}'(t)|$ you are measuring the curve by the clock of the parameter rather than by its true geometric length, and the answer changes if you re-time the parametrization. The check: $\int_C 1\,ds$ must give the length of $C$. With the factor, $\int_0^1 \sqrt 2\,dt = \sqrt 2$ — the length of the diagonal. Without it you would get $1$, which is wrong.

Worked Example 2: A Quarter Circle

Let $C$ be the quarter of the unit circle in the first quadrant, and let $f(x,y) = xy$. Parametrize $\mathbf{r}(t) = \langle\cos t, \sin t\rangle$, $0 \le t \le \pi/2$. Then $\mathbf{r}'(t) = \langle -\sin t, \cos t\rangle$ and $|\mathbf{r}'(t)| = \sqrt{\sin^2 t + \cos^2 t} = 1$ — the unit circle is traced at unit speed, so $ds = dt$. With $f = xy = \cos t\sin t$,

$$\int_C xy\,ds = \int_0^{\pi/2}\cos t\sin t\,dt = \int_0^{\pi/2}\tfrac12\sin(2t)\,dt = \tfrac12\cdot\Big[-\tfrac12\cos 2t\Big]_0^{\pi/2} = \tfrac12\cdot\tfrac12\,(1+1) = \tfrac12.$$

Independence of Parametrization

A crucial fact: the scalar line integral does not depend on how you parametrize $C$, nor on which direction you traverse it. Reverse the orientation, speed up, slow down — the value of $\int_C f\,ds$ stays the same. The reason is geometric: $\int_C f\,ds$ measures the area of that curtain, and the curtain does not care how fast you walk along its base or which end you start from. (This is the sharp contrast with vector line integrals, which do flip sign when you reverse direction — we will see why in §35.4.)

Mass and Center of Mass

With density $\rho(x,y,z)$, the mass of the wire is $M = \int_C \rho\,ds$, and its center of mass has coordinates

$$\bar x = \frac1M\int_C x\,\rho\,ds, \qquad \bar y = \frac1M\int_C y\,\rho\,ds, \qquad \bar z = \frac1M\int_C z\,\rho\,ds.$$

These are the curve analogues of the lamina formulas from Chapter 32 — the same physics, one dimension lower.

Check Your Understanding. Compute $\int_C x\,ds$ where $C$ is the line segment from $(0,0)$ to $(3,4)$.

AnswerParametrize $\mathbf{r}(t) = \langle 3t, 4t\rangle$, $0\le t\le 1$. Then $\mathbf{r}'(t) = \langle 3,4\rangle$, $|\mathbf{r}'(t)| = \sqrt{9+16} = 5$, and $x = 3t$. So $\int_C x\,ds = \int_0^1 3t\cdot 5\,dt = 15\cdot\tfrac12 = \tfrac{15}{2}$. Sanity check: the segment has length $5$ and its midpoint has $x = 1.5$, so the average of $x$ along it is $1.5$; multiplying by length $5$ gives $7.5$. ✓

35.3 Vector Line Integrals: Work Done by a Force

Now the second flavor, which is the workhorse of physics. Here the integrand is a vector field $\mathbf{F}$ (Chapter 34), and we integrate its component along an oriented curve.

The motivating problem is work. In elementary physics, work is force times distance — but only the component of force in the direction of motion counts. Push a box north while it slides east and you do no useful work on it. Along a curve, the direction of motion changes from point to point, so we must take the dot product of $\mathbf{F}$ with the tangent direction at every instant and accumulate.

Chop the path into tiny displacement vectors $d\mathbf{r}$. On each, the work done is $\mathbf{F}\cdot d\mathbf{r}$ — the force dotted with the displacement, which automatically extracts the tangential component. Summing and refining,

$$W = \int_C \mathbf{F}\cdot d\mathbf{r}.$$

To compute it, parametrize again: $d\mathbf{r} = \mathbf{r}'(t)\,dt$, so

$$\boxed{\;\int_C \mathbf{F}\cdot d\mathbf{r} = \int_a^b \mathbf{F}\big(\mathbf{r}(t)\big)\cdot\mathbf{r}'(t)\,dt.\;}$$

The integrand $\mathbf{F}\cdot\mathbf{r}'$ is a single scalar function of $t$ — the tangential component of the force times the speed — and the whole thing collapses to an ordinary integral.

Geometric Intuition. Decompose $\mathbf{F}$ at each point into a piece along the curve and a piece across it. Only the along-piece contributes to the line integral; the across-piece is "wasted" as far as work is concerned. Where $\mathbf{F}$ points with the motion, the integrand is positive (the force helps); where it points against, the integrand is negative (the force fights you). The line integral is the running net of help minus hindrance along the whole path.

An equivalent and illuminating form uses the unit tangent $\mathbf{T} = \mathbf{r}'/|\mathbf{r}'|$: since $\mathbf{r}'\,dt = \mathbf{T}\,|\mathbf{r}'|\,dt = \mathbf{T}\,ds$,

$$\int_C \mathbf{F}\cdot d\mathbf{r} = \int_C (\mathbf{F}\cdot\mathbf{T})\,ds.$$

This says the vector line integral is really a scalar line integral of the tangential component $\mathbf{F}\cdot\mathbf{T}$. The two flavors are cousins after all.

In components, writing $\mathbf{F} = \langle P, Q\rangle$ and $d\mathbf{r} = \langle dx, dy\rangle$, the integral is often written in differential form:

$$\int_C \mathbf{F}\cdot d\mathbf{r} = \int_C P\,dx + Q\,dy.$$

This notation will be indispensable when we reach Green's Theorem.

When the curve $C$ is closed (it returns to its start), the vector line integral is called the circulation of $\mathbf{F}$ around $C$, and we decorate the integral sign with a circle: $\oint_C \mathbf{F}\cdot d\mathbf{r}$.

Worked Example 3: A Radial Force Does No Work on a Circle

Let $\mathbf{F} = \langle x, y\rangle$ — a field pointing radially outward, with magnitude growing with distance. Move a particle along the quarter circle $\mathbf{r}(t) = \langle\cos t, \sin t\rangle$, $0\le t\le \pi/2$, from $(1,0)$ to $(0,1)$.

Compute $\mathbf{r}'(t) = \langle -\sin t, \cos t\rangle$ and $\mathbf{F}(\mathbf{r}(t)) = \langle\cos t, \sin t\rangle$. The dot product is

$$\mathbf{F}\cdot\mathbf{r}' = \cos t\,(-\sin t) + \sin t\,(\cos t) = 0.$$

So $W = \int_0^{\pi/2} 0\,dt = 0$. Geometrically obvious in hindsight: the force points radially (outward from the origin), the motion is tangential (around the circle), and perpendicular force does no work. Every instant the dot product vanishes.

Worked Example 4: A Field That Does Real Work

Let $\mathbf{F} = \langle y, x\rangle$ and move along the parabola $\mathbf{r}(t) = \langle t, t^2\rangle$ from $(0,0)$ to $(1,1)$, so $0\le t\le 1$. Then $\mathbf{r}'(t) = \langle 1, 2t\rangle$ and $\mathbf{F}(\mathbf{r}(t)) = \langle t^2, t\rangle$. The integrand is

$$\mathbf{F}\cdot\mathbf{r}' = t^2\cdot 1 + t\cdot 2t = 3t^2,$$

so $W = \int_0^1 3t^2\,dt = t^3\big|_0^1 = 1$. Hold onto this number — in §35.5 we will recompute it in a single step once we recognize $\mathbf{F} = \langle y, x\rangle$ as a gradient.

Check Your Understanding. For $\mathbf{F} = \langle 0, x\rangle$, compute the work along the straight segment from $(0,0)$ to $(1,1)$, parametrized as $\mathbf{r}(t)=\langle t,t\rangle$.

Answer$\mathbf{r}'(t) = \langle 1,1\rangle$, $\mathbf{F}(\mathbf{r}(t)) = \langle 0, t\rangle$, so $\mathbf{F}\cdot\mathbf{r}' = 0\cdot 1 + t\cdot 1 = t$. Then $W = \int_0^1 t\,dt = \tfrac12$.

35.4 Orientation Matters

Here is the decisive difference between the two flavors. A scalar line integral is blind to direction. A vector line integral reverses sign when you reverse direction:

$$\int_{-C}\mathbf{F}\cdot d\mathbf{r} = -\int_C \mathbf{F}\cdot d\mathbf{r}.$$

Why? Reversing the traversal negates the tangent vector $\mathbf{r}'$ at every point, so it negates the integrand $\mathbf{F}\cdot\mathbf{r}'$. Physically, walking the path backward means the force that helped you now hinders you: the work changes sign. (Compare $\int_b^a f\,dx = -\int_a^b f\,dx$ from Chapter 13 — same bookkeeping, one dimension up.)

For closed curves, the standard positive orientation is counterclockwise when viewed from above — the direction that keeps the enclosed region on your left. This convention is locked in for Green's Theorem; reverse it and every sign flips.

Warning. The orientation convention is not cosmetic. A clockwise traversal of a closed curve gives the negative of the counterclockwise circulation. When you apply Green's Theorem (§35.7) to a curve given clockwise, you must either reverse it (and flip the final sign) or, equivalently, put a minus sign on the double integral. Forgetting this is a sign error that propagates through an entire problem.

35.5 The Fundamental Theorem for Line Integrals

In Chapter 34 you met conservative vector fields — those that are the gradient of some scalar potential function $f$, so that $\mathbf{F} = \nabla f$. For these special fields, line integrals become trivial, and the reason is a direct echo of the Fundamental Theorem of Calculus.

Fundamental Theorem for Line Integrals. If $\mathbf{F} = \nabla f$ is a conservative field with potential $f$, and $C$ is any smooth curve from point $A = \mathbf{r}(a)$ to point $B = \mathbf{r}(b)$, then $$\int_C \nabla f\cdot d\mathbf{r} = f(B) - f(A).$$

The line integral depends only on the endpoints — not on the path taken between them. Whether you go straight, loop around, or take a scenic detour, the answer is the same: the potential at the end minus the potential at the start.

Why it is FTC again. Look at the structure. The single-variable FTC (Chapter 14) reads $\int_a^b F'(x)\,dx = F(b) - F(a)$: integrate a derivative, get the net change of the antiderivative across the endpoints. The line-integral version reads $\int_C \nabla f\cdot d\mathbf{r} = f(B) - f(A)$: integrate a gradient (the multivariable derivative), get the net change of the potential across the endpoints. The gradient $\nabla f$ is the derivative; the potential $f$ is the antiderivative; the endpoints $A$ and $B$ are the "boundary" of the curve. Same theorem, more dimensions.

The proof is the chain rule in disguise. Start from the definition and substitute $\mathbf{F} = \nabla f$:

$$\int_C \nabla f\cdot d\mathbf{r} = \int_a^b \nabla f(\mathbf{r}(t))\cdot\mathbf{r}'(t)\,dt.$$

By the multivariable chain rule (Chapter 30), the integrand is exactly the derivative of the composition $g(t) = f(\mathbf{r}(t))$:

$$\frac{d}{dt}f(\mathbf{r}(t)) = \nabla f(\mathbf{r}(t))\cdot\mathbf{r}'(t).$$

So we are integrating a plain derivative, and the single-variable FTC finishes the job:

$$\int_a^b \frac{d}{dt}f(\mathbf{r}(t))\,dt = f(\mathbf{r}(b)) - f(\mathbf{r}(a)) = f(B) - f(A). \qquad\blacksquare$$

The whole multivariable theorem reduces to the one-variable FTC after the chain rule pulls everything back to the parameter line. Hand computation builds the understanding; recognizing the gradient builds the power.

Worked Example 5: Evaluating by Potential

Recall Worked Example 4: $\mathbf{F} = \langle y, x\rangle$ from $(0,0)$ to $(1,1)$ along a parabola, which cost us an integral and gave $W = 1$. Notice that $\mathbf{F} = \nabla f$ with $f(x,y) = xy$, since $\nabla(xy) = \langle y, x\rangle$. By the Fundamental Theorem for Line Integrals,

$$\int_C \mathbf{F}\cdot d\mathbf{r} = f(1,1) - f(0,0) = (1)(1) - 0 = 1.$$

Same answer, no integration, and — crucially — no mention of the parabola. Any path from $(0,0)$ to $(1,1)$ gives $1$.

Worked Example 6: A Larger Potential Computation

Let $\mathbf{F} = \langle 2xy, x^2\rangle$. Is it conservative? Try potential $f = x^2 y$: then $\nabla f = \langle 2xy, x^2\rangle = \mathbf{F}$. ✓ So from $(0,0)$ to $(3,4)$ along any path,

$$\int_C \mathbf{F}\cdot d\mathbf{r} = f(3,4) - f(0,0) = (9)(4) - 0 = 36.$$

No parametrization, no curve, no integral — just two evaluations of the potential.

The Closed-Loop Corollary and Conservation of Energy

If $C$ is a closed curve, then $A = B$, so the difference of potentials vanishes:

$$\oint_C \nabla f\cdot d\mathbf{r} = f(A) - f(A) = 0.$$

Around any closed loop, a conservative field does zero net work. This is the mathematical face of conservation of energy. In physics a conservative force is one with a potential energy $U$ where $\mathbf{F} = -\nabla U$. The work done is $W = \int_C \mathbf{F}\cdot d\mathbf{r} = -(U_B - U_A) = U_A - U_B$ — the drop in potential energy. By the work–energy theorem this drop becomes kinetic energy, so $K + U$ stays constant. A ball rolling around a frictionless track and returning to its start has the same energy it began with: gravity did no net work. That is the closed-loop corollary, lived.

Real-World Application — Gravitational and Electrostatic Potential (physics). Newtonian gravity and the electrostatic (Coulomb) field are both conservative, with potentials $-GMm/r$ and $kQq/r$ respectively. The Fundamental Theorem for Line Integrals is why a satellite's orbital energy depends only on its altitude, not on the convoluted path it took to get there, and why "voltage" — electric potential difference — is a single number $V_B - V_A$ regardless of the wire's routing. Engineers state circuit voltages without ever specifying a path precisely because the electrostatic field is conservative.

35.6 Path Independence and the Three Equivalent Conditions

The Fundamental Theorem for Line Integrals reveals a property that not all fields share: path independence. A field is path-independent if $\int_C \mathbf{F}\cdot d\mathbf{r}$ depends only on the endpoints of $C$, not on the route. We have just shown that conservative fields are path-independent. The converse is also true, and there is a third equivalent condition involving the curl. For a field $\mathbf{F}$ defined on a simply-connected domain (one with no holes — every loop can be shrunk to a point), all three are equivalent:

  1. $\mathbf{F}$ is conservative: $\mathbf{F} = \nabla f$ for some potential $f$.
  2. $\mathbf{F}$ is curl-free: $\nabla\times\mathbf{F} = \mathbf{0}$ (in 2D, $\partial Q/\partial x = \partial P/\partial y$).
  3. $\mathbf{F}$ is path-independent: equivalently, $\oint_C \mathbf{F}\cdot d\mathbf{r} = 0$ for every closed loop $C$.

Any one of these implies the other two. (Condition 2 was the screening test of Chapter 34: a quick derivative check that flags whether a potential could exist.)

Worked Example 7: A Field That Depends on the Path

Let $\mathbf{F} = \langle -y, x\rangle$ — the rotational field that swirls counterclockwise. Take two paths from $(1,0)$ to $(-1,0)$.

Path 1 (upper semicircle): $\mathbf{r}(t) = \langle\cos t, \sin t\rangle$, $0\le t\le\pi$. Then $\mathbf{r}'(t) = \langle -\sin t, \cos t\rangle$ and $\mathbf{F}(\mathbf{r}(t)) = \langle -\sin t, \cos t\rangle$, so

$$\mathbf{F}\cdot\mathbf{r}' = (-\sin t)(-\sin t) + (\cos t)(\cos t) = \sin^2 t + \cos^2 t = 1, \qquad \int = \int_0^\pi 1\,dt = \pi.$$

Path 2 (lower semicircle): $\mathbf{r}(t) = \langle\cos t, -\sin t\rangle$, $0\le t\le\pi$ (going clockwise around the bottom from $(1,0)$ to $(-1,0)$). A parallel computation gives $\mathbf{F}\cdot\mathbf{r}' = -1$, so $\int = -\pi$.

Two paths, two different answers ($\pi$ versus $-\pi$). The field is not path-independent — and indeed its 2D curl is $\partial(x)/\partial x - \partial(-y)/\partial y = 1 - (-1) = 2 \ne 0$, so condition 2 fails. It is not conservative, and there is no potential.

Common Pitfall. Students sometimes "find" a potential for $\mathbf{F} = \langle -y, x\rangle$ by integrating $-y$ in $x$ to get $-xy$ and integrating $x$ in $y$ to get $xy$, then declaring victory. But these disagree ($-xy \ne xy$), which is exactly the symptom of a non-conservative field. There is no single $f$ with $f_x = -y$ and $f_y = x$. Always run the curl test ($Q_x = P_y$?) first: here $1 \ne -1$, so stop — no potential exists.

Math Major Sidebar — Why simple connectivity matters. The field $\mathbf{F} = \left\langle \dfrac{-y}{x^2+y^2}, \dfrac{x}{x^2+y^2}\right\rangle$ passes the curl test ($Q_x = P_y$) everywhere it is defined, yet $\oint_C \mathbf{F}\cdot d\mathbf{r} = 2\pi$ around the unit circle — not zero. How can a curl-free field fail to be conservative? Because its domain is the punctured plane $\mathbb{R}^2\setminus\{0\}$, which is not simply connected: the loop around the origin cannot shrink to a point without crossing the hole at the origin. Condition 2 implies condition 1 only on simply-connected domains. This field is the gradient of the angle $\theta = \arctan(y/x)$, which cannot be defined continuously all the way around the origin — the same obstruction that makes a single-valued "polar angle" impossible. The topology of the domain, not just the local derivatives, governs conservativeness.

35.7 Green's Theorem

We now arrive at the theorem this chapter exists to deliver. Green's Theorem relates a line integral around the boundary of a planar region to a double integral over the region's interior. It is the first genuine member of the "boundary equals interior" family, and it is the 2D ancestor of both Stokes' and the Divergence Theorem (Chapter 37).

Green's Theorem (circulation form). Let $C$ be a positively oriented (counterclockwise), piecewise-smooth, simple closed curve bounding a region $D$ in the plane. If $P$ and $Q$ have continuous partial derivatives on an open region containing $D$, then $$\oint_C P\,dx + Q\,dy = \iint_D \left(\frac{\partial Q}{\partial x} - \frac{\partial P}{\partial y}\right)dA.$$

The left side is a one-dimensional integral around the loop $C = \partial D$. The right side is a two-dimensional integral over the filled-in region $D$. Green's Theorem says they are equal — and either one can be computed in terms of the other, whichever is easier.

The integrand $\dfrac{\partial Q}{\partial x} - \dfrac{\partial P}{\partial y}$ is precisely the 2D curl (the $z$-component of $\nabla\times\mathbf{F}$) of the field $\mathbf{F} = \langle P, Q\rangle$. So Green's Theorem reads, in vector form,

$$\oint_C \mathbf{F}\cdot d\mathbf{r} = \iint_D (\nabla\times\mathbf{F})_z\,dA.$$

The Key Insight. Total circulation around the boundary equals total microscopic curl over the interior. Imagine paving $D$ with tiny cells, each spinning with its local curl. Adjacent cells share an edge, and their circulations along that shared edge run in opposite directions — so they cancel. Only the outermost edges, with no neighbor to cancel against, survive. Summing all the little interior curls therefore leaves exactly the circulation around the outer boundary. That telescoping of interior edges is the geometric soul of every theorem in this family, all the way to the universal FTC of Chapter 38.

Historical Note. The theorem is named for George Green (1793–1841), a self-taught English miller's son who published it in an obscure 1828 pamphlet, An Essay on the Application of Mathematical Analysis to the Theories of Electricity and Magnetism, that almost no one read at the time. Green had less than two years of formal schooling and ran his father's windmill while teaching himself mathematics from library books. His work was rediscovered and championed by William Thomson (Lord Kelvin) after Green's death. The "Green's function" of physics traces to the same forgotten pamphlet.

Worked Example 8: Verifying Green's Theorem

Take $\mathbf{F} = \langle -y, x\rangle$ (so $P = -y$, $Q = x$) and let $C$ be the unit circle counterclockwise, enclosing the disk $D$.

Double-integral side. The 2D curl is $Q_x - P_y = \dfrac{\partial x}{\partial x} - \dfrac{\partial(-y)}{\partial y} = 1 - (-1) = 2$. So

$$\iint_D 2\,dA = 2\cdot\text{area}(D) = 2\cdot\pi(1)^2 = 2\pi.$$

Line-integral side. With $\mathbf{r}(t) = \langle\cos t, \sin t\rangle$, $0\le t\le 2\pi$, we found $\mathbf{F}\cdot\mathbf{r}' = 1$ in §35.6, so $\oint_C \mathbf{F}\cdot d\mathbf{r} = \int_0^{2\pi} 1\,dt = 2\pi$. ✓ The two sides agree.

Worked Example 9: Green's Theorem Saves Labor

Compute $\oint_C (y^2 - x)\,dx + 3xy\,dy$, where $C$ is the boundary of the triangle with vertices $(0,0)$, $(1,0)$, $(1,1)$, traversed counterclockwise.

Computing this directly means three separate line integrals, one per edge — tedious and error-prone. Green's Theorem replaces it with one double integral. With $P = y^2 - x$ and $Q = 3xy$,

$$\frac{\partial Q}{\partial x} - \frac{\partial P}{\partial y} = 3y - 2y = y.$$

The triangle $D$ is described by $0 \le x \le 1$, $0 \le y \le x$. Therefore

$$\oint_C (y^2-x)\,dx + 3xy\,dy = \iint_D y\,dA = \int_0^1\!\!\int_0^x y\,dy\,dx = \int_0^1 \frac{x^2}{2}\,dx = \frac{1}{6}.$$

One double integral, cleanly done, instead of three line integrals.

Check Your Understanding. Use Green's Theorem to evaluate $\oint_C x\,dy$ where $C$ is the unit square $[0,1]\times[0,1]$ counterclockwise.

AnswerHere $P = 0$, $Q = x$, so $Q_x - P_y = 1 - 0 = 1$. Thus $\oint_C x\,dy = \iint_D 1\,dA = \text{area of the square} = 1$. (As §35.8 will show, $\oint_C x\,dy$ computing the area is no accident.)

Green's Theorem as an Area Formula

Choose $P$ and $Q$ so that $Q_x - P_y = 1$, and the double integral becomes the area of $D$. The symmetric choice $P = -y/2$, $Q = x/2$ gives $Q_x - P_y = \tfrac12 + \tfrac12 = 1$, so

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

This is a remarkable trick: you can measure the area of a region by walking only its boundary and integrating. A planimeter — the mechanical device draftsmen once used to measure the area of irregular shapes on a map by tracing the outline — is a physical embodiment of exactly this formula. The discrete version of the same identity is the shoelace formula of computational geometry, which computes a polygon's area from the coordinates of its vertices alone.

Real-World Application — Land surveying and GIS (geography/engineering). Geographic Information Systems compute the area of a parcel of land — a county, a lake, a forest stand — directly from the GPS coordinates of its boundary vertices using the shoelace formula, the discrete form of Green's area integral. No interior sampling is needed; the boundary carries all the information. The same routine measures the cross-sectional area of a CAD part from its outline and the area of a cell from a traced micrograph.

Worked Example 10: Area of an Ellipse

Find the area enclosed by the ellipse $\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1$. Parametrize the boundary $\mathbf{r}(t) = \langle a\cos t, b\sin t\rangle$, $0\le t\le 2\pi$, so $dx = -a\sin t\,dt$ and $dy = b\cos t\,dt$. Then

$$\text{Area} = \frac12\oint_C (x\,dy - y\,dx) = \frac12\int_0^{2\pi}\big[(a\cos t)(b\cos t) - (b\sin t)(-a\sin t)\big]\,dt = \frac12\int_0^{2\pi} ab\,dt = \pi a b.$$

The classic formula $\pi a b$, extracted from the boundary alone. (When $a = b = r$ it collapses to $\pi r^2$, the circle.)

35.8 Where Green's Theorem Sits in the Family

It is worth pausing to see the larger structure, because Green's Theorem is not a one-off curiosity — it is a stepping stone. Every theorem of vector calculus is the same slogan, the integral of a derivative over a region equals boundary data, realized in successively higher dimensions:

Theorem Statement Chapter
Fundamental Theorem of Calculus $\int_a^b F'\,dx = F(b) - F(a)$ 14
Fund. Thm. for Line Integrals $\int_C \nabla f\cdot d\mathbf{r} = f(B) - f(A)$ 35 (§35.5)
Green's Theorem $\oint_{\partial D}\mathbf{F}\cdot d\mathbf{r} = \iint_D(\nabla\times\mathbf{F})_z\,dA$ 35 (§35.7)
Stokes' Theorem $\oint_{\partial S}\mathbf{F}\cdot d\mathbf{r} = \iint_S(\nabla\times\mathbf{F})\cdot d\mathbf{S}$ 37
Divergence Theorem $\oiint_{\partial V}\mathbf{F}\cdot d\mathbf{S} = \iiint_V(\nabla\cdot\mathbf{F})\,dV$ 37
Generalized Stokes $\int_{\partial M}\omega = \int_M d\omega$ 38

Green's Theorem is exactly Stokes' Theorem flattened into the plane (take the surface $S$ to be a flat region $D$ in the $xy$-plane). It is also the 2D Divergence Theorem in its flux form (below). When Chapter 37 proves Stokes' and the Divergence Theorem, Green's Theorem will fall out as a special case — and Chapter 38 will reveal all of them as a single statement, $\int_{\partial M}\omega = \int_M d\omega$. You are watching the FTC grow up.

The Flux Form of Green's Theorem

Green's Theorem has a twin. Instead of the tangential component of $\mathbf{F}$ (circulation), integrate its outward normal component around $C$ — the flux of $\mathbf{F}$ across the boundary. The result relates flux to the divergence:

$$\oint_C \mathbf{F}\cdot\mathbf{n}\,ds = \iint_D \left(\frac{\partial P}{\partial x} + \frac{\partial Q}{\partial y}\right)dA = \iint_D \nabla\cdot\mathbf{F}\,dA.$$

This is the 2D Divergence Theorem: the net outward flow across the boundary equals the total "source strength" (divergence) inside. The circulation form measures swirling; the flux form measures spreading. Both are Green's Theorem, and both prefigure Chapter 37.

35.9 Applications Across Fields

Line integrals are field-agnostic. Here are several readings of the same mathematics.

Work against gravity (physics). Near Earth's surface the gravitational force is $\mathbf{F} = -mg\,\hat{\mathbf{z}}$, a conservative field with potential energy $U = mgz$. Lifting a mass from height $h_1$ to $h_2$ along any path costs work $W_{\text{you}} = mg(h_2 - h_1)$ against gravity — the path is irrelevant, only the height change matters, exactly as the Fundamental Theorem for Line Integrals predicts. A mover carrying a box up a spiral ramp does the same work against gravity as one taking the stairs.

Spring energy (physics/engineering). A spring exerts the restoring force $F = -kx$. The work the spring does as it goes from $x_1$ to $x_2$ is $\int_{x_1}^{x_2}(-kx)\,dx = -\tfrac12 k(x_2^2 - x_1^2)$, and the stored elastic potential energy is $U = \tfrac12 k x^2$. This is the same integral we computed in Chapter 14 for variable-force work, now recognized as a line integral along a 1D path.

Real-World Application — Magnetic forces do no work (physics). A charged particle in a magnetic field feels the Lorentz force $\mathbf{F} = q\mathbf{v}\times\mathbf{B}$. The cross product is always perpendicular to the velocity $\mathbf{v}$, so $\mathbf{F}\cdot\mathbf{v} = 0$ at every instant. Hence along any trajectory, $\int_C \mathbf{F}\cdot d\mathbf{r} = \int \mathbf{F}\cdot\mathbf{v}\,dt = 0$: magnetic forces do zero work. They bend a charged particle's path into circles and helices (Chapter 28) but never change its speed or kinetic energy. This is why cyclotrons and mass spectrometers steer particles with magnets but accelerate them with electric fields — only the electric field can pump in energy.

Circulation and lift (fluid dynamics). For a fluid with velocity field $\mathbf{u}$, the circulation $\Gamma = \oint_C \mathbf{u}\cdot d\mathbf{r}$ around a closed loop measures the net swirl. The Kutta–Joukowski theorem of aerodynamics states that the lift per unit span on an airfoil equals $\rho\, U\,\Gamma$ — density times airspeed times circulation. An airplane stays aloft because the air circulates around its wings; that circulation is literally a line integral. By Green's Theorem (and its 3D cousin Stokes', Chapter 37), this boundary circulation equals the total vorticity over the enclosed surface.

Electromagnetism (physics). Two of Maxwell's equations are line integrals around closed loops. Ampère's law, $\oint_C \mathbf{B}\cdot d\mathbf{r} = \mu_0 I_{\text{enc}}$, relates the circulation of the magnetic field to the enclosed current. Faraday's law, $\oint_C \mathbf{E}\cdot d\mathbf{r} = -\dfrac{d\Phi_B}{dt}$, relates the circulation of the electric field (the electromotive force, EMF) to the changing magnetic flux through the loop. For a static electric field the EMF is zero (the field is conservative); a changing magnetic field is what drives current in generators and transformers. These laws are the foundation of every electric motor and power plant on Earth.

35.10 Computing Line Integrals with Python

The standard three-tier pattern — pose analytically, solve by hand, verify by machine — applies cleanly here. We compute a vector line integral numerically and then numerically verify Green's Theorem, watching both sides of the identity converge to the same number.

# Vector line integral of F = <-y, x> along the upper semicircle from (1,0) to (-1,0).
# Hand result (Worked Example 7, Path 1): the integral equals pi.
import numpy as np
from scipy.integrate import quad

def integrand(t: float) -> float:
    x, y = np.cos(t), np.sin(t)            # the point r(t) on the curve
    F = np.array([-y, x])                  # the field at that point
    r_prime = np.array([-np.sin(t), np.cos(t)])  # the velocity vector
    return F @ r_prime                     # F . r'  (a scalar)

value, _ = quad(integrand, 0, np.pi)
print(f"Line integral  : {value:.6f}")     # 3.141593  ( = pi )
print(f"pi             : {np.pi:.6f}")      # 3.141593   -> they match

Now verify Green's Theorem numerically for $\mathbf{F} = \langle -y, x\rangle$ on the unit disk. The line-integral side is the circulation around the boundary circle; the double-integral side is $\iint_D 2\,dA = 2\pi$. We compute the boundary integral as a Riemann sum and compare.

# Green's Theorem check: circulation of F=<-y,x> around the unit circle
# should equal the double integral of its curl (=2) over the disk = 2*pi.
import numpy as np

t = np.linspace(0, 2*np.pi, 100_001)       # parameter samples around the loop
x, y = np.cos(t), np.sin(t)                 # boundary points
dx, dy = np.gradient(x, t), np.gradient(y, t)  # dx/dt, dy/dt

P, Q = -y, x                                # F = <P, Q> = <-y, x>
integrand = P*dx + Q*dy                     # (P dx + Q dy)/dt
circulation = np.trapz(integrand, t)        # boundary line integral

curl = 2.0                                  # Q_x - P_y = 1 - (-1) = 2
double_integral = curl * np.pi              # integral of 2 over unit disk

print(f"Boundary circulation : {circulation:.6f}")   # 6.283185
print(f"Interior double int. : {double_integral:.6f}")# 6.283185
print(f"Both equal 2*pi      : {2*np.pi:.6f}")        # 6.283185  -> Green's Theorem confirmed

Computational Note. Notice the structural parallel to the FTC verification in Chapter 14. There, np.cumsum built an accumulation function and np.gradient recovered the integrand — FTC made numerical. Here, np.trapz sums $P\,dx + Q\,dy$ around the boundary while a one-line area computation handles the interior — Green's Theorem made numerical. Both scripts demonstrate the same slogan, "boundary equals interior," at different dimensions. When the numbers match to six digits, you have watched a theorem of pure mathematics shake hands with floating-point arithmetic.

The general procedure for a vector line integral $\int_C \mathbf{F}\cdot d\mathbf{r}$:

  1. Check for a potential first. If $\mathbf{F} = \nabla f$ (run the curl test, §35.6), use the Fundamental Theorem: the answer is $f(B) - f(A)$. Skip straight to step 6.
  2. Parametrize the curve: $\mathbf{r}(t)$, $a \le t \le b$, in the correct direction.
  3. Differentiate: compute $\mathbf{r}'(t)$.
  4. Substitute the parametrization into $\mathbf{F}$: form $\mathbf{F}(\mathbf{r}(t))$.
  5. Dot and integrate: compute $\mathbf{F}(\mathbf{r}(t))\cdot\mathbf{r}'(t)$ and integrate from $a$ to $b$.
  6. For a closed loop, consider Green's Theorem instead — a double integral of the curl may be far easier than the boundary integral.

For a scalar line integral $\int_C f\,ds$, step 5 becomes $f(\mathbf{r}(t))\,|\mathbf{r}'(t)|$ — the magnitude of the velocity, not the velocity dotted with anything.

The errors that cost the most points:

  • Dropping $|\mathbf{r}'(t)|$ in a scalar integral. $\int_C f\,ds$ needs the arc-length factor; $\int_C 1\,ds$ must return the curve's length.
  • Confusing the two flavors. Scalar uses $|\mathbf{r}'|\,dt$; vector uses $\cdot\,\mathbf{r}'\,dt$ (a dot product). They are different integrals with different answers.
  • Wrong orientation. A vector line integral flips sign with direction; a clockwise loop needs a sign flip before Green's Theorem.
  • Applying Green's Theorem to a non-closed curve. Green's requires a closed boundary. For an open arc, parametrize directly or close the curve and subtract the added piece.
  • Forgetting the curl test before hunting for a potential. Trying to build $f$ for a non-conservative field wastes time and produces contradictions (§35.6 pitfall).

Add to Your Modeling Portfolio. Add a line-integral computation to your model — work, circulation, or accumulation along a path. Biology: model a cell migrating along a chemoattractant gradient $\mathbf{F} = \nabla c$ (concentration $c$); compute the "uphill work" $\int_C \nabla c\cdot d\mathbf{r} = c(\text{end}) - c(\text{start})$ and note it is path-independent — the cell's energy expense depends only on the concentration difference, a direct use of the Fundamental Theorem for Line Integrals. Economics: model a path-dependent total cost as a line integral $\int_C \mathbf{F}\cdot d\mathbf{r}$ over a sequence of production decisions, and test whether your cost field is conservative (route-independent) or not. Physics: compute the work done by your force field (gravity, spring, drag) along a chosen trajectory, distinguishing conservative forces (use the potential) from dissipative ones (integrate directly). Data Science: compute the path integral of a learned vector field — e.g., the work accumulated by following a gradient-descent trajectory through a loss landscape — and check, via Green's Theorem on a small loop, whether the field is curl-free.

Looking Ahead

You can now integrate along any curve — scalar fields for mass, vector fields for work and circulation — and you command the two theorems that make these integrals powerful: the Fundamental Theorem for Line Integrals (work depends only on endpoints for conservative fields) and Green's Theorem (a boundary loop integral equals an interior double integral).

Chapter 36 lifts integration one dimension higher, to surface integrals: integrating scalar fields over a curved surface (surface area and mass of a shell) and vector fields through a surface (flux, $\iint_S \mathbf{F}\cdot d\mathbf{S}$ — how much of $\mathbf{F}$ passes through $S$). Line integrals were to curves what surface integrals are to surfaces.

Chapter 37 delivers the climax: Stokes' Theorem and the Divergence Theorem, the full 3D generalizations of Green's Theorem. Stokes' relates the circulation around a boundary curve to the curl over a spanning surface; the Divergence Theorem relates the flux through a closed surface to the divergence over the enclosed volume. Green's Theorem, which felt like the summit of this chapter, will be revealed as merely the flat, two-dimensional shadow of those grander statements — and Chapter 38 will fold all of them, FTC included, into a single line: $\int_{\partial M}\omega = \int_M d\omega$.

Reflection

A line integral is just a Riemann sum that has learned to follow a curve. That modest idea carries an enormous payload. It computes the mass of a bent wire and the work of a wandering force; it reveals that conservative fields forget their paths and remember only their endpoints — conservation of energy, written as calculus. And in Green's Theorem it delivers the first true statement that the behavior on a region's boundary is determined by what happens throughout its interior, the pattern that organizes all of vector calculus. Every formula here had a picture, and every picture had a formula; that inseparability of geometry and algebra is what makes the subject beautiful. You have taken the Fundamental Theorem of Calculus and bent it around a curve. In the next two chapters you will stretch it across a surface and fill it into a volume — and discover it was one theorem all along.