Conservative Vector Fields
Some force fields are lazy. Drop a ball, and gravity does the same total work on it whether it
falls straight down or you first carry it on a long looping detour and lower it in gently at the
end — all that matters is how far it dropped, start to finish. Push a charge around between two
points in an electric field, and the same laziness shows up: the work depends only on the two
endpoints, never on the winding route between them. Fields with this "doesn't care which way you
went" property are called conservative, and the reason they behave this way is
that each one is secretly hiding a single scalar function — a potential — that
does all the bookkeeping.
On the previous page a
line integral
generally depended on the whole path. For one special family that dependence dissolves. A
field \mathbf{F} is conservative when it is a
gradient field — when there is a scalar potential
f with
\mathbf{F} = \nabla f = (f_x,\; f_y).
For such a field the work between two points doesn't care how you travel — only
where you start and finish. That is the fundamental theorem for line integrals
(FTLI), the multivariable cousin of the
fundamental theorem of calculus:
\int_C \nabla f \cdot d\mathbf{r} = f(\text{end}) - f(\text{start}).
Proving the FTLI, line by line
Let C be parametrised by \mathbf{r}(t),
a \le t \le b, and let
\mathbf{F} = \nabla f. We follow the integral straight to its
endpoints.
Step 1 — reduce to an ordinary integral. Parametrising the vector line
integral (as on the previous page) gives
\int_C \nabla f \cdot d\mathbf{r} = \int_a^b \nabla f\big(\mathbf{r}(t)\big) \cdot \mathbf{r}'(t)\, dt.
Step 2 — recognise the chain rule. By the
multivariable chain rule,
the derivative of the composite f(\mathbf{r}(t)) is exactly that
dot product:
\frac{d}{dt}\, f\big(\mathbf{r}(t)\big) = f_x\, x'(t) + f_y\, y'(t) = \nabla f\big(\mathbf{r}(t)\big) \cdot \mathbf{r}'(t).
Step 3 — substitute. The integrand is a perfect derivative in
t:
\int_a^b \nabla f\big(\mathbf{r}(t)\big)\cdot\mathbf{r}'(t)\, dt = \int_a^b \frac{d}{dt}\, f\big(\mathbf{r}(t)\big)\, dt.
Step 4 — apply the ordinary fundamental theorem. The integral of a
derivative is the net change of the antiderivative:
\int_a^b \frac{d}{dt}\, f\big(\mathbf{r}(t)\big)\, dt = f\big(\mathbf{r}(b)\big) - f\big(\mathbf{r}(a)\big).
Step 5 — read off the result. Since
\mathbf{r}(b) is the end and
\mathbf{r}(a) the start,
\int_C \nabla f \cdot d\mathbf{r} = f(\text{end}) - f(\text{start}).
The parametrisation has vanished entirely. Any two paths sharing the same endpoints give the
same answer — the integral is path-independent — and around a
closed loop, where end equals start, the work is 0.
The test, and reconstructing the potential
Given \mathbf{F} = (P, Q), how do we know a potential exists — and
how do we find it? In a simply connected region (one with no holes) there is
a clean test.
Step 1 — apply the cross-partial test. A conservative field must satisfy
\frac{\partial P}{\partial y} = \frac{\partial Q}{\partial x},
and on a simply connected region this condition is also sufficient. Take
\mathbf{F} = (2xy,\; x^2 + 1). Then
P_y = 2x and Q_x = 2x — they agree, so a
potential exists.
Step 2 — integrate P in x.
We need f_x = P = 2xy, so integrate treating
y as a constant:
f(x, y) = \int 2xy \, dx = x^2 y + g(y),
where the "constant" of integration g(y) may depend on
y (it vanishes under \partial_x).
Step 3 — match the other partial. Differentiate this
f by y and set it equal to
Q:
f_y = x^2 + g'(y) \;=\; Q = x^2 + 1 \quad\Rightarrow\quad g'(y) = 1.
Step 4 — solve for the leftover. Integrating,
g(y) = y + C, so
f(x, y) = x^2 y + y + C.
Step 5 — check. Indeed
\nabla f = (2xy,\; x^2 + 1) = \mathbf{F}. The potential is
reconstructed, and now any line integral of \mathbf{F} is just a
difference of f-values.
-
Equivalences. On a connected open region, these are equivalent:
\mathbf{F} = \nabla f for some potential
f; the line integral
\int_C \mathbf{F}\cdot d\mathbf{r} is path-independent; and
\oint_C \mathbf{F}\cdot d\mathbf{r} = 0 around every closed loop.
-
Fundamental theorem for line integrals. If
\mathbf{F} = \nabla f, then
\int_C \mathbf{F}\cdot d\mathbf{r} = f(\text{end}) - f(\text{start}).
-
The cross-partial test. If
\partial P/\partial y = \partial Q/\partial x throughout a
simply connected region, then \mathbf{F} = (P, Q) is
conservative — and the potential is recovered by integrating
P in x and matching against
Q.
"Conservative" is borrowed from physics: a conservative force conserves
energy. Define potential energy
U = -f; then the work the field does moving a particle from
A to B is
f(B) - f(A) = U(A) - U(B) — the drop in potential energy,
turned into kinetic energy. Total energy stays fixed. Gravity and electrostatics are
conservative, which is why "potential energy" and "voltage" are well-defined numbers at
each point. Friction is not conservative: drag a box around a loop and you never
get the work back.
The "simply connected" caveat is not pedantry. Consider the swirl
\mathbf{F} = \left( \frac{-y}{x^2 + y^2},\; \frac{x}{x^2 + y^2} \right).
A direct computation gives
P_y = Q_x = \dfrac{y^2 - x^2}{(x^2+y^2)^2} everywhere it is
defined — the test passes. Yet integrating once counterclockwise around the unit
circle yields
\oint_C \mathbf{F}\cdot d\mathbf{r} = 2\pi \ne 0,
so the field is not conservative. What went wrong? The field blows up at
the origin, and the disk has a hole there: the region is not simply connected, and
the test's sufficiency fails. This single example is the seed of de Rham cohomology and the
winding number — the hole is "felt" by the integral even though the test is locally blind to
it.
Worked example: catching a non-conservative field
Not every field passes the test. Take the rotation field
\mathbf{F}(x, y) = (-y,\; x) — the one that swirls like water round a
drain — and check whether it is conservative.
Step 1 — apply the cross-partial test. Here
P = -y and Q = x, so
\frac{\partial P}{\partial y} = -1, \qquad \frac{\partial Q}{\partial x} = 1.
Since -1 \ne 1, the test fails. No potential
f can exist with \nabla f = \mathbf{F} —
if one did, equality of mixed partials
(f_{xy} = f_{yx}) would force
P_y = Q_x, and it doesn't.
Step 2 — confirm it with two paths. The
previous page
computed the work of this very field from (1,0) to
(-1,0) two ways: \pi along the upper
semicircle, but 0 along the straight chord through the origin. Two
routes, two different answers — exactly what a failed test predicts, and exactly the opposite of
what happened with the gradient field (2xy, x^2+1) above.
A field that fails the cross-partial test is guaranteed to be non-conservative somewhere; a field
that passes it is conservative provided its domain has no holes — which is exactly the
subtlety in the next callout.
Three small print items trip people up almost every time:
-
The potential is only defined up to a constant. If
f is a potential for \mathbf{F}, so is
f + C for any constant C —
adding a constant doesn't change its gradient. Never expect a uniquely determined potential;
expect a whole family differing by a constant.
-
"Conservative" and "closed loop gives zero" are the same statement — not two
separate facts to memorise. Path-independence and
\oint_C \mathbf{F}\cdot d\mathbf{r} = 0 are logically equivalent to
\mathbf{F} = \nabla f, so proving any one of the three proves all
three.
-
The cross-partial test only certifies "conservative" on a nice domain — one
with no holes (simply connected). Pass the test on a region with a puncture, and you have
merely shown the field is locally well-behaved; the swirling field
(-y, x)/(x^2+y^2) below is the standard cautionary tale.
Two paths, one answer
For a gradient field the route is irrelevant. Pick two different paths between the same start
and end and watch both line integrals land on exactly
f(\text{end}) - f(\text{start}) — switch the path with the button.
(Compare this with the rotation field on the previous page, where the route changed the
answer.)
The same idea, worn again and again
You have already met this idea wearing a physics costume: potential energy
U = -f is literally the potential function of a conservative
force, and "energy is conserved" is just the fundamental theorem for line integrals said out
loud. The same idea turns up again, in an ODE costume, as soon as you write a differential
equation M\,dx + N\,dy = 0 and ask whether the left-hand side is the
total differential of some hidden function — the cross-partial test
P_y = Q_x you just used reappears there almost unchanged, as
exactness.
Same test, same trick of integrating one variable and matching the other, completely different
subject heading.
See it explained