Unit 6, chapter 25

When a path integral only needs its endpoints

Why the work of the field (y, x) from the origin to (1, 1) is 1 on every path, explained with line integrals, exact differentials, potential functions, conservative fields and the fundamental theorem for line integrals.

  • Chapter 25
  • Line integrals, Green's theorem and the divergence theorem

A particle moves from the origin to the point (1,1)(1, 1) through the force field F(x,y)=(y,x)\mathbf{F}(x, y) = (y, x), and the work the field does on it is the line integral ∫C(y dx+x dy)\int_C (y\,dx + x\,dy) along its path CC. The straight diagonal, a path with a corner and a curve that bends back and forth all join the same two points, but nothing yet says that they give the same work. This page shows that each of them, and every other piecewise continuously differentiable path between these points, gives exactly 11, because y dx+x dyy\,dx + x\,dy is the differential of xyxy. It also sets out the conditions that make such an endpoint shortcut valid and shows a field for which the route does matter.

Key terms

Line integral

Definition Let CC be an oriented curve in the plane, traced from its initial point to its terminal point by a parametrization r(t)=(x(t),y(t))\mathbf{r}(t) = (x(t), y(t)), a≤t≤ba \le t \le b, that is piecewise continuously differentiable. This means that [a,b][a, b] splits into finitely many intervals, on each of which r\mathbf{r} is continuously differentiable. Let F=(P,Q)\mathbf{F} = (P, Q) be continuous on CC. The line integral of F\mathbf{F} along CC is

∫CF⋅dr=∫C(P dx+Q dy)=∫ab(P x′+Q y′) dt,\begin{aligned} &\int_C \mathbf{F} \cdot d\mathbf{r} \\[0.4em] &\quad = \int_C (P\,dx + Q\,dy) \\[0.4em] &\quad = \int_a^b (P\,x' + Q\,y')\,dt, \end{aligned}

where PP and QQ are evaluated at r(t)\mathbf{r}(t) and the derivatives x′x' and y′y' at tt. Reparametrizing CC without changing its direction gives the same value, and reversing the direction changes the sign. When F\mathbf{F} is a force, the line integral is the work the field does along CC.

In plain words Walk along the curve, and at each small step multiply the length of the step by the component of the field in the direction of the step. Steps with the field count as positive, steps against it count as negative, and steps at right angles to it count as zero. The total of these signed amounts is the line integral.

Example For F=(y,x)\mathbf{F} = (y, x) along the diagonal r(t)=(t,t)\mathbf{r}(t) = (t, t), 0≤t≤10 \le t \le 1, both derivatives x′x' and y′y' equal 11, so

∫C(y dx+x dy)=∫01(t+t) dt=1.\begin{aligned} &\int_C (y\,dx + x\,dy) \\[0.4em] &\quad = \int_0^1 (t + t)\,dt = 1. \end{aligned}

Along the corner path from (0,0)(0, 0) to (1,0)(1, 0) and then up to (1,1)(1, 1), the first segment has y=0y = 0 and dy=0dy = 0, so it contributes nothing. The second has x=1x = 1 and dx=0dx = 0, so it contributes ∫011 dy=1\int_0^1 1\,dy = 1, and the total is again 11.

Potential function and conservative vector field

Definition Let DD be an open set in the plane and F=(P,Q)\mathbf{F} = (P, Q) a vector field that is continuous on DD. A differentiable function ψ\psi on DD is a potential function for F\mathbf{F} on DD if

∇ψ=Fon D,\nabla \psi = \mathbf{F} \quad \text{on } D,

that is, ψx=P\psi_x = P and ψy=Q\psi_y = Q at every point of DD. The field F\mathbf{F} is conservative on DD if it has a potential function on DD, so being conservative is a property of the field together with its domain. If DD is connected, any two potential functions of F\mathbf{F} on DD differ by a constant. Physics usually works with the potential energy U=−ψU = -\psi, and then the work done by the field equals the decrease in potential energy.

In plain words A potential function attaches one number to each point, and its rates of change in the xx and yy directions are the two components of the field. The field is conservative when one such function works on the whole region in question, not just near each point separately.

Example The function ψ(x,y)=xy\psi(x, y) = xy has ψx=y\psi_x = y and ψy=x\psi_y = x, so ∇ψ=(y,x)\nabla \psi = (y, x) and the field F=(y,x)\mathbf{F} = (y, x) is conservative on the whole plane. Every potential of this field on the plane has the form xy+Kxy + K for a constant KK. In contrast, the rotating field (−y,x)(-y, x) has no potential on any open set. A potential would satisfy ψx=−y\psi_x = -y and ψy=x\psi_y = x, so it would have continuous second partial derivatives with ψxy=−1\psi_{xy} = -1 and ψyx=1\psi_{yx} = 1, while continuous mixed partial derivatives are equal.

Exact differential

Definition Let PP and QQ be continuous on an open set DD in the plane. The differential form P dx+Q dyP\,dx + Q\,dy is exact on DD if there is a differentiable function ψ\psi on DD with

dψ=ψx dx+ψy dy=P dx+Q dy,\begin{aligned} d\psi &= \psi_x\,dx + \psi_y\,dy \\[0.4em] &= P\,dx + Q\,dy, \end{aligned}

that is, ψx=P\psi_x = P and ψy=Q\psi_y = Q on DD. So the form is exact on DD if and only if the field (P,Q)(P, Q) is conservative on DD, with ψ\psi as a potential. If PP and QQ have continuous first partial derivatives on DD, exactness forces

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

because ψxy=ψyx\psi_{xy} = \psi_{yx}. On a simply connected open set, such as the whole plane, an open disk or an open rectangle, this test is also sufficient. On an open set with a hole, such as the plane with the origin removed, a form can pass the test without being exact.

In plain words An expression P dx+Q dyP\,dx + Q\,dy is exact when it is the small change of a single function. If the cross partial derivatives differ anywhere in the region, the form is not exact there. If they agree everywhere and the region has no holes, it is exact, but on a region with a hole a form can pass the test and still fail to be exact.

Example Along any parametrized path, with xx and yy functions of tt, the product rule gives

ddt(xy)=y x′+x y′,\frac{d}{dt}(xy) = y\,x' + x\,y',

which is exactly the integrand of the work integral. So y dx+x dy=d(xy)y\,dx + x\,dy = d(xy) is exact on the whole plane. The test agrees, since P=yP = y and Q=xQ = x give Py=1=QxP_y = 1 = Q_x. The form −y dx+x dy-y\,dx + x\,dy fails the test, with Py=−1P_y = -1 and Qx=1Q_x = 1, so it is not exact on any open set.

Fundamental theorem for line integrals

Definition Let ψ\psi be continuously differentiable on an open set DD, and let CC be a piecewise continuously differentiable curve in DD from the point AA to the point BB. Then

∫C∇ψ⋅dr=ψ(B)−ψ(A).\begin{aligned} &\int_C \nabla \psi \cdot d\mathbf{r} \\[0.4em] &\quad = \psi(B) - \psi(A). \end{aligned}

So if F\mathbf{F} is continuous and conservative on DD with potential ψ\psi, its line integral along every such curve in DD is the potential difference ψ(B)−ψ(A)\psi(B) - \psi(A). To see why, take one continuously differentiable piece r(t)\mathbf{r}(t), a≤t≤ba \le t \le b. The chain rule gives

ddt ψ(r(t))=∇ψ(r(t))⋅r′(t),\begin{aligned} &\frac{d}{dt}\,\psi(\mathbf{r}(t)) \\[0.4em] &\quad = \nabla \psi(\mathbf{r}(t)) \cdot \mathbf{r}'(t), \end{aligned}

a continuous function of tt, so the fundamental theorem of calculus turns the integral over that piece into ψ(r(b))−ψ(r(a))\psi(\mathbf{r}(b)) - \psi(\mathbf{r}(a)). Adding the pieces, the values at the joints cancel and only ψ(B)−ψ(A)\psi(B) - \psi(A) remains.

In plain words For a gradient field, the line integral is the final value of the potential minus the starting value. Every rise and fall of the potential along the way is already included in that net change.

Example The field (y,x)(y, x) equals ∇ψ\nabla \psi with ψ=xy\psi = xy on the whole plane, so for every piecewise continuously differentiable path CC from (0,0)(0, 0) to (1,1)(1, 1),

∫C(y dx+x dy)=ψ(1,1)−ψ(0,0)=1−0=1.\begin{aligned} &\int_C (y\,dx + x\,dy) \\[0.4em] &\quad = \psi(1, 1) - \psi(0, 0) \\[0.4em] &\quad = 1 - 0 = 1. \end{aligned}

Neither the length of the path nor the speed along it enters the answer. The same theorem gives −1-1 for every path from (1,1)(1, 1) back to (0,0)(0, 0), since the endpoints trade places, and 00 for every closed path.

Path independence

Definition Let F\mathbf{F} be continuous on an open set DD. Its line integral is path independent in DD if any two piecewise continuously differentiable curves in DD with the same initial point and the same terminal point give the same value. This holds if and only if

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

for every closed piecewise continuously differentiable curve CC in DD, because two paths from AA to BB form a closed curve when the second is traveled backward. If DD is also connected, path independence holds if and only if F\mathbf{F} is conservative on DD. One direction is the fundamental theorem for line integrals. For the other, fix a point AA of DD and let ψ(X)\psi(X) be the integral of F\mathbf{F} along any path in DD from AA to XX, which path independence makes well defined. This function satisfies ∇ψ=F\nabla \psi = \mathbf{F}.

In plain words Path independence means that the route does not matter, only where it starts and where it ends. Equivalently, every round trip gives zero. For a field on a connected open set, this happens exactly when the field has a potential there.

Example For (y,x)(y, x), the diagonal, the corner path through (1,0)(1, 0), the parabola y=x2y = x^2 and the curve y=x+sin⁡(πx)y = x + \sin(\pi x) from (0,0)(0, 0) to (1,1)(1, 1) all give 11. The rotating field (−y,x)(-y, x) behaves differently between the same points. Along the diagonal (t,t)(t, t) the integrand is −t+t=0-t + t = 0, so the work is 00. The corner path through (1,0)(1, 0) gives 0+1=10 + 1 = 1, and the corner path through (0,1)(0, 1) gives 0+(−1)=−10 + (-1) = -1. Going out along the first corner path and back along the second traces the boundary of the unit square counterclockwise, with work

1−(−1)=2≠0.1 - (-1) = 2 \neq 0.

So the line integral of (−y,x)(-y, x) is not path independent on any open set that contains the square.

Check yourself

  1. Evaluate ∫C(y2 dx+2xy dy)\int_C (y^2\,dx + 2xy\,dy) along any piecewise continuously differentiable path CC from (1,1)(1, 1) to (2,3)(2, 3).
Show the answer

Here P=y2P = y^2 and Q=2xyQ = 2xy have Py=2y=QxP_y = 2y = Q_x on the whole plane, which is simply connected, so the form is exact. A potential is ψ=xy2\psi = xy^2, since ψx=y2\psi_x = y^2 and ψy=2xy\psi_y = 2xy. By the fundamental theorem for line integrals,

∫C(y2 dx+2xy dy)=ψ(2,3)−ψ(1,1)=18−1=17.\begin{aligned} &\int_C (y^2\,dx + 2xy\,dy) \\[0.4em] &\quad = \psi(2, 3) - \psi(1, 1) \\[0.4em] &\quad = 18 - 1 = 17. \end{aligned}

As a check, the segment r(t)=(1+t,1+2t)\mathbf{r}(t) = (1 + t, 1 + 2t), 0≤t≤10 \le t \le 1, gives the integrand (1+2t)2+4(1+t)(1+2t)=5+16t+12t2(1 + 2t)^2 + 4(1 + t)(1 + 2t) = 5 + 16t + 12t^2, whose integral from 00 to 11 is 5+8+4=175 + 8 + 4 = 17.

  1. Find ∫C(y dx+2x dy)\int_C (y\,dx + 2x\,dy) from (0,0)(0, 0) to (1,1)(1, 1) along the diagonal and along the corner path through (1,0)(1, 0). Can the answer be found by evaluating a potential at the endpoints?
Show the answer

Along the diagonal (t,t)(t, t) the integrand is t+2t=3tt + 2t = 3t, so

∫013t dt=32.\int_0^1 3t\,dt = \frac{3}{2}.

On the corner path, the segment along the xx-axis has y=0y = 0 and dy=0dy = 0 and contributes 00, and the segment x=1x = 1 contributes ∫012 dy=2\int_0^1 2\,dy = 2. The total is 22.

Two paths with the same endpoints give different values, so the integral is not path independent and no potential exists on any open set containing both paths. The cross partial test shows the same thing everywhere, since Py=1P_y = 1 while Qx=2Q_x = 2. A guess such as ψ=2xy\psi = 2xy fails because its xx derivative is 2y2y, not yy.

  1. On the plane with the origin removed, consider the form
−y dx+x dyx2+y2.\frac{-y\,dx + x\,dy}{x^2 + y^2}.

Check that Py=QxP_y = Q_x there. Then find its integral counterclockwise around the unit circle and around the circle of radius 11 centered at (3,0)(3, 0), and explain the two results.

Show the answer

With P=−y/(x2+y2)P = -y/(x^2 + y^2) and Q=x/(x2+y2)Q = x/(x^2 + y^2), both cross partial derivatives equal

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

at every point except the origin. On the unit circle (cos⁡t,sin⁡t)(\cos t, \sin t), 0≤t≤2π0 \le t \le 2\pi, the denominator is 11 and the integrand is sin⁡2t+cos⁡2t=1\sin^2 t + \cos^2 t = 1, so the integral is 2π2\pi.

A closed path with a nonzero integral shows that the form is not exact on the punctured plane, even though it passes the test there. The test guarantees exactness only on a simply connected set, and the punctured plane has a hole at the origin, which the unit circle surrounds.

The circle centered at (3,0)(3, 0) lies in the half plane x>0x > 0, which is simply connected. There the form equals d(arctan⁡(y/x))d\bigl(\arctan(y/x)\bigr), so its integral around that closed circle is 00.

How this lesson connects