# 15.3: Conservative Vector Fields

- Page ID
- 9061

- Describe simple and closed curves; define connected and simply connected regions.
- Explain how to find a potential function for a conservative vector field.
- Use the Fundamental Theorem for Line Integrals to evaluate a line integral in a vector field.
- Explain how to test a vector field to determine whether it is conservative.

In this section, we continue the study of conservative vector fields. We examine the Fundamental Theorem for Line Integrals, which is a useful generalization of the Fundamental Theorem of Calculus to line integrals of conservative vector fields. We also discover show how to test whether a given vector field is conservative, and determine how to build a potential function for a vector field known to be conservative.

## Curves and Regions

Before continuing our study of conservative vector fields, we need some geometric definitions. The theorems in the subsequent sections all rely on integrating over certain kinds of curves and regions, so we develop the definitions of those curves and regions here. We first define two special kinds of curves: closed curves and simple curves. As we have learned, a closed curve is one that begins and ends at the same point. A simple curve is one that does not cross itself. A curve that is both closed and simple is a simple closed curve (Figure \(\PageIndex{1}\)).

Curve \(C\) is a *closed curve* if there is a parameterization \(\vecs r(t)\), \(a≤t≤b\) of \(C\) such that the parameterization traverses the curve exactly once and \(\vecs r(a)=\vecs r(b)\). Curve \(C\) is a simple curve if \(C\) does not cross itself. That is, \(C\) is simple if there exists a parameterization \(\vecs r(t)\), \(a≤t≤b\) of \(C\) such that \(\vecs r\) is one-to-one over \((a,b)\). It is possible for \(\vecs r(a)=\vecs r(b)\), meaning that the simple curve is also closed.

Is the curve with parameterization \(\vecs{r}(t)=\left\langle\cos t,\frac{\sin(2t)}{2}\right\rangle\), \(0≤t≤2\pi\) a simple closed curve?

**Solution**

Note that \(\vecs{r}(0)=⟨1,0⟩=\vecs r(2\pi)\); therefore, the curve is closed. The curve is not simple, however. To see this, note that \(\vecs{r}\left(\frac{\pi}{2}\right)=⟨0,0⟩=\vecs{r}\left(\frac{3\pi}{2}\right)\), and therefore the curve crosses itself at the origin (Figure \(\PageIndex{2}\)).

Is the curve given by parameterization \(\vecs{r}(t)=⟨2\cos t,3\sin t⟩\), \(0≤t≤6\pi\), a simple closed curve?

**Hint**-
Sketch the curve.

**Answer**-
Yes

Many of the theorems in this chapter relate an integral over a region to an integral over the boundary of the region, where the region’s boundary is a simple closed curve or a union of simple closed curves. To develop these theorems, we need two geometric definitions for regions: that of a connected region and that of a simply connected region. A connected region is one in which there is a path in the region that connects any two points that lie within that region. A simply connected region is a connected region that does not have any holes in it. These two notions, along with the notion of a simple closed curve, allow us to state several generalizations of the Fundamental Theorem of Calculus later in the chapter. These two definitions are valid for regions in any number of dimensions, but we are only concerned with regions in two or three dimensions.

A region *D* is a *connected region* if, for any two points \(P_1\) and \(P_2\), there is a path from \(P_1\) to \(P_2\) with a trace contained entirely inside *D*. A region *D* is a simply connected region if *D* is connected for any simple closed curve *C* that lies inside *D*, and curve *C* can be shrunk continuously to a point while staying entirely inside *D*. In two dimensions, a region is simply connected if it is connected and has no holes.

All simply connected regions are connected, but not all connected regions are simply connected (Figure \(\PageIndex{3}\)).

Is the region in the below image connected? Is the region simply connected?

**Hint**-
Consider the definitions.

**Answer**-
The region in the figure is connected. The region in the figure is not simply connected.

## Fundamental Theorem for Line Integrals

Now that we understand some basic curves and regions, let’s generalize the Fundamental Theorem of Calculus to line integrals. Recall that the Fundamental Theorem of Calculus says that if a function \(f\) has an antiderivative \(F\), then the integral of \(f\) from \(a\) to \(b\) depends only on the values of \(F\) at \(a\) and at \(b\)—that is,

\[\int_a^bf(x)\,dx=F(b)−F(a). \nonumber \]

If we think of the gradient as a derivative, then the same theorem holds for vector line integrals. We show how this works using a motivational example.

Let \(\vecs{F}(x,y)=⟨2x,4y⟩\). Calculate \(\displaystyle \int_C \vecs{F} \cdot d\vecs{r}\), where *C* is the line segment from \((0,0)\) to \((2,2)\) (Figure \(\PageIndex{4}\)).

**Solution**

We use the method from the previous section to calculate \(\int_C \vecs{F} \cdot d\vecs{r}\). Curve *C* can be parameterized by \(\vecs{r}(t)=⟨2t,2t⟩\), \(0≤t≤1\). Then, \(\vecs{F}(\vecs r(t))=⟨4t,8t⟩\) and \(\vecs r′(t)=⟨2,2⟩\), which implies that

\[\begin{align*} \int_C \vecs{F}·d\vecs{r} &=\int_0^1⟨4t,8t⟩·⟨2,2⟩dt \\[4pt] &=\int_0^1(8t+16t)dt=\int_0^1 24tdt\\[4pt] &={\big[12t^2\big]}_0^1=12. \end{align*}\]

Notice that \(\vecs{F}=\vecs \nabla f\), where \(f(x,y)=x^2+2y^2\). If we think of the gradient as a derivative, then \(f\) is an “antiderivative” of \(\vecs{F}\). In the case of single-variable integrals, the integral of derivative \(g′(x)\) is \(g(b)−g(a)\), where *a* is the start point of the interval of integration and *b* is the endpoint. If vector line integrals work like single-variable integrals, then we would expect integral \(\vecs{F}\) to be \(f(P_1)−f(P_0)\), where \(P_1\) is the endpoint of the curve of integration and \(P_0\) is the start point. Notice that this is the case for this example:

\[\int_C \vecs{F} \cdot d\vecs{r}=\int_C \vecs \nabla f \cdot d\vecs{r}=12 \nonumber \]

and

\[f(2,2)−f(0,0)=4+8−0=12. \nonumber \]

In other words, the integral of a “derivative” can be calculated by evaluating an “antiderivative” at the endpoints of the curve and subtracting, just as for single-variable integrals.

The following theorem says that, under certain conditions, what happened in the previous example holds for any gradient field. The same theorem holds for vector line integrals, which we call the **Fundamental Theorem for Line Integrals**.

Let *C* be a piecewise smooth curve with parameterization \(\vecs r(t)\), \(a≤t≤b\). Let \(f\) be a function of two or three variables with first-order partial derivatives that exist and are continuous on *C*. Then,

\[\int_C \vecs \nabla f \cdot d\vecs{r}=f(\vecs r(b))−f(\vecs r(a)). \label{FunTheLine} \]

First,

\[\int_C \vecs \nabla f \cdot d \vecs{r}=\int_a^b \vecs \nabla f( \vecs r(t)) \cdot \vecs r′(t)\,dt. \nonumber \]

By the chain rule,

\[\dfrac{d}{dt}(f( \vecs r(t))= \vecs \nabla f( \vecs r(t)) \cdot \vecs r′(t) \nonumber \]

Therefore, by the Fundamental Theorem of Calculus,

\[\begin{align*} \int_C \vecs \nabla f \cdot d \vecs{r} &=\int_a^b \vecs \nabla f( \vecs r(t)) \cdot \vecs r′(t)dt \\[4pt] &=\int_a^b\dfrac{d}{dt}(f( \vecs r(t))dt \\[4pt] &={\big[f( \vecs r(t))\big]}_{t=a}^{t=b}\\[4pt] &=f( \vecs r(b))−f( \vecs r(a)). \end{align*}\]

\(\square\)

We know that if \(\vecs{F}\) is a conservative vector field, there is a potential function \(f\) such that \( \vecs \nabla f= \vecs F\). Therefore

\[\int_C \vecs F·d\vecs r=\int_C\vecs \nabla f·d\vecs{r}=f(\vecs r(b))−f(\vecs r(a)). \nonumber \]

In other words, just as with the Fundamental Theorem of Calculus, computing the line integral \(\int_C \vecs F·d\vecs{r}\), where \(\vecs{F}\) is conservative, is a two-step process:

- Find a potential function (“antiderivative”) \(f\) for \(\vecs{F}\) and
- Compute the value of \(f\) at the endpoints of \(C\) and calculate their difference \(f(\vecs r(b))−f(\vecs r(a))\).

Keep in mind, however, there is one major difference between the Fundamental Theorem of Calculus and the Fundamental Theorem for Line Integrals:

*A function of one variable that is continuous must have an antiderivative. However, a vector field, even if it is continuous, does not need to have a potential function.*

Calculate integral \(\int_C \vecs{F} \cdot d\vecs{r}\), where \(\vecs{F}(x,y,z)=⟨2x\ln y,\dfrac{x^2}{y}+z^2,2yz⟩\) and \(C\) is a curve with parameterization \(\vecs{r}(t)=⟨t^2,t,t⟩\), \(1≤t≤e\)

- without using the Fundamental Theorem of Line Integrals and
- using the Fundamental Theorem of Line Integrals.

**Solution**

1. First, let’s calculate the integral without the Fundamental Theorem for Line Integrals and instead use the method we learned in the previous section:

\[\begin{align*} \int_C \vecs{F} \cdot dr &=\int_1^e\vecs F(\vecs r(t)) \cdot \vecs r′(t)\,dt\\[4pt] &=\int_1^e⟨2t^2\ln t,\dfrac{t^4}{t}+t^2,2t^2⟩ \cdot ⟨2t,1,1⟩\,dt\\[4pt] &=\int_1^e(4t^3\ln t+t^3+3t^2)\,dt \\[4pt] &=\int_1^e 4t^3\ln t \,dt+\int_1^e(t^3+3t^2)\,dt \\[4pt] &=\int_1^e 4t^3\ln t\,dt+{\Big[\dfrac{t^4}{4}+t^3\Big]}_1^e \\[4pt] &=\int_1^e 4t^3\ln t\,dt+\dfrac{e^4}{4}+e^3 −\dfrac{1}{4} −1 \\[4pt] &= \int_1^e 4t^3\ln t\,dt+\dfrac{e^4}{4}+e^3 −\dfrac{5}{4}\end{align*}\]

Integral \(\displaystyle \int_1^e t^3\ln t\,dt\) requires integration by parts. Let \(u=\ln t\) and \(dv=t^3\). Then \(u=\ln t\), \(dv=t^3\)

and

\[du=\dfrac{1}{t}\,dt, \;\;v=\dfrac{t^4}{4}.\nonumber \]

Therefore,

\[\begin{align*} \int_1^e t^3\ln t\,dt &={\Big[\dfrac{t^4}{4}\ln t\Big]}_1^e−\dfrac{1}{4}\int_1^e t^3\,dt \\[4pt] &=\dfrac{e^4}{4}−\dfrac{1}{4}\left(\dfrac{e^4}{4}−\dfrac{1}{4}\right). \end{align*}\]

Thus,

\[\begin{align*} \int_C \vecs F \cdot d\vecs{r} &= 4\int_1^e t^3\ln t\, dt\quad +\quad \dfrac{e^4}{4}+e^3 − \dfrac{5}{4} \\[4pt] &=4\left(\dfrac{e^4}{4}−\dfrac{1}{4}\left(\dfrac{e^4}{4}−\dfrac{1}{4}\right)\right)+\dfrac{e^4}{4}+e^3−\dfrac{5}{4}\\[4pt] &=e^4−\dfrac{e^4}{4}+\dfrac{1}{4}+\dfrac{e^4}{4}+e^3−\dfrac{5}{4} \\[4pt] &=e^4+e^3−1. \end{align*}\]

2. Given that \(f(x,y,z)=x^2\ln y+yz^2\) is a potential function for \(\vecs F\), let’s use the Fundamental Theorem for Line Integrals to calculate the integral. Note that

\[\begin{align*} \int_C \vecs F \cdot d\vecs{r} &=\int_C \vecs \nabla f \cdot d\vecs{r} \\[4pt] &=f(\vecs r(e))−f(\vecs r(1)) \\[4pt] &=f(e^2,e,e)−f(1,1,1)\\[4pt] &=e^4+e^3−1. \end{align*}\]

This calculation is much more straightforward than the calculation we did in (a). As long as we have a potential function, calculating a line integral using the Fundamental Theorem for Line Integrals is much easier than calculating without the theorem.

Example \(\PageIndex{3}\) illustrates a nice feature of the Fundamental Theorem of Line Integrals: it allows us to calculate more easily many vector line integrals. As long as we have a potential function, calculating the line integral is only a matter of evaluating the potential function at the endpoints and subtracting.

Given that \(f(x,y)={(x−1)}^2y+{(y+1)}^2x\) is a potential function for \(\vecs F(x,y)=⟨2xy−2y+{(y+1)}^2,{(x−1)}^2+2yx+2x⟩\), calculate integral \(\int_C \vecs F·d\vecs r\), where \(C\) is the lower half of the unit circle oriented counterclockwise.

**Hint**-
The Fundamental Theorem for Line Intervals says this integral depends only on the value of \(f\) at the endpoints of \(C\).

**Answer**-
2

The Fundamental Theorem for Line Integrals has two important consequences. The first consequence is that if \(\vecs{F}\) is conservative and \(C\) is a closed curve, then the circulation of \(\vecs{F}\) along \(C\) is zero—that is, \(\int_C \vecs F·d\vecs r=0\). To see why this is true, let \(f\) be a potential function for \(\vecs{F}\). Since \(C\) is a closed curve, the terminal point \(\vecs r(b)\) of \(C\) is the same as the initial \(\vecs r(a)\) of \(C\)—that is, \(\vecs r(a)=\vecs r(b)\). Therefore, by the Fundamental Theorem for Line Integrals,

\[\begin{align} \oint_C \vecs F·d\vecs r &=\oint_C \vecs \nabla f·d\vecs r\\[4pt] &=f(\vecs r(b))−f(\vecs r(a)) \\[4pt] &=f(\vecs r(b))−f(\vecs r(b)) \\[4pt] &=0. \end{align} \nonumber \]

Recall that the reason a conservative vector field \(\vecs{F}\) is called “conservative” is because such vector fields model forces in which energy is conserved. We have shown gravity to be an example of such a force. If we think of vector field \(\vecs{F}\) in integral \(\oint_C \vecs F·d\vecs r\) as a gravitational field, then the equation \(\oint_C \vecs{F}·d\vecs{r}=0\) follows. If a particle travels along a path that starts and ends at the same place, then the work done by gravity on the particle is zero.

The second important consequence of the Fundamental Theorem for Line Integrals (Equation \ref{FunTheLine}) is that line integrals of conservative vector fields are independent of path—meaning, they depend only on the endpoints of the given curve, and do not depend on the path between the endpoints.

Let \(\vecs{F}\) be a vector field with domain \(D\); it is independent of path (or path independent) if

\[\int_{C_1} \vecs{F}·d\vecs{r}=\int_{C_2} \vecs{F}·d\vecs{r} \nonumber \]

for any paths \(C_1\) and \(C_2\) in \(D\) with the same initial and terminal points.

The second consequence is stated formally in the following theorem.

If \(\vecs{F}\) is a *conservative vector field*, then \(\vecs{F}\) is independent of path.

Let \(D\) denote the domain of \(\vecs{F}\) and let \(C_1\) and \(C_2\) be two paths in \(D\) with the same initial and terminal points (Figure \(\PageIndex{5}\)). Call the initial point \(P_1\) and the terminal point \(P_2\). Since \(\vecs{F}\) is conservative, there is a potential function \(f\) for \(\vecs{F}\). By the Fundamental Theorem for Line Integrals,

\[\int_{C_1} \vecs{F}·d\vecs{r}=f(P_2)−f(P_1)=\int_{C_2} \vecs{F}·d\vecs{r}. \nonumber \]

Therefore, \(\int_{C_1}\vecs F·d\vecs r=\int_{C_2}\vecs F·d\vecs r\) and \(\vecs{F}\) is independent of path.

\(\square\)

To visualize what independence of path means, imagine three hikers climbing from base camp to the top of a mountain. Hiker 1 takes a steep route directly from camp to the top. Hiker 2 takes a winding route that is not steep from camp to the top. Hiker 3 starts by taking the steep route but halfway to the top decides it is too difficult for him. Therefore he returns to camp and takes the non-steep path to the top. All three hikers are traveling along paths in a gravitational field. Since gravity is a force in which energy is conserved, the gravitational field is conservative. By independence of path, the total amount of work done by gravity on each of the hikers is the same because they all started in the same place and ended in the same place. The work done by the hikers includes other factors such as friction and muscle movement, so the total amount of energy each one expended is not the same, but the net energy expended against gravity is the same for all three hikers.

We have shown that if \(\vecs{F}\) is conservative, then \(\vecs{F}\) is independent of path. It turns out that if the domain of \(\vecs{F}\) is open and connected, then the converse is also true. That is, if \(\vecs{F}\) is independent of path and the domain of \(\vecs{F}\) is open and connected, then \(\vecs{F}\) is conservative. Therefore, the set of conservative vector fields on open and connected domains is precisely the set of vector fields independent of path.

If \(\vecs{F}\) is a continuous vector field that is independent of path and the domain \(D\) of \(\vecs{F}\) is open and connected, then \(\vecs{F}\) is conservative.

We prove the theorem for vector fields in \(ℝ^2\). The proof for vector fields in \(ℝ^3\) is similar. To show that \(\vecs F=⟨P,Q⟩\) is conservative, we must find a potential function \(f\) for \(\vecs{F}\). To that end, let \(X\) be a fixed point in \(D\). For any point \((x,y)\) in \(D\), let \(C\) be a path from \(X\) to \((x,y)\). Define \(f(x,y)\) by \(f(x,y)=\int_C \vecs F·d\vecs r\). (Note that this definition of \(f\) makes sense only because \(\vecs{F}\) is independent of path. If \(\vecs{F}\) was not independent of path, then it might be possible to find another path \(C′\) from \(X\) to \((x,y)\) such that \(\int_C \vecs F·d\vecs r≠\int_{C'} \vecs F·d\vecs r\), and in such a case \(f(x,y)\) would not be a function.) We want to show that \(f\) has the property \(\vecs \nabla f=\vecs F\).

Since domain \(D\) is open, it is possible to find a disk centered at \((x,y)\) such that the disk is contained entirely inside \(D\). Let \((a,y)\) with \(a<x\) be a point in that disk. Let \(C\) be a path from \(X\) to \((x,y)\) that consists of two pieces: \(C_1\) and \(C_2\). The first piece, \(C_1\), is any path from \(C\) to \((a,y)\) that stays inside \(D\); \(C_2\) is the horizontal line segment from \((a,y)\) to \((x,y)\) (Figure \(\PageIndex{6}\)). Then

\[f(x,y)=\int_{C_1} \vecs F·d\vecs r+\int_{C_2}\vecs F \cdot d\vecs r.\nonumber \]

The first integral does not depend on \(x\), so

\[f_x(x,y)=\dfrac{∂}{∂x}\int_{C_2} \vecs F \cdot d\vecs r. \nonumber \]

If we parameterize \(C_2\) by \(\vecs r(t)=⟨t,y⟩\), \(a≤t≤x\), then

\[\begin{align*} f_x(x,y) &=\dfrac{∂}{∂x}\int_{C_2} \vecs F \cdot d\vecs r \\[4pt] &=\dfrac{∂}{∂x}\int_a^x \vecs F(\vecs r(t)) \cdot \vecs r′(t)\,dt \\[4pt] &=\dfrac{∂}{∂x}\int_a^x \vecs F(\vecs r(t)) \cdot \dfrac{d}{dt}(⟨t,y⟩)\,dt \\[4pt] &=\dfrac{∂}{∂x}\int_a^x \vecs F(\vecs r(t)) \cdot ⟨1,0⟩\,dt \\[4pt] &=\dfrac{∂}{∂x}\int_a^x P(t,y)\,dt.\\[4pt] \end{align*}\]

By the Fundamental Theorem of Calculus (part 1),

\[f_x(x,y)=\dfrac{∂}{∂x}\int_a^x P(t,y)\,dt=P(x,y).\nonumber \]

A similar argument using a vertical line segment rather than a horizontal line segment shows that \(f_y(x,y)=Q(x,y)\).

Therefore \(\vecs \nabla f=\vecs F\) and \(\vecs{F}\) is conservative.

\(\square\)

We have spent a lot of time discussing and proving the theorems above, but we can summarize them simply: a vector field \(\vecs F\) on an open and connected domain is conservative if and only if it is independent of path. This is important to know because conservative vector fields are extremely important in applications, and these theorems give us a different way of viewing what it means to be conservative using path independence.

Use path independence to show that vector field \(\vecs F(x,y)=⟨x^2y,y+5⟩\) is not conservative.

**Solution**

We can indicate that \(\vecs{F}\) is not conservative by showing that \(\vecs{F}\) is not path independent. We do so by giving two different paths, \(C_1\) and \(C_2\), that both start at \((0,0)\) and end at \((1,1)\), and yet \(\int_{C_1} \vecs F \cdot d\vecs r≠\int_{C_2} \vecs F \cdot d\vecs r\).

Let \(C_1\) be the curve with parameterization \(\vecs r_1(t)=⟨t,\,t⟩\), \(0≤t≤1\) and let \(C_2\) be the curve with parameterization \(\vecs r_2(t)=⟨t,\,t^2⟩\), \(0≤t≤1\) (Figure \(\PageIndex{7}\).). Then

\[\begin{align*} \int_{C_1} \vecs{F}·d\vecs r &=\int_0^1 \vecs F(\vecs r_1(t))·\vecs r_1′(t)\,dt \\[4pt] &=\int_0^1⟨t^3,t+5⟩·⟨1,1⟩\,dt=\int_0^1(t^3+t+5)\,dt\\[4pt] &={\Big[\dfrac{t^4}{4}+\dfrac{t^2}{2}+5t\Big]}_0^1=\dfrac{23}{4} \end{align*}\]

and

\[\begin{align*} \int_{C_2}\vecs F·d\vecs r &=\int_0^1 \vecs F(\vecs r_2(t))·\vecs r_2′(t)\,dt \\[4pt] &=\int_0^1⟨t^4,t^2+5⟩·⟨1,2t⟩\,dt=\int_0^1(t^4+2t^3+10t)\,dt \\[4pt] &={\Big[\dfrac{t^5}{5}+\dfrac{t^4}{2}+5t^2\Big]}_0^1=\dfrac{57}{10}. \end{align*}\]

Since \(\int_{C_1} \vecs F \cdot d\vecs r≠\int_{C_2} \vecs F \cdot d\vecs r\), the value of a line integral of \(\vecs{F}\) depends on the path between two given points. Therefore, \(\vecs{F}\)** **is not independent of path, and \(\vecs{F}\) is not conservative.

Show that \(\vecs{F}(x,y)=⟨xy,\,x^2y^2⟩\) is not path independent by considering the line segment from \((0,0)\) to \((0,2)\) and the piece of the graph of \(y=\dfrac{x^2}{2}\) that goes from \((0,0)\) to \((0,2)\).

**Hint**-
Calculate the corresponding line integrals.

**Answer**-
If \(C_1\) and \(C_2\) represent the two curves, then \[\int_{C_1} \vecs F \cdot d\vecs r≠\int_{C_2} \vecs F \cdot d\vecs r. \nonumber \]

## Conservative Vector Fields and Potential Functions

As we have learned, the Fundamental Theorem for Line Integrals says that if \(\vecs{F}\) is conservative, then calculating \(\int_C \vecs F·d\vecs r\) has two steps: first, find a potential function \(f\) for \(\vecs{F}\) and, second, calculate \(f(P_1)−f(P_0)\), where \(P_1\) is the endpoint of \(C\) and \(P_0\) is the starting point. To use this theorem for a conservative field \(\vecs{F}\), we must be able to find a potential function \(f\) for \(\vecs{F}\). Therefore, we must answer the following question: Given a conservative vector field \(\vecs{F}\), how do we find a function \(f\) such that \(\vecs \nabla f=\vecs{F}\)? Before giving a general method for finding a potential function, let’s motivate the method with an example.

Find a potential function for \(\vecs F(x,y)=⟨2xy^3,3x^2y^2+\cos(y)⟩\), thereby showing that \(\vecs{F}\) is conservative.

**Solution**

Suppose that \(f(x,y)\) is a potential function for \(\vecs{F}\). Then, \(\vecs \nabla f=\vecs F\), and therefore

\[f_x(x,y)=2xy^3 \; \; \text{and} \;\; f_y(x,y)=3x^2y^2+\cos y. \nonumber \]

Integrating the equation \(f_x(x,y)=2xy^3\) with respect to \(x\) yields the equation

\[f(x,y)=x^2y^3+h(y). \nonumber \]

Notice that since we are integrating a two-variable function with respect to \(x\), we must add a constant of integration that is a constant with respect to \(x\), but may still be a function of \(y\). The equation \(f(x,y)=x^2y^3+h(y)\) can be confirmed by taking the partial derivative with respect to \(x\):

\[\dfrac{∂f}{∂x}=\dfrac{∂}{∂x}(x^2y^3)+\dfrac{∂}{∂x}(h(y))=2xy^3+0=2xy^3. \nonumber \]

Since \(f\) is a potential function for \(\vecs{F}\),

\[f_y(x,y)=3x^2y^2+\cos(y), \nonumber \]

and therefore

\[3x^2y^2+g′(y)=3x^2y^2+\cos(y). \nonumber \]

This implies that \(h′(y)=\cos y\), so \(h(y)=\sin y+C\). Therefore, *any* function of the form \(f(x,y)=x^2y^3+\sin(y)+C\) is a potential function. Taking, in particular, \(C=0\) gives the potential function \(f(x,y)=x^2y^3+\sin(y)\).

To verify that \(f\) is a potential function, note that \(\vecs \nabla f(x,y)=⟨2xy^3,3x^2y^2+\cos y⟩=\vecs F\).

Find a potential function for \(\vecs{F}(x,y)=⟨e^xy^3+y,3e^xy^2+x⟩\).

**Hint**-
Follow the steps in Example \(\PageIndex{5}\).

**Answer**-
\(f(x,y)=e^xy^3+xy\)

The logic of the previous example extends to finding the potential function for any conservative vector field in \(ℝ^2\). Thus, we have the following problem-solving strategy for finding potential functions:

- Integrate \(P\) with respect to \(x\). This results in a function of the form \(g(x,y)+h(y)\), where \(h(y)\) is unknown.
- Take the partial derivative of \(g(x,y)+h(y)\) with respect to \(y\), which results in the function \(gy(x,y)+h′(y)\).
- Use the equation \(gy(x,y)+h′(y)=Q(x,y)\) to find \(h′(y)\).
- Integrate \(h′(y)\) to find \(h(y)\).
- Any function of the form \(f(x,y)=g(x,y)+h(y)+C\), where \(C\) is a constant, is a potential function for \(\vecs{F}\).

We can adapt this strategy to find potential functions for vector fields in \(ℝ^3\), as shown in the next example.

Find a potential function for \(F(x,y,z)=⟨2xy,x^2+2yz^3,3y^2z^2+2z⟩\), thereby showing that \(\vecs{F}\) is conservative.

**Solution**

Suppose that \(f\) is a potential function. Then, \(\vecs \nabla f= \vecs{F}\) and therefore \(f_x(x,y,z)=2xy\). Integrating this equation with respect to \(x\) yields the equation \(f(x,y,z)=x^2y+g(y,z)\) for some function \(g\). Notice that, in this case, the constant of integration with respect to \(x\) is a function of \(y\) and \(z\).

Since \(f\) is a potential function,

\[x^2+2yz^3=f_y(x,y,z)=x^2+g_y(y,z). \nonumber \]

Therefore,

\[g_y(y,z)=2yz^3. \nonumber \]

Integrating this function with respect to \(y\) yields

\[g(y,z)=y^2z^3+h(z) \nonumber \]

for some function \(h(z)\) of \(z\) alone. (Notice that, because we know that \(g\) is a function of only \(y\) and \(z\), we do not need to write \(g(y,z)=y^2z^3+h(x,z)\).) Therefore,

\[f(x,y,z)=x^2y+g(y,z)=x^2y+y^2z^3+h(z). \nonumber \]

To find \(f\), we now must only find \(h\). Since \(f\) is a potential function,

\[3y^2z^2+2z=g_z(y,z)=3y^2z^2+h′(z). \nonumber \]

This implies that \(h′(z)=2z\), so \(h(z)=z^2+C\). Letting \(C=0\) gives the potential function

\[f(x,y,z)=x^2y+y^2z^3+z^2. \nonumber \]

To verify that \(f\) is a potential function, note that \(\vecs \nabla f(x,y,z)=⟨2xy,x^2+2yz^3,3y^2z^2+2z⟩=\vecs F(x,y,z)\).

Find a potential function for \(\vecs{F}(x,y,z)=⟨12x^2,\cos y\cos z,1−\sin y\sin z⟩\).

**Hint**-
Following Example \(\PageIndex{6}\), begin by integrating with respect to \(x\)

*.* **Answer**-
\(f(x,y,z)=4x^3+\sin y\cos z+z\)

We can apply the process of finding a potential function to a gravitational force. Recall that, if an object has unit mass and is located at the origin, then the gravitational force in \(ℝ^2\) that the object exerts on another object of unit mass at the point \((x,y)\) is given by vector field

\(\vecs F(x,y)=−G\left\langle\dfrac{x}{ {(x^2+y^2)}^{3/2} },\dfrac{y}{ {(x^2+y^2)}^{3/2} }\right\rangle\),

where \(G\) is the universal gravitational constant. In the next example, we build a potential function for \(\vecs{F}\), thus confirming what we already know: that gravity is conservative.

Find a potential function \(f\) for \(\vecs{F}(x,y)=−G\left\langle\dfrac{x}{ {(x^2+y^2)}^{3/2} },\dfrac{y}{ {(x^2+y^2)}^{3/2} }\right\rangle\).

**Solution**

Suppose that \(f\) is a potential function. Then, \(\vecs \nabla f= \vecs{F}\) and therefore

\[f_x(x,y)=\dfrac{−Gx}{ {(x^2+y^2)}^{3/2} }.\nonumber \]

To integrate this function with respect to \(x\)*,* we can use \(u\)-substitution. If \(u=x^2+y^2\), then \(\dfrac{du}{2}=x\,dx\), so

\[\begin{align*} \int \dfrac{−Gx}{ {(x^2+y^2)}^{3/2} }\,dx &=\int \dfrac{−G}{2u^{3/2}} \,du \\[4pt] &=\dfrac{G}{\sqrt{u}}+h(y) \\[4pt] &=\dfrac{G}{\sqrt{x^2+y^2}}+h(y) \end{align*}\]

for some function \(h(y)\). Therefore,

\[f(x,y)=\dfrac{G}{ \sqrt{x^2+y^2}}+h(y).\nonumber \]

Since \(f\) is a potential function for \(\vecs{F}\),

\[f_y(x,y)=\dfrac{−Gy}{ {(x^2+y^2)}^{3/2} }\nonumber \].

Since \(f(x,y)=\dfrac{G}{ \sqrt{x^2+y^2}}+h(y)\), \(f_y(x,y)\) also equals \(\dfrac{−Gy}{ {(x^2+y^2)}^{3/2} }+h′(y)\).

Therefore,

\[\dfrac{−Gy}{ {(x^2+y^2)}^{3/2} }+h′(y)=\dfrac{−Gy}{ {(x^2+y^2)}^{3/2} }, \nonumber \]

which implies that \(h′(y)=0\). Thus, we can take \(h(y)\) to be any constant; in particular, we can let \(h(y)=0\). The function

\[f(x,y)=\dfrac{G}{ \sqrt{x^2+y^2} } \nonumber \]

is a potential function for the gravitational field \(\vecs{F}\). To confirm that \(f\) is a potential function, note that

\[\begin{align*} \vecs\nabla f(x,y) &=⟨−\dfrac{1}{2} \dfrac{G}{ {(x^2+y^2)}^{3/2} } (2x),−\dfrac{1}{2} \dfrac{G}{ {(x^2+y^2)}^{3/2} }(2y)⟩ \\[4pt] &=⟨\dfrac{−Gx}{ {(x^2+y^2)}^{3/2} },\dfrac{−Gy}{ {(x^2+y^2)}^{3/2} }⟩\\[4pt] &=\vecs F(x,y). \end{align*}\]

Find a potential function \(f\) for the three-dimensional gravitational force \(\vecs{F}(x,y,z)=\left\langle\dfrac{−Gx}{ {(x^2+y^2+z^2)}^{3/2} },\dfrac{−Gy}{ {(x^2+y^2+z^2)}^{3/2} },\dfrac{−Gz}{ {(x^2+y^2+z^2)}^{3/2} }\right\rangle\).

**Hint**-
Follow the Problem-Solving Strategy.

**Answer**-
\(f(x,y,z)=\dfrac{G}{\sqrt{x^2+y^2+z^2}}\)

## Testing a Vector Field

Until now, we have worked with vector fields that we know are conservative, but if we are not told that a vector field is conservative, we need to be able to test whether it is conservative. Recall that, if \(\vecs{F}\) is conservative, then \(\vecs{F}\) has the cross-partial property (see The Cross-Partial Property of Conservative Vector Fields). That is, if \(\vecs F=⟨P,Q,R⟩\) is conservative, then \(P_y=Q_x\), \(P_z=R_x\), and \(Q_z=R_y\). So, if \(\vecs{F}\) has the cross-partial property, then is \(\vecs{F}\)** **conservative? If the domain of \(\vecs{F}\) is open and simply connected, then the answer is yes.

If \(\vecs{F}=⟨P,Q,R⟩\) is a vector field on an open, simply connected region \(D\) and \(P_y=Q_x\), \(P_z=R_x\), and \(Q_z=R_y\) throughout \(D\), then \(\vecs{F}\) is conservative.

Although a proof of this theorem is beyond the scope of the text, we can discover its power with some examples. Later, we see why it is necessary for the region to be simply connected.

Combining this theorem with the cross-partial property, we can determine whether a given vector field is conservative:

Let \(\vecs{F}=⟨P,Q,R⟩\) be a vector field on an open, simply connected region \(D\)*.* Then \(P_y=Q_x\), \(P_z=R_x\), and \(Q_z=R_y\) throughout \(D\) if and only if \(\vecs{F}\) is conservative.

The version of this theorem in \(ℝ^2\) is also true. If \(\vecs F(x,y)=⟨P,Q⟩\) is a vector field on an open, simply connected domain in \(ℝ^2\), then \(\vecs F\) is conservative if and only if \(P_y=Q_x\).

Determine whether vector field \(\vecs F(x,y,z)=⟨xy^2z,x^2yz,z^2⟩\) is conservative.

**Solution**

Note that the domain of \(\vecs{F}\) is all of \(ℝ^2\) and \(ℝ^3\) is simply connected. Therefore, we can use **The Cross-Partial Property of Conservative Vector Fields** to determine whether \(\vecs{F}\) is conservative. Let

\[P(x,y,z)=xy^2z \nonumber \]

\[Q(x,y,z)=x^2yz \nonumber \]

and

\[R(x,y,z)=z^2.\nonumber \]

Since \(Q_z(x,y,z)=x^2y\) and \(R_y(x,y,z)=0\), the vector field is not conservative.

Determine vector field \(\vecs{F}(x,y)=⟨x\ln (y), \,\dfrac{x^2}{2y}⟩\) is conservative.

**Solution**

Note that the domain of \(\vecs{F}\) is the part of \(ℝ^2\) in which \(y>0\). Thus, the domain of \(\vecs{F}\) is part of a plane above the \(x\)-axis, and this domain is simply connected (there are no holes in this region and this region is connected). Therefore, we can use **The Cross-Partial Property of Conservative Vector Fields** to determine whether \(\vecs{F}\) is conservative. Let

\[P(x,y)=x\ln (y) \;\; \text{and} \;\;\ Q(x,y)=\dfrac{x^2}{2y}. \nonumber \]

Then \(P_y(x,y)=\dfrac{x}{y}=Q_x(x,y)\) and thus \(\vecs{F}\) is conservative.

Determine whether \(\vecs{F}(x,y)=⟨\sin x\cos y,\,\cos x\sin y⟩\) is conservative.

**Hint**-
Use

**The Cross-Partial Property of Conservative Vector Fields**from the previous section. **Answer**-
It is conservative.

When using **The Cross-Partial Property of Conservative Vector Fields**, it is important to remember that a theorem is a tool, and like any tool, it can be applied only under the right conditions. In the case of **The Cross-Partial Property of Conservative Vector Fields**, the theorem can be applied only if the domain of the vector field is simply connected.

To see what can go wrong when misapplying the theorem, consider the vector field from Example \(\PageIndex{4}\):

\[\vecs F(x,y)=\dfrac{y}{x^2+y^2}\,\hat{\mathbf i}+\dfrac{−x}{x^2+y^2}\,\hat{\mathbf j}. \nonumber \]

This vector field satisfies the cross-partial property, since

\[\dfrac{∂}{∂y}\left(\dfrac{y}{x^2+y^2}\right)=\dfrac{(x^2+y^2)−y(2y)}{ {(x^2+y^2)}^2}=\dfrac{x^2−y^2}{ {(x^2+y^2)}^2} \nonumber \]

and

\[\dfrac{∂}{∂x}\left(\dfrac{−x}{x^2+y^2}\right)=\dfrac{−(x^2+y^2)+x(2x)}{ {(x^2+y^2)}^2}=\dfrac{x^2−y^2}{ {(x^2+y^2)}^2}. \nonumber \]

Since \(\vecs{F}\) satisfies the cross-partial property, we might be tempted to conclude that \(\vecs{F}\) is conservative. However, \(\vecs{F}\) is not conservative. To see this, let

\[\vecs r(t)=⟨\cos t,\sin t⟩,\;\; 0≤t≤\pi \nonumber \]

be a parameterization of the upper half of a unit circle oriented counterclockwise (denote this \(C_1\)) and let

\[\vecs s(t)=⟨\cos t,−\sin t⟩,\;\; 0≤t≤\pi \nonumber \]

be a parameterization of the lower half of a unit circle oriented clockwise (denote this \(C_2\)). Notice that \(C_1\) and \(C_2\) have the same starting point and endpoint. Since \({\sin}^2 t+{\cos}^2 t=1\),

\[\vecs F(\vecs r(t)) \cdot \vecs r′(t)=⟨\sin(t),−\cos(t)⟩ \cdot ⟨−\sin(t), \cos(t)⟩=−1 \nonumber \]

and

\[\vecs F(\vecs s(t))·\vecs s′(t)=⟨−\sin t,−\cos t⟩·⟨−\sin t,−\cos t⟩={\sin}^2 t+{\cos}^2t=1. \nonumber \]

Therefore,

\[\int_{C_1} \vecs F·d\vecs r=\int_0^{\pi}−1\,dt=−\pi \nonumber \]

and

\[\int_{C_2}\vecs F·d\vecs r=\int_0^{\pi} 1\,dt=\pi. \nonumber \]

Thus, \(C_1\) and \(C_2\) have the same starting point and endpoint, but \(\int_{C_1} \vecs F·d\vecs r≠\int_{C_2} \vecs F·d\vecs r\). Therefore, \(\vecs{F}\) is not independent of path and \(\vecs{F}\) is not conservative.

To summarize: \(\vecs{F}\) satisfies the cross-partial property and yet \(\vecs{F}\) is not conservative. What went wrong? Does this contradict **The Cross-Partial Property of Conservative Vector Fields**? The issue is that the domain of \(\vecs{F}\) is all of \(ℝ^2\) except for the origin. In other words, the domain of \(\vecs{F}\) has a hole at the origin, and therefore the domain is not simply connected. Since the domain is not simply connected, **The Cross-Partial Property of Conservative Vector Fields** does not apply to \(\vecs{F}\).

We close this section by looking at an example of the usefulness of the Fundamental Theorem for Line Integrals. Now that we can test whether a vector field is conservative, we can always decide whether the Fundamental Theorem for Line Integrals can be used to calculate a vector line integral. If we are asked to calculate an integral of the form \(\int_C \vecs F·d\vecs r\), then our first question should be: Is \(\vecs{F}\)** **conservative? If the answer is yes, then we should find a potential function and use the Fundamental Theorem for Line Integrals to calculate the integral. If the answer is no, then the Fundamental Theorem for Line Integrals cannot help us and we have to use other methods, such as using the method from the previous section (using \(\vecs F(\vecs r(t))\) and \(\vecs r'(t)\)).

Calculate line integral \(\int_C \vecs F·d\vecs r\), where \(\vecs F(x,y,z)=⟨2xe^yz+e^xz,\,x^2e^yz,\,x^2e^y+e^x⟩\) and \(C\) is any smooth curve that goes from the origin to \((1,1,1)\).

**Solution**

Before trying to compute the integral, we need to determine whether \(\vecs{F}\) is conservative and whether the domain of \(\vecs{F}\) is simply connected. The domain of \(\vecs{F}\) is all of \(ℝ^3\), which is connected and has no holes. Therefore, the domain of \(\vecs{F}\) is simply connected. Let

\[P(x,y,z)=2xe^yz+e^xz, \;\; Q(x,y,z)=x^2e^yz, \;\; \text{and} \;\; R(x,y,z)=x^2e^y+e^x \nonumber \]

so that \(\vecs{F}(x,y,z)=⟨P,Q,R⟩\). Since the domain of \(\vecs{F}\) is simply connected, we can check the cross partials to determine whether \(\vecs{F}\)** **is conservative. Note that

\[\begin{align*} P_y(x,y,z) &=2xe^yz=Q_x(x,y,z) \\[4pt]P_z(x,y,z) &=2xe^y+e^x=R_x(x,y,z) \\[4pt] Q_z(x,y,z) &=x^2e^y=R_y(x,y,z).\end{align*}\]

Therefore, \(\vecs{F}\) is conservative.

To evaluate \(\int_C \vecs F·d\vecs r\) using the Fundamental Theorem for Line Integrals, we need to find a potential function \(f\) for \(\vecs{F}\). Let \(f\) be a potential function for \(\vecs{F}\). Then, \(\vecs \nabla f=\vecs F\), and therefore \(f_x(x,y,z)=2xe^yz+e^xz\). Integrating this equation with respect to \(x\) gives \(f(x,y,z)=x^2e^yz+e^xz+h(y,z)\) for some function \(h\). Differentiating this equation with respect to \(y\) gives \(x^2e^yz+h_y(y,z)=Q(x,y,z)=x^2e^yz\), which implies that \(h_y(y,z)=0\). Therefore, \(h\) is a function of \(z\) only, and \(f(x,y,z)=x^2e^yz+e^xz+h(z)\). To find \(h\), note that \(f_z=x^2e^y+e^x+h′(z)=R=x^2e^y+e^x\). Therefore, \(h′(z)=0\) and we can take \(h(z)=0\). A potential function for \(\vecs{F}\) is \(f(x,y,z)=x^2e^yz+e^xz\).

Now that we have a potential function, we can use the Fundamental Theorem for Line Integrals to evaluate the integral. By the theorem,

\[\begin{align*} \int_C \vecs F·d\vecs r &=\int_C \vecs \nabla f·d\vecs r\\[4pt] &=f(1,1,1)−f(0,0,0)\\[4pt] &=2e. \end{align*}\]

**Analysis**

Notice that if we hadn’t recognized that \(\vecs{F}\) is conservative, we would have had to parameterize \(C\) and use the method from the previous section. Since curve \(C\) is unknown, using the Fundamental Theorem for Line Integrals is much simpler.

Calculate integral \(\int_C \vecs F·d\vecs r\), where \(\vecs{F}(x,y)=⟨\sin x\sin y, 5−\cos x\cos y⟩\) and \(C\) is a semicircle with starting point \((0,\pi)\) and endpoint \((0,−\pi)\).

**Hint**-
Use the Fundamental Theorem for Line Integrals.

**Answer**-
\(−10\pi\)

Let \(\vecs F(x,y)=⟨2xy^2,2x^2y⟩\) be a force field. Suppose that a particle begins its motion at the origin and ends its movement at any point in a plane that is not on the \(x\)-axis or the \(y\)-axis. Furthermore, the particle’s motion can be modeled with a smooth parameterization. Show that \(\vecs{F}\) does positive work on the particle.

**Solution**

We show that \(\vecs{F}\) does positive work on the particle by showing that \(\vecs{F}\) is conservative and then by using the Fundamental Theorem for Line Integrals.

To show that \(\vecs{F}\) is conservative, suppose \(f(x,y)\) were a potential function for \(\vecs{F}\). Then, \(\vecs \nabla f(x,y)=\vecs F(x,y)=⟨2xy^2,2x^2y⟩\) and therefore \(f_x(x,y)=2xy^2\) and \(f_y(x,y)=2x^2y\). The equation \(fx(x,y)=2xy^2\) implies that \(f(x,y)=x^2y^2+h(y)\). Deriving both sides with respect to \(y\) yields \(f_y(x,y)=2x^2y+h′(y)\). Therefore, \(h′(y)=0\) and we can take \(h(y)=0\).

If \(f(x,y)=x^2y^2\), then note that \(\vecs \nabla f(x,y)=⟨2xy^2,2x^2y⟩=\vecs F\), and therefore \(f\) is a potential function for \(\vecs{F}\).

Let \((a,b)\) be the point at which the particle stops is motion, and let \(C\) denote the curve that models the particle’s motion. The work done by \(\vecs{F}\) on the particle is \(\int_C \vecs{F}·d\vecs{r}\). By the Fundamental Theorem for Line Integrals,

\[\begin{align*} \int_C \vecs F·d\vecs r &=\int_C \nabla f·d\vecs r \\[4pt] &=f(a,b)−f(0,0)\\[4pt] &=a^2b^2. \end{align*}\]

Since \(a≠0\) and \(b≠0\), by assumption, \(a^2b^2>0\). Therefore, \(\int_C \vecs F·d\vecs r>0\), and \(\vecs{F}\) does positive work on the particle.

**Analysis**

Notice that this problem would be much more difficult without using the Fundamental Theorem for Line Integrals. To apply the tools we have learned, we would need to give a curve parameterization and use the method from the previous section. Since the path of motion \(C\) can be as exotic as we wish (as long as it is smooth), it can be very difficult to parameterize the motion of the particle.

Let \(\vecs{F}(x,y)=⟨4x^3y^4,4x^4y^3⟩\), and suppose that a particle moves from point \((4,4)\) to \((1,1)\) along any smooth curve. Is the work done by \(\vecs{F}\) on the particle positive, negative, or zero?

**Hint**-
Use the Fundamental Theorem for Line Integrals.

**Answer**-
Negative

## Key Concepts

- The theorems in this section require curves that are closed, simple, or both, and regions that are connected or simply connected.
- The line integral of a conservative vector field can be calculated using the Fundamental Theorem for Line Integrals. This theorem is a generalization of the Fundamental Theorem of Calculus in higher dimensions. Using this theorem usually makes the calculation of the line integral easier.
- Conservative fields are independent of path. The line integral of a conservative field depends only on the value of the potential function at the endpoints of the domain curve.
- Given vector field \(\vecs{F}\), we can test whether \(\vecs{F}\) is conservative by using the cross-partial property. If \(\vecs{F}\) has the cross-partial property and the domain is simply connected, then \(\vecs{F}\) is conservative (and thus has a potential function). If \(\vecs{F}\) is conservative, we can find a potential function by using the Problem-Solving Strategy.
- The circulation of a conservative vector field on a simply connected domain over a closed curve is zero.

## Key Equations

**Fundamental Theorem for Line Integrals**

\(\displaystyle \int_C \vecs \nabla f·d\vecs r=f(\vecs r(b))−f(\vecs r(a))\)**Circulation of a conservative field over curve***C*that encloses a simply connected region

\(\displaystyle \oint_C \vecs \nabla f·d\vecs r=0\)

## Glossary

**closed curve**- a curve that begins and ends at the same point

**connected region**- a region in which any two points can be connected by a path with a trace contained entirely inside the region

**Fundamental Theorem for Line Integrals**- the value of line integral \(\displaystyle \int_C\vecs ∇f⋅d\vecs r\) depends only on the value of \(f\) at the endpoints of \(C: \displaystyle \int_C \vecs ∇f⋅d\vecs r=f(\vecs r(b))−f(\vecs r(a))\)

**independence of path**- a vector field \(\vecs{F}\) has path independence if \(\displaystyle \int_{C_1} \vecs F⋅d\vecs r=\displaystyle \int_{C_2} \vecs F⋅d\vecs r\) for any curves \(C_1\) and \(C_2\) in the domain of \(\vecs{F}\) with the same initial points and terminal points

**simple curve**- a curve that does not cross itself

**simply connected region**- a region that is connected and has the property that any closed curve that lies entirely inside the region encompasses points that are entirely inside the region