The Fundamental Theorem of Calculus says ∫abF′(x)dx=F(b)−F(a): to integrate a derivative, you only need the values at the endpoints. Line integrals have an exact analogue. When a vector field is a gradient, its line integral depends only on where the curve starts and ends, not on the path in between. This lesson proves that, shows how to recognize such fields, and shows how to find the function they are the gradient of.
The theorem
Recall that F is conservative if F=∇f for some scalar function f, called a potential function for F.
Fundamental Theorem for Line Integrals
Let C be a smooth curve given by r(t), a≤t≤b, and let f have continuous partial derivatives on an open set containing C. Then
∫C∇f⋅dr=f(r(b))−f(r(a)).
The proof is one line of the chain rule. Along the curve,
∇f(r(t))⋅r′(t)=fxdtdx+fydtdy=dtd[f(r(t))],
so the line integral is ∫abdtdf(r(t))dt, and the ordinary Fundamental Theorem finishes the job. The same argument works in three dimensions, and for curves made of several smooth pieces.
Worked example: Endpoints are all you need
Let f(x,y)=x2y+y3. Evaluate ∫C∇f⋅dr, where C is any smooth curve from (1,0) to (2,1).
No parametrization needed:
∫C∇f⋅dr=f(2,1)−f(1,0)=(4+1)−0=5.
Path independence
Two consequences follow immediately for a conservative field F:
Path independence. If C1 and C2 have the same initial point and the same terminal point, then ∫C1F⋅dr=∫C2F⋅dr.
Closed curves give zero. If C is closed (it ends where it starts), then ∮CF⋅dr=0.
These two statements are equivalent to each other: going out along C1 and back along −C2 makes a closed loop. The converse is also true on an open connected region: if every closed-loop integral of F is zero, then F is conservative. Physically, a conservative force (like gravity) does zero net work around any round trip, which is why mechanical energy is conserved under such forces.
Testing whether a field is conservative
If F=⟨P,Q⟩=∇f, then P=fx and Q=fy. By Clairaut's Theorem, Py=fxy=fyx=Qx. So equal cross-partials are necessary. They are also sufficient when the domain has no holes.
Test for conservative fields in the plane
Let F=⟨P,Q⟩ have continuous first partial derivatives on a simply connected open region D (connected, with no holes). Then
Fis conservative on D⟺∂y∂P=∂x∂Qthroughout D.
Finding a potential function
Once the test passes, recover f by integrating one component and matching the other.
Worked example: Test, find f, evaluate
Let F(x,y)=⟨2xy+3,x2+4y⟩. Show that F is conservative, find a potential, and evaluate ∫CF⋅dr from (0,0) to (1,2).
Test.Py=2x and Qx=2x, and the domain is all of R2, so F is conservative.
Integrate P in x.f=∫(2xy+3)dx=x2y+3x+g(y). The "constant" of integration can depend on y.
Match Q.fy=x2+g′(y) must equal x2+4y, so g′(y)=4y and g(y)=2y2. Therefore f(x,y)=x2y+3x+2y2.
Evaluate.f(1,2)−f(0,0)=(2+3+8)−0=13.
In three dimensions the process is the same with one more matching step. (The three-dimensional test uses the curl, which appears two lessons from now.)
Worked example: A potential in space
Evaluate ∫CF⋅dr for F=⟨yz,xz,xy+2z⟩ along any path from (0,0,0) to (1,2,3).
Integrate P in x: f=xyz+g(y,z). Then fy=xz+gy=xz, so g depends on z only. Next fz=xy+g′(z)=xy+2z, so g(z)=z2. Hence f=xyz+z2, and
∫CF⋅dr=f(1,2,3)−f(0,0,0)=6+9=15.
When the domain has a hole
Consider F=⟨x2+y2−y,x2+y2x⟩, defined everywhere except the origin. A quick calculation shows Py=Qx=(x2+y2)2y2−x2. Yet around the unit circle, r(t)=⟨cost,sint⟩ gives F⋅r′=sin2t+cos2t=1, so
∮CF⋅dr=2π=0.
The field is not conservative on its domain. There is no contradiction: the punctured plane is not simply connected, so the test does not apply.
Common mistake
Equal cross-partials Py=Qx prove a field is conservative only on a simply connected region. If the field blows up at a point inside the loop you care about, check the loop integral directly.
Tip
After finding f, check it by computing ∇f and comparing with F. It takes seconds and catches a forgotten g(y).
Practice
Practice 1
Let f(x,y)=xey. Evaluate ∫C∇f⋅dr, where C is any curve from (1,0) to (3,ln2).
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Practice 2
Which vector field is conservative on R2?
Practice 3
Find the potential function f for F(x,y)=⟨2x+y,x+2y⟩ that satisfies f(0,0)=0.
Enter an expression, e.g. 3x^2 - 2x + 1
Practice 4
Evaluate ∫C(2x+y)dx+(x+2y)dy, where C is any path from (0,0) to (2,−1).
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Practice 5
Let F(x,y)=⟨ycosx,sinx+ey⟩. Evaluate ∫CF⋅dr along any path from (0,0) to (2π,1).
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Practice 6
Let F(x,y,z)=⟨y2,2xy+z,y⟩. Evaluate ∫CF⋅dr along any path from (0,0,0) to (2,1,3).
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Practice 7
F(x,y)=⟨2xy,x2−3y2⟩. Evaluate ∮CF⋅dr, where C is the ellipse x2+4y2=4 traversed once counterclockwise.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Practice 8
For F=⟨x2+y2−y,x2+y2x⟩, Py=Qx wherever F is defined, yet ∮CF⋅dr=2π around the unit circle. Why doesn't this contradict the test for conservative fields?