Unit 5, lesson 36

Conservative Fields and the Fundamental Theorem for Line Integrals

When the work done by a field depends only on the endpoints, how to compute it from a potential, how to find that potential, and exactly which conditions on the domain make the cross-partial test reliable.

  • Theory part 71
  • Practice part 72
  • Vector Fields and Line Integrals

Carry a backpack from the bottom of a hill to the top. Gravity does the same work on it whether you take the steep trail or the long switchbacks, because only the change in height matters. Fields with this property are called conservative, and for them a line integral collapses to a subtraction of two numbers. The catch is deciding when a field really has this property, and that turns out to depend on the shape of its domain as well as on its formula.

Key terms

Conservative fields and potentials

Definition Let DD be an open set in R2\mathbb{R}^2 or R3\mathbb{R}^3 and F\mathbf{F} a vector field that is continuous on DD. The field is conservative on DD if there is a differentiable function ff on DD with

∇f=Fat every point of D.\nabla f = \mathbf{F} \quad \text{at every point of } D.

Such an ff is a potential function for F\mathbf{F}. Since its partial derivatives are the continuous components of F\mathbf{F}, a potential is automatically C1C^1 on DD. In physics the potential energy is usually taken to be −f-f.

In plain words A conservative field is the gradient of some function. That function plays the role of height, and wherever the field is nonzero it points in the direction where the height increases fastest.

Example The field F(x,y)=⟨2xy,x2⟩\mathbf{F}(x, y) = \langle 2xy, x^2 \rangle is conservative on all of R2\mathbb{R}^2, since the function f(x,y)=x2yf(x, y) = x^2 y has fx=2xyf_x = 2xy and fy=x2f_y = x^2.

Connected open domains

Definition An open set DD is connected if any two points of DD can be joined by a piecewise regular curve that lies entirely in DD. For open sets this agrees with the general notions of connected and path-connected, and the curve can even be taken to be a chain of line segments. A connected open set is often called a domain. If DD is open and connected and ∇f=∇g\nabla f = \nabla g on DD, then f−gf - g is constant on DD. So on a connected open set a potential is unique up to an added constant.

In plain words A connected set comes in one piece. Line integrals can only compare points that some path in the set reaches, so this is the natural setting for everything below.

Example The set D={(x,y):x≠0}D = \{ (x, y) : x \ne 0 \} is open but not connected, since no path inside it crosses the yy-axis. The function equal to 00 for x>0x > 0 and to 11 for x<0x < 0 has gradient 0\mathbf{0} on DD, yet it is not constant. On a connected set this cannot happen.

Potential difference and the fundamental theorem

Definition Let DD be an open set, ff a C1C^1 function on DD, and CC an oriented piecewise regular curve in DD from the point AA to the point BB. Then

∫C∇f⋅dr=f(B)−f(A).\int_C \nabla f \cdot d\mathbf{r} = f(B) - f(A).

The right side is the potential difference between the endpoints. To prove it, take a regular piece with parametrization r(t)\mathbf{r}(t), a≤t≤ba \le t \le b. By the chain rule

ddtf(r(t))=∇f(r(t))⋅r′(t),\frac{d}{dt} f(\mathbf{r}(t)) = \nabla f(\mathbf{r}(t)) \cdot \mathbf{r}'(t),

so the fundamental theorem of calculus gives f(r(b))−f(r(a))f(\mathbf{r}(b)) - f(\mathbf{r}(a)) on that piece. Adding over the pieces, the values at the joints cancel and only f(B)−f(A)f(B) - f(A) remains.

In plain words For a gradient field the line integral is the final value of the potential minus the starting value. The path in between does not matter.

Example For F=⟨2xy,x2⟩=∇(x2y)\mathbf{F} = \langle 2xy, x^2 \rangle = \nabla(x^2 y), along any piecewise regular curve from (1,1)(1, 1) to (2,3)(2, 3),

∫CF⋅dr=22⋅3−12⋅1=11.\int_C \mathbf{F} \cdot d\mathbf{r} = 2^2 \cdot 3 - 1^2 \cdot 1 = 11.

As a check, the parabola r(t)=⟨1+t,1+2t2⟩\mathbf{r}(t) = \langle 1 + t, 1 + 2t^2 \rangle, 0≤t≤10 \le t \le 1, joins these points, and the direct computation also gives 1111.

Path independence

Definition Let F\mathbf{F} be continuous on an open set DD. The integral ∫CF⋅dr\int_C \mathbf{F} \cdot d\mathbf{r} is path independent in DD if any two oriented piecewise regular curves in DD with the same initial point and the same terminal point give the same value.

If F\mathbf{F} is continuous on a connected open set DD, then the integral of F\mathbf{F} is path independent in DD if and only if F\mathbf{F} is conservative on DD.

One direction is the fundamental theorem. For the other, fix a point AA in DD and define f(X)f(X) as the integral of F\mathbf{F} along any path in DD from AA to XX. Connectedness makes such a path exist, and path independence makes the value well defined. Because DD is open, a path to (x,y)(x, y) can end with a short horizontal segment, and differentiating along that segment gives fx=Pf_x = P. A vertical segment gives fy=Qf_y = Q, and similarly in space.

In plain words Same endpoints, same answer, for every route. That happens exactly when the field has a potential.

Example For F=⟨2xy,x2⟩\mathbf{F} = \langle 2xy, x^2 \rangle the straight segment ⟨1+t,1+2t⟩\langle 1 + t, 1 + 2t \rangle from (1,1)(1, 1) to (2,3)(2, 3) gives

∫01(2(1+t)(1+2t)+2(1+t)2) dt=∫01(4+10t+6t2) dt=11,\begin{aligned} &\int_0^1 \big( 2(1 + t)(1 + 2t) \\[0.4em] &\qquad + 2(1 + t)^2 \big) \, dt \\[0.4em] &\quad = \int_0^1 (4 + 10t + 6t^2) \, dt = 11, \end{aligned}

the same as along the parabola. In contrast, the field ⟨−y,x⟩\langle -y, x \rangle gives work 11 along the segment from (1,0)(1, 0) to (0,1)(0, 1) and π/2\pi/2 along the quarter circle, so it is not conservative on any open set containing both paths.

Closed-loop integrals

Definition Let F\mathbf{F} be continuous on an open set DD. The integral of F\mathbf{F} is path independent in DD if and only if

∮CF⋅dr=0\oint_C \mathbf{F} \cdot d\mathbf{r} = 0

for every closed oriented piecewise regular curve CC in DD. The reason is that two paths C1C_1 and C2C_2 from AA to BB form the closed curve C1C_1 followed by −C2-C_2, whose integral is the difference of their integrals. Conversely, choosing two points AA and BB on a loop splits it into two paths from AA to BB, one of them traversed backwards.

In plain words A conservative field does zero net work around every loop. You end where you started, so the potential difference is zero.

Example For F=⟨−y,x⟩\mathbf{F} = \langle -y, x \rangle the circulation around the unit circle counterclockwise is 2π2\pi. One loop with a nonzero integral is enough to prove that the field is not conservative on any open set containing that loop.

The cross-partial test

Definition Let F=⟨P,Q⟩\mathbf{F} = \langle P, Q \rangle have continuous first partial derivatives on an open set DD in R2\mathbb{R}^2. If F\mathbf{F} is conservative on DD, then

∂P∂y=∂Q∂xon D.\frac{\partial P}{\partial y} = \frac{\partial Q}{\partial x} \quad \text{on } D.

Indeed a potential ff then has continuous second partials, and Clairaut’s theorem gives fxy=fyxf_{xy} = f_{yx}. For F=⟨P,Q,R⟩\mathbf{F} = \langle P, Q, R \rangle with continuous first partials on an open set in R3\mathbb{R}^3, conservative implies the three equations

Ry=Qz,Pz=Rx,Qx=Py.R_y = Q_z, \quad P_z = R_x, \quad Q_x = P_y.

These say that the curl ⟨Ry−Qz, Pz−Rx, Qx−Py⟩\langle R_y - Q_z, \, P_z - R_x, \, Q_x - P_y \rangle is 0\mathbf{0}, a quantity studied in the next lesson.

In plain words This is a quick local check. If the cross partials differ anywhere in DD, the field cannot be conservative on DD. Passing the test, though, does not by itself prove the field is conservative.

Example For F=⟨y,2x⟩\mathbf{F} = \langle y, 2x \rangle we get Py=1P_y = 1 and Qx=2Q_x = 2. They differ everywhere, so F\mathbf{F} is not conservative on any open set.

Curl-free fields on simply connected domains

Definition A connected open set DD is simply connected if every closed curve in DD can be continuously shrunk to a point within DD, that is, deformed through a continuous family of closed curves, all lying in DD, that ends at a single point. In the plane this means DD has no holes. In space, R3\mathbb{R}^3 with one point removed is still simply connected, while R3\mathbb{R}^3 with the zz-axis removed is not, since a loop around the axis cannot be shrunk. The converse of the cross-partial test holds under the following hypotheses.

Let DD be an open, simply connected set in R2\mathbb{R}^2 and let PP and QQ have continuous first partial derivatives on DD. If Py=QxP_y = Q_x everywhere on DD, then ⟨P,Q⟩\langle P, Q \rangle is conservative on DD. In R3\mathbb{R}^3 the same holds for ⟨P,Q,R⟩\langle P, Q, R \rangle with continuous first partials on an open, simply connected DD satisfying all three cross-partial equations, that is with zero curl on DD.

In plain words Passing the local test is enough only when the domain has no holes for a loop to wrap around. On a domain with a hole, a field can pass the test at every point and still circulate around the hole.

Example The field

F(x,y)=⟨−yx2+y2, xx2+y2⟩\mathbf{F}(x, y) = \left\langle \frac{-y}{x^2 + y^2}, \, \frac{x}{x^2 + y^2} \right\rangle

has continuous partials on D=R2∖{(0,0)}D = \mathbb{R}^2 \setminus \{(0, 0)\}, and both cross partials equal

y2−x2(x2+y2)2.\frac{y^2 - x^2}{(x^2 + y^2)^2}.

Still, around the unit circle counterclockwise the integrand is sin⁡2t+cos⁡2t=1\sin^2 t + \cos^2 t = 1 and the circulation is 2π2\pi, so F\mathbf{F} is not conservative on DD. The theorem does not apply because DD has a hole at the origin. On the half plane x>0x > 0, which is simply connected, the same field equals ∇arctan⁡(y/x)\nabla \arctan(y/x).

Finding potentials

Definition Suppose F=⟨P,Q,R⟩\mathbf{F} = \langle P, Q, R \rangle has continuous first partials and passes the cross-partial test on a simply connected open set DD such as all of R3\mathbb{R}^3, an open box or an open ball, so a potential exists. To find it, integrate the first component with respect to xx,

f(x,y,z)=∫P dx+g(y,z),f(x, y, z) = \int P \, dx + g(y, z),

where the constant of integration gg may depend on the other variables. Differentiate with respect to yy and match with QQ to find gg up to a function h(z)h(z), then match fzf_z with RR to find hh up to a constant. In the plane stop after the second step. Finish by checking that ∇f=F\nabla f = \mathbf{F}.

In plain words Undo one partial derivative at a time, and let each new step pin down the unknown part left by the previous one.

Example Let F=⟨yz, xz+2y, xy+cos⁡z⟩\mathbf{F} = \langle yz, \, xz + 2y, \, xy + \cos z \rangle on R3\mathbb{R}^3. The cross partials agree, Ry=x=QzR_y = x = Q_z, Pz=y=RxP_z = y = R_x and Qx=z=PyQ_x = z = P_y, and R3\mathbb{R}^3 is simply connected. Integrating PP gives f=xyz+g(y,z)f = xyz + g(y, z). Then fy=xz+gy=xz+2yf_y = xz + g_y = xz + 2y, so g=y2+h(z)g = y^2 + h(z). Finally fz=xy+h′(z)=xy+cos⁡zf_z = xy + h'(z) = xy + \cos z, so h=sin⁡zh = \sin z and

f(x,y,z)=xyz+y2+sin⁡z+K.f(x, y, z) = xyz + y^2 + \sin z + K.

The work along any path from (0,0,0)(0, 0, 0) to (1,2,π/2)(1, 2, \pi/2) is

f(1,2,π2)−f(0,0,0)=π+5.f\left(1, 2, \tfrac{\pi}{2}\right) - f(0, 0, 0) = \pi + 5.

Check yourself

  1. Find a potential for F(x,y)=⟨3x2y+2, x3−4y⟩\mathbf{F}(x, y) = \langle 3x^2 y + 2, \, x^3 - 4y \rangle on R2\mathbb{R}^2 and the work it does along any path from (0,0)(0, 0) to (1,2)(1, 2).
Show the answer

Both cross partials equal 3x23x^2 and R2\mathbb{R}^2 is simply connected. Integrating PP gives f=x3y+2x+g(y)f = x^3 y + 2x + g(y), and fy=x3+g′(y)=x3−4yf_y = x^3 + g'(y) = x^3 - 4y gives g=−2y2g = -2y^2. So f=x3y+2x−2y2f = x^3 y + 2x - 2y^2, and the work is

f(1,2)−f(0,0)=2+2−8=−4.f(1, 2) - f(0, 0) = 2 + 2 - 8 = -4.
  1. The field G(x,y)=⟨xx2+y2, yx2+y2⟩\mathbf{G}(x, y) = \left\langle \dfrac{x}{x^2 + y^2}, \, \dfrac{y}{x^2 + y^2} \right\rangle satisfies the cross-partial test on R2∖{(0,0)}\mathbb{R}^2 \setminus \{(0, 0)\}, which is not simply connected. Is it conservative there?
Show the answer

Yes. The function f=12ln⁡(x2+y2)f = \frac{1}{2} \ln(x^2 + y^2) is C1C^1 on the punctured plane and ∇f=G\nabla f = \mathbf{G}. A domain with a hole means the test cannot guarantee a potential, not that a potential cannot exist.

  1. Let F\mathbf{F} be the field ⟨−yx2+y2,xx2+y2⟩\left\langle \frac{-y}{x^2 + y^2}, \frac{x}{x^2 + y^2} \right\rangle. Find its integral along any piecewise regular path from (1,0)(1, 0) to (1,1)(1, 1) that stays in the half plane x>0x > 0.
Show the answer

On the half plane x>0x > 0 the field has the potential arctan⁡(y/x)\arctan(y/x), so the integral is

arctan⁡1−arctan⁡0=π4.\arctan 1 - \arctan 0 = \frac{\pi}{4}.

A path that loops around the origin leaves the half plane, and then the answer can differ by a multiple of 2π2\pi.

How this lesson connects

It also uses Vector line integrals, gradients and the chain rule and Open domains and elementary mixed partial derivatives.