Skip to main content

Active Calculus - Multivariable

Section 12.4 Path-Independent Vector Fields and the Fundamental Theorem of Calculus for Line Integrals

In Activity 12.3.4, Example 12.3.9, and Activity 12.3.5, we encountered situations where C1 and C2 are different oriented curves from a point P to a point Q and C1Fdr=C2Fdr. In this section, we explore vector fields which have the property that for all points P and Q, if C1 and C2 are oriented paths from P to Q, then C1Fdr=C2Fdr.

Preview Activity 12.4.1.

In Activity 12.3.4, we considered the vector field F(x,y)=y2,2xy+3 and two different oriented curves from (2,5) to (3,30). We found that the value of the line integral of F was the same along those two oriented curves.

(a)

Verify that F(x,y)=y2,2xy+3 is a gradient vector field by showing that F=f for the function f(x,y)=xy2+3y.

(b)

Calculate the change in the output of the scalar function f over the curves C1 and C2. In other words, what is the difference in the output of f at the start of the curve and the end of the curve? How does this value compare to the value of the line integral C1Fdr you found in Activity 12.3.4?

(c)

Let C3 be the line segment from (1,1) to (3,4). Calculate C3Fdr as well as f(3,4)f(1,1). Write a sentence that compares your answer to this part to your result for part 12.4.1.b.

Subsection 12.4.1 Path-Independent Vector Fields

Hopefully Preview Activity 12.4.1 has prompted you to wonder about the phenomenon of the value of a line integral depending only on the initial and terminal points of the oriented path (rather than the oriented path itself) and how a potential function comes into play. We say that a vector field F defined on a region D is path-independent if C1Fdr=C2Fdr whenever C1 and C2 are oriented paths in D such that both curves start at point P and end at point Q.
In Activity 12.3.4 and Example 12.3.9, we encountered situations where we had evidence that a vector field was path-independent. However, since the definition of path-independence requires that the value of the line integral be the same for every possible path from one point to the other (regardless of choice for the initial and final points), it doesn’t appear that verifying a vector field is path-independent is an easy task.
Fortunately, one familiar class of vector fields can be shown to be path-independent. Let f:R3R be a function for which f is continuous on a region D. Suppose that P and Q are points in D and let C be a smooth oriented path from P to Q that is also contained in our region D. We consider Cfdr by fixing an arbitrary parametrization r(t) of C, atb. Since we can write x, y, and z in terms of t, along C, the gradient of f is given by
f(r(t))=fx(r(t)),fy(r(t)),fz(r(t)).
Hence, we can write the line integral of the vector field F=f over C in the following way:
Cfdr=abf(r(t))r(t)dt=abfx(r(t)),fy(r(t)),fz(r(t))r(t)dt
If r(t)=x(t),y(t),z(t), then the integrand above is
=fx(r(t)),fy(r(t)),fz(r(t))x(t),y(t),z(t)=fx(x(t),y(t),z(t))x(t)+fy(x(t),y(t),z(t))y(t)=+fz(x(t),y(t),z(t))z(t).
Or more simply,
fdrdt=fxdxdt+fydydt+fzdzdt=ddt(f(r(t))).
Notice that this is exactly what the chain rule tells us ddtf(r(t)) is equal to. Therefore, we may apply the Fundamental Theorem of Calculus
 1 
activecalculus.org/single/sec-4-4-FTC.html#QmI
to obtain
Cfdr=abddtf(r(t))dt=f(r(b))f(r(a))=f(Q)f(P).
In other words, gradient vector fields are path-independent vector fields, and we can evaluate line integrals of gradient vector fields by using a potential function.
This result is so important that it is frequently called the Fundamental Theorem of Calculus for Line Integrals, because of its similarity to the Fundamental Theorem of Calculus
 2 
https://activecalculus.org/single/sec-4-4-FTC.html#QmI
, which can be written as
abdfdx(x)dx=f(b)f(a).

Example 12.4.2.

(a)
Suppose we need to calculate the line integral of F=2xy2,x2+3ey over the path from (2,0) to (4,2) along the curve given by (x2)2=y/2. If we use Theorem 12.3.6 to solve this, we would need to parameterize the curve, take a derivative of the parameterization, substitute into the line integral formula, and finally integrate the result. Fortunately, Theorem 12.4.1 allows us to be more efficient in how we approach this.
In order to use Theorem 12.4.1, we first need to verify that there exists a potential function f(x,y) such that f=2xy2,x2+3ey. We will soon learn techniques in Activity 12.4.3 for finding a protential function, but for now, you should be able to verify for yourself that f will be of the form f(x,y)=x2y2x3ey+k, where k is a constant. Note that f(4,2)f(2,0)=(328+3e2+k)(043+k)=3e241, regardless of what value we choose for k. By Theorem 12.4.1,
CFdr=f(4,2)f(2,0)=3e241
If we changed the path in our line integral to be any other path between (2,0) and (4,2), then the result would still be 3e241.
(b)
If we changed the path in our line integral to be some path C1 from (1,1) to (1,4) but did not change the vector field being used, then we would only need to evaluate f(1,4)f(1,1). So for our new path C1,
C1Fdr=f(1,4)f(1,1)=(4(2)+3e4)(12+3e1)=9+3(e4+e1).
Sometimes, we know that the vector field we need to compute a line integral in is the gradient vector field of a given function, in which case evaluation of the line integral is very efficient. Before investigating how to find a potential function, we have an activity to practice applying Theorem 12.4.1 when we are given the potential function.

Activity 12.4.2.

Calculate each of the following line integrals.
(a)
Cfdr if f(x,y)=3xy2sin(x)+ey and C is the top half of the unit circle oriented from (1,0) to (1,0).
(b)
Cgdr if g(x,y,z)=xz25y3cos(z)+6 and C is the portion of the helix r(t)=5cos(t),5sin(t),3t from (5,0,0) to (0,5,9π/2).
(c)
Chdr if h(x,y,z)=3y2ey35xsin(x3z)+z2 and C is the curve consisting of the line segment from (0,0,0) to (1,1,1), followed by the line segment from (1,1,1) to (1,3,2), followed by the line segment from (1,3,2) to (0,0,10).
In Activity 12.3.2, we used Clairaut’s Theorem to argue that a vector field in R2 is not a gradient vector field when F1/yF2/x. In Preview Activity 12.4.1, you verified that a given vector field was the gradient of a particular function of two variables. Clairaut’s Theorem holds for functions of three variables. However, in that case there are six mixed partials to calculate, and thus it can be rather tedious. Activity 12.4.3 suggest a process for determining if a vector field in R3 is a gradient vector field as well as finding a potential function for the vector field.

Activity 12.4.3.

Let G(x,y,z)=3ey2+zsin(x),6xyey2z,3z2ycos(x) and H(x,y,z)=3x2y,x3+2yz3,xz+3y2z2.
(a)
If G and H are to be gradient vector fields, then there are functions g and h for which G=g and H=h. If such functions g and h exist, what would gy, gz, hx, hy, and hz be?
(b)
Let g1(x,y,z)=3xey2+xyzzsin(x). Calculate g1/x. Could g1 be a potential function for the vector field G?
(c)
Find a function g so that g/x=3ey2+zsin(x). Find a function h so that h/x=3x2y.
(d)
When finding the most general anti-derivative for a function of one variable, we add a constant of integration (usually denoted by C) to capture the fact that any constant will become 0 through differentiation.
(i)
When taking the partial derivative with respect to x of a function of x, y, and z, what variables can appear in terms that become 0 in the partial derivative because they are treated as constants?
(ii)
What does this tell you should be added to g and h in the previous part to make them the most general possible functions with the desired partial derivatives with respect to x?
(e)
Now calculate g/y and h/y based on your choices for part 12.4.3.c. Write a few sentences to explain why this tells you that we must have
g(x,y,z)=3xey2zcos(x)yz+m1(z)
and
h(x,y,z)=x3y+y2z3+m2(z)
for some functions m1 and m2 depending only on z.
(f)
Calculate gz and hz for the functions in the part above. Notice that m1 and m2 are functions of z alone, so taking a partial derivative with respect to z is the same as taking an ordinary derivative, and thus you may use the notation m1(z) and m2(z).
(g)
Explain why G is a gradient vector field but H is not a gradient vector field. Find a potential function for G.
By following the methodology laid out in Activity 12.4.3 to show that a given vector field is a gradient vector field, the Fundamental Theorem of Calculus for Line Integrals makes evaluating some line integrals much simpler now.

Activity 12.4.4.

Calculate each of the following line integrals.
(a)
CFdr if F(x,y)=2x,2y and C is the line segment from (1,2) to (1,0).
Hint.
Find f(x,y) such that f=F.
(b)
CGdr if G(x,y)=4x312ycos(xy),9y212xcos(xy) and C is the portion of the unit circle from (0,1) to (0,1).
(c)
CHdr if H(x,y,z)=H1,H2,H3 with
H1(x,y,z)=ez2+2xy3z+cos(x)y3sin(x)H2(x,y,z)=2yey2+3x2y2z+3y2z2+3y2cos(x)H3(x,y,z)=x2y3+2xzez2+2y3z4z3
and C is the curve consisting of the line segment from (1,1,1) to (3,0,3), followed by the line segment from (3,0,3) to (1,5,1), followed by the line segment from (1,5,1) to (0,0,0).

Subsection 12.4.2 Line Integrals Along Closed Curves

Recall that an oriented curve C is closed if the curve has the same initial and terminal point. A typical example of a closed curve would be a circle (with an orientation of which way to go around), but we could also consider something like the square with vertices (1,1), (1,1), (1,1), and (1,1), oriented clockwise (or counterclockwise). Recall that we sometimes use the symbol for a line integral when the curve is closed and that if C=C1+C2, then CFdr=C1Fdr+C2Fdr.

Activity 12.4.5.

Suppose that F is a continuous path-independent vector field (in R2 or R3) on some region D.
(a)
Let P and Q be points in D and let C1 and C2 be oriented curves from P to Q. What can you say about C1Fdr and C2Fdr?
(b)
Let C=C1C2. Explain why C is a closed curve.
(d)
Write a sentence that summarizes what we can conclude about line integrals of F at this point in the activity.
(e)
Now let us suppose that G is a continuous vector field on a region D for which CGdr=0 for all closed curves C. Pick two points P and Q in D. Let C1 and C2 be oriented curves from P to Q. What type of curve is C=C1C2?
(g)
What does that tell you about the relationship between C1Gdr and C2Gdr?
(h)
Explain why this shows that G is path-independent.
We summarize the result of Activity 12.4.5 with the theorem below. Although this theorem is not a terribly useful way to show that a vector field is path-independent, it can be a useful way to show that a vector field is not path-independent: If you can find a closed curve around which the circulation is not zero, then the vector field is not path independent.
The following activity gives you a chance to reason about path-independence based purely on a graphical representation of a vector field.

Activity 12.4.6.

Explain why neither of the vector fields in Figure 12.4.4 is path-independent.
described in detail following the image
A vector field in which all vectors are horizontal. The vectors are 0 along the x-axis, point to the right for y>0 and point to the left for y<0. Vectors get longer as distance from the x-axis increases.
(a) F
described in detail following the image
A vector field in which vectors appear to circulate in a clockwise manner around the point (3,0). The magnitude of vectors increases with the distance from (3,0). The plot shows the portion of the vector field with 0x6 and 3y3.
(b) G
Figure 12.4.4. Two vector fields that are not path-independent.

Subsection 12.4.3 What other vector fields are path-independent?

Recall that in single variable calculus, The Second Fundamental Theorem of Calculus
 3 
activecalculus.org/single/sec-5-2-FTC2.html#qxB
tells us that given a constant c and a continuous function f, there is a unique function A(x) for which A(c)=0 and dAdx(x)=f(x). In particular, A(x)=cxf(t)dt is this function. We are about to investigate an analog of this result for path-independent vector fields, but first we require two additional definitions.
If D is a subset of R2 or R3, we say that D is open provided that for every point in D, there is a disc (in R2) or ball (in R3) centered at that point such that every point of the disc/ball is contained in D. For example, the set of points (x,y) in R2 for which x2+y2<1 is open, since we can always surround any point in this set by a tiny disc contained in the set (as illustrated by point P in Figure 12.4.5). However, if we change the inequality to x2+y21, then the set is not open, as any point on the circle x2+y2=1 cannot be surrounded by a disc contained in the set; any disc surrounding a point on that circle will contain points outside the set, that is with x2+y2>1 (as illustrated by the point Q in Figure 12.4.5). We will also say that a region D is path-connected provided that for every pair of points in D, there is a path from one to the other contained in D.
described in detail following the image
The open set {(x,y)|x2+y2<1} is plotted in yellow with a point Q
Figure 12.4.5. The open set {(x,y)|x2+y2<1} is plotted in yellow with a point Q on the boundary that shows why {(x,y)|x2+y21} is not open

Activity 12.4.7.

Let F=F1,F2 be a continuous, path-independent vector field on an open, path-connected region D. We will assume that D is in R2 and F is a two-dimensional vector field, but the ideas below generalize completely to R3. We want to define a function f on D by using the vector field F and line integrals, much like the Second Fundamental Theorem of Calculus allows us to define an antiderivative of a continuous function using a definite integral. To that end, we assign f(x0,y0) an arbitrary value. (Setting f(x0,y0)=0 is probably convenient, but we won’t explicitly tie our hands. Just assume that f(x0,y0) is defined to be some number.) Now for any other point (x,y) in D, define
f(x,y)=f(x0,y0)+CFdr,
where C is any oriented path from (x0,y0) to (x,y). Since D is path-connected, such an oriented path must exist. Since F is path-independent, f is well-defined. If different paths from (x0,y0) to (x,y) gave different values for the line integral, then we would not be sure what f(x,y) really is.
To better understand this mysterious function f we’ve now defined, let’s start looking at its partial derivatives.
(a)
Since D is open, there is a disc (perhaps very small) surrounding (x,y) that is contained in D, so fix a point (a,b) in that disc. Since D is path-connected, there is a path C1 from (x0,y0) to (a,b). Let Cy be the line segment from (a,b) to (a,y) and let Cx be the line segment from (a,y) to (x,y). (See Figure 12.4.6.) Rewrite f(x,y) as a sum of f(x0,y0) and line integrals along C1, Cy, and Cx.
described in detail following the image
An oriented curve from (x0,y0) to (x,y). It begins with a curved arc from (x0,y0) to (a,b) and then proceeds vertically from (a,b) to (a,y) and then horizontally to (x,y).
Figure 12.4.6. A piecewise smooth oriented curve from (x0,y0) to (x,y).
(b)
Notice that we can parametrize Cy by a,t for bty. Find a similar parametrization for Cx.
(c)
Use the parametrization from above to write CyFdr and CxFdr as single variable integrals in the manner of Section 12.3. Use the fact that F(x,y)=F1(x,y),F2(x,y) to express your integrals in terms of F1 and F2 without any dot products.
(d)
Rewrite your expression for f(x,y) using a line integral along C1 and the single variable integrals above.
(e)
Notice that your expression for f(x,y) from the previous part only depends on x as the upper limit of an single variable integral. Use the Second Fundamental Theorem of Calculus to calculate fx(x,y).
(f)
To calculate fy(x,y), we continue to consider a path C1 from (x0,y0) to (a,b), but now let Lx be the line segment from (a,b) to (x,b) and let Ly be the line segment from (x,b) to (y,b). Modify the process you used to find fx(x,y) to find fy(x,y).
(g)
What can you conclude about the relationship between f and F? What does this tell you about F beyond that it is path-independent and continuous?
We summarize the result of Activity 12.4.7 below. Much like the Second Fundamental Theorem of Calculus, which tells us that a function is an antiderivative for another function, but leaves the antiderivative in terms of a definite integral, this theorem tells us that a function is a potential function for a vector field, but the definnition of the potential function is in terms of a line integral.

Subsection 12.4.4 Summary

  • Gradient vector fields are path-independent, and if C is an oriented curve from (x1,y1) to (x2,y2), then
    Cfdr=f(x2,y2)f(x1,y1)
    with the analogous result holding if f is a function of three variables.
  • A vector field is path-independent if and only if the circulation around every closed curve in its domain is 0.
  • If a vector field F is path-independent, then there exists a function f such that f=F. That is, F is a conservative or gradient vector field.

Exercises 12.4.5 Exercises

1.

Let f=10xex2sin(5y)i+25ex2cos(5y)j. Find the change in f between (0,0) and (1,π/2) in two ways.
(a) First, find the change by computing the line integral Cfdr, where C is a curve connecting (0,0) and (1,π/2).
The simplest curve is the line segment joining these points. Parameterize it:
with 0t1, r(t)= i+ j
So that Cfdr=01 dt
Note that this isn’t a very pleasant integral to evaluate by hand (though we could easily find a numerical estimate for it). It’s easier to find Cfdr as the sum C1fdr+C2fdr, where C1 is the line segment from (0,0) to (1,0) and C2 is the line segment from (1,0) to (1,π/2). Calculate these integrals to find the change in f.
C1fdr=
C2fdr=
So that the change in f=Cfr=C1fdr+C2fdr=
(b) By computing values of f. To do this,
First find f(x,y)=
Thus
f(0,0)= and f(1,π/2)= ,
and the change in f is .

2.

Consider the vector field F(x,y,z)=(4z+2y)i+(5z+2x)j+(5y+4x)k.
a) Find a function f such that F=f and f(0,0,0)=0.
f(x,y,z)=
b) Suppose C is any curve from (0,0,0) to (1,1,1). Use part a) to compute the line integral CFdr.

3.

For each of the following line integrals:
(a)
The line integral of F=yz,xz,y along the helix of radius of 3 given by r(t)=3sin(t),3cos(t),4πt as πtπ.
(b)
The line integral of F=sin(yz),xzcos(yz)zsin(y),xycos(yz)+cos(y) along the line segment from (0,π,3) to (2,1,2π).
(c)
The integralCy2dx+2xydy where C is the parabolic path along y=x2 from (1,1) to (4,16).

4.

Let F=F1,F2,F3, where F1=3xy2+z and F3=yz2+cos(z).
(a)
Give a component function F2 such that F is a gradient vector field.
(b)
Give a component function F2 such that F is not a gradient vector field.

5.

This exercise focuses on reasoning graphically about line integrals and vector fields.
(a)
Find a closed curve on which the line integral of the vector field pictured below will not be zero. Be sure to clearly define your curve and explain why the line integral over your curve is non-zero.
A vector field showing counterclockwise rotation around the origin. At the origin, the vector field is zero, and vector magnitudes increase as distance from the origin increases.
Figure 12.4.8. A vector field
(b)
Explain why you think the following vector field is path independent or not.
described in detail following the image
A vector field in which vector magnitudes increase as distance from the origin increases. Vectors are oriented as if they follow hyperbolas with asymptotes y=x and y=x. Vectors above both asymptotes or below both asymptotes result in counterclockwise rotation. The other vectors result in clockwise rotation.
Figure 12.4.9. Another vector field

6.

Compute Cyezdx+xezdy+xyezdz where C is given by t2,t3,t1 for 1t2.

Subsection 12.4.6 Notes to Instructors and Dependencies

This section is long, but important. To do all the activities, you will need multpile 50-minute class periods. One way to facilitate this would be to treat Activity 12.4.4 as if it were a preview activity and have students work on it before the second class meeting. You could also opt to de-emphasize finding potential functions and omit that activity.
Activity 12.4.7 is also rather long. We have arranged the subsection by placing Theorem 12.4.7 after the activity so as to not spoil the discovery to which the activity builds. This activity can be skipped without adversely impacting the remainder of the chapter. However, if choosing to omit Activity 12.4.7, you may wish to specifically point out the culminating theorem to students.
You have attempted 1 of 3 activities on this page.