Line integrals & conservative fields
A robot drags a load across a floor and a force field pushes back at every point. Add up the part of the force that acts along the direction of travel and you get the work. Route the same load between the same two points along a different path and the total usually changes — but for a special class of fields it does not, and in that case a single scalar surface, the potential, was deciding the answer all along.
Work along a path
The line integral of a field
Our running example is the two-link arm dragging a load: at every point of the workspace the load feels a force $F(x,y)$ — a vector field from Part 1. Move the load along a path $C$ and the total work is the sum, over the little pieces of the path, of the force measured along the direction of travel. That sum is the line integral of $F$ along $C$.
Write the path as a parametrised curve $r(t)$, $a \le t \le b$. The displacement over a short time is $dr = r'(t)\,dt$, and the work contribution is the projection of $F$ onto that displacement. With $t = r'/|r'|$ the unit tangent and $ds = |r'|\,dt$ the arc length,
The dot product keeps only the part of the force pushing along the path: force perpendicular to motion does no work. Drag the interior handles to bend the path, switch the field, and raise the load factor $k$ (the effective force is $kF$). The strip underneath plots the integrand $F\cdot t$ against arc length $s$; its signed area is the work in the readout.
Top: the field and the shaded path from A to B, with the field arrows drawn on the path. Bottom: the integrand $F\cdot t$ along the path; the area above the axis adds to the work, the area below subtracts.
When the answer depends on the path
Same endpoints, different work
Change the route between the same two points and the work generally changes. This is path dependence, and it is the norm rather than the exception. Drag the middle control point of the detour and watch $W_2$ move while $A$ and $B$ stay fixed. Switch from the rotational field $F = (-y, x)$ to the radial field $F = (x, y)$ and the two numbers snap together — a first hint that some fields do not care which way you go.
Two paths from the fixed point A to the fixed point B. The bold one is active; the other is dashed. Drag the circular handles in the middle of either path.
Conservative fields
Three descriptions of the same property
A field is conservative when the work between two points depends only on those points, never on the path joining them. Joining the two paths into one closed loop shows this is the same statement as
And that is the same statement as the existence of a scalar potential $\phi$ with $F = \nabla\phi$. On a simply-connected domain all three are equivalent, and for a planar field they collapse to one local computation on the components $F = (P, Q)$:
Drag the six loop vertices and watch the closed integral. For a potential field it stays at zero no matter how you deform the loop; for the rotational field it locks onto twice the enclosed area. Part 3 makes $\operatorname{curl}$ precise, and Part 4 turns the loop integral into the area integral that proves why.
A closed loop through the field. Drag any vertex; the readout is the circulation $\oint F\cdot dr$ around the loop.
The potential surface underneath
Reading a conservative field off its potential
For a conservative field the potential $\phi$ is the surface hiding underneath. Its level sets are equipotentials — curves of constant $\phi$ — and the gradient is perpendicular to them, pointing uphill. So the arrows of $F$ are always normal to the contour lines you see, and their size says how fast $\phi$ climbs.
Drag the probe. The canvas draws the numeric potential gradient $\nabla\phi$ and the field $F$ at the same point; the readout compares the two component by component, and they agree to numerical precision — a direct check that this field really is a gradient.
Shaded contours of φ with the field F = ∇φ drawn over them. The bold arrow at the draggable probe is ∇φ computed numerically; the field arrow sits on top of it.
The gradient theorem
Work is the potential difference
Collect what the last two steps imply. If $F = \nabla\phi$ then the line integral of $F$ depends only on the values of $\phi$ at the endpoints, because the interior contributions telescope away:
This is the Fundamental Theorem of Calculus of Volume I Part 9 one dimension up: integrating a derivative over an interval gives the difference of its primitive at the ends. It is also why lifting a load costs $mgh$ regardless of the route — only the height change matters, not the detours. Drag the path's middle handles: the left and right sides below refuse to separate.
A path from A to B over the potential contours. The readout computes $\int_A^B \nabla\phi\cdot dr$ by sampling and $\phi(B) - \phi(A)$ from the surface itself.
Where this shows up
Loops, trajectories, and the arm
The closed-loop integral you just measured is the left-hand side of Green's and Stokes' theorems, which relate it to an integral over the enclosed region — Part 4 builds the general statement and explains why a curl-free field has a potential at all. The same path integral is how an ODE accumulates: integrating $\dot p = F(p)$ along a trajectory is a line integral, which is Part 12. And in robotics, the work a motor does as the two-link arm carries a load is exactly this integral: for a gravity load $F$ is constant and $\phi = mgh$, so the work is the endpoint height difference, and integrating the field along a planned arm trajectory is this same integral.
Notation to carry forward
| Notation | Reads as | Where it comes up |
|---|---|---|
F·dr | The work of the field over one small displacement; in components P dx + Q dy | Every line integral below |
∫_C F·dr | The line integral of F along the oriented path C | This part; work and circulation |
∫_a^b F(r(t))·r'(t) dt | The line integral turned into an ordinary integral by a parametrisation | Computing any line integral |
∫_C F·t ds | The same integral in arc length; t is the unit tangent | The integrand strip in Step 1 |
∮_C F·dr = 0 | Zero circulation: path-independent, hence conservative | Step 3; Green and Stokes (Part 4) |
F = ∇φ | The field is the gradient of a potential — the potential exists | Steps 4–5; the gradient theorem |
curl F = ∂Q/∂x − ∂P/∂y | The local test for a conservative planar field; zero on a simply-connected domain | Step 3; Part 3 (curl) |
∫_A^B ∇φ·dr = φ(B) − φ(A) | The gradient theorem: work is the potential difference | Step 5; the FTC one dimension up |
Further reading
- 3Blue1Brown, Line integrals and conservative fields — the same path, the same arrows, animated.
- MIT 18.02SC, Multivariable Calculus — the course that runs alongside this volume, line integrals and all.
- Khan Academy, Multivariable calculus — extra practice on line integrals, curl and conservative fields.