Skip to main content

Section 2.3 Path independence, conservative fields, potential functions

Subsection 2.3.1 Gradient vector fields and the fundamental theorem of line integrals

Definition 2.3.1. Gradient vector fields and potential functions.

A vector field \(\boldF\colon \R^n\rightarrow \R^n\) is a gradient vector field if there is a scalar function \(f\colon \R^n\rightarrow \R\) such that

\begin{equation} \nabla f=\boldF\text{.}\tag{2.3.1} \end{equation}

A function \(f\) satisfying (2.3.1) is a potential function of \(\boldF\text{.}\)

Example 2.3.2. Gradient vector fields.

The vector field

\begin{equation*} \boldF=\angvec{yz, xz, xy} \end{equation*}

is a gradient vector field. Indeed, we have \(\boldF=\nabla f\text{,}\) where

\begin{equation*} f(x,y,z)=xyz\text{.} \end{equation*}

Thus \(f\) is a potential function for \(\boldF\text{.}\) The function \(g(x,y,z)=xyz+5\) is another potential function of \(\boldF\text{.}\)

The vector field

\begin{equation*} \boldF=\angvec{-\frac{x}{\sqrt{x^2+y^2}}, -\frac{y}{\sqrt{x^2+y^2}}}, (x,y)\ne (0,0) \end{equation*}

is a gradient vector field, with potential function

\begin{equation*} f(x,y)=\frac{1}{\sqrt{x^2+y^2}}=\frac{1}{\abs{(x,y)}}\text{.} \end{equation*}

Gradient vector fields \(\boldF=\nabla f\) are nice to compute with, as the following theorem indicates.

We have

\begin{align*} \int_\mathcal{C}\boldF\cdot d\boldr \amp = \int_a^b\boldF(\boldr(t))\boldr'(t)\, dt \\ \amp= \int_a^b \nabla f(\boldr(t))\cdot \boldr'(t)\, dt \\ \amp = \int_a^b (f(\boldr(t))'\, dt \amp \text{(chain rule)}\\ \amp = f(\boldr(b))-f(\boldr(a)) \amp \text{(FTC)}\\ \amp =f(Q)-f(P)\text{.} \end{align*}

Let \(P\) be the initial and end point of the closed curve \(\mathcal{C}\text{.}\) According to Theorem 2.3.3 we have

\begin{equation*} \int_\mathcal{C}\boldF\cdot d\boldr=f(P)-f(P)=0\text{.} \end{equation*}

Corollary 2.3.4 provides a potential way of showing a vector field \(\boldF\) is not a gradient field: namely, show that \(\oint_\mathcal{C}\boldF\cdot d\boldr\ne 0\) for a suitably chosen closed curve \(\mathcal{C}\text{.}\)

Example 2.3.5. A non-gradient vector field.

Use Corollary 2.3.4 to show that \(\boldF=\angvec{-y,x}\) is not a gradient vector field.

Solution.

Let \(\mathcal{C}\) be the unit circle \(x^2+y^2=1\text{,}\) with parametrization \(\boldr(t)=(\cos t, \sin t)\text{.}\) We have

\begin{align*} \oint_\mathcal{C}\boldF\cdot d\boldr \amp = \int_0^{2\pi} \boldF(\cos t, \sin t)\cdot \angvec{-\sin t, \cos t} \, dt\\ \amp = \int_0^{2\pi}\angvec{-\sin t, \cos t}\cdot \angvec{-\sin t, \cos t}\, dt\\ \amp = \int_0^{2\pi}\sin^2 t+\cos^2 t\, dt \\ \amp = 2\pi\text{.} \end{align*}

Since \(\oint_\mathcal{C}\boldF\cdot d\boldr\ne 0\text{,}\) Corollary 2.3.4 implies that we cannot have \(\boldF=\nabla f\text{.}\)

Example 2.3.6. Work done by gravity.

Given a point particle of mass M at the origin in \(\R^3\text{,}\) the gravitational force \(\boldF(x,y,z)\) acting on a point particle of mass \(m\) at position \((x,y,z)\) is

\begin{equation*} \boldF(x,y,z)=-\frac{GmM}{\abs{\boldx}^3}\boldx=-\frac{GmM}{(x^2+y^2+z^2)^{3/2}}\angvec{x,y,z}\text{,} \end{equation*}

where \(G\) is the gravitational constant and \(\boldx=\angvec{x,y,z}\) is the position vector of the object. Compute the work done by gravity if the point particle of mass \(m\) travels from position \(P=(x_1,y_1,z_1)\) to position \(Q=(x_2,y_2,z_2)\) along a smooth curve \(\mathcal{C}\text{.}\)

Solution.

As suggested by the setup, we suspect \(\boldF\) is a gradient vector field. Indeed, we have \(\boldF=\nabla f\text{,}\) where

\begin{equation*} f(x,y,z)=\frac{GmM}{\sqrt{x^2+y^2+z^2}}=\frac{GmM}{\abs{(x,y,z)}}\text{,} \end{equation*}

as you can easily check. According to Theorem 2.3.3, we have

\begin{align*} W\amp =\int_\mathcal{C}\boldF\cdot d\boldr\\ \amp = f(Q)-f(P) \\ \amp = GmM\left (\frac{1}{\sqrt{x_2^2+y_2^2+z_2^2}}-\frac{1}{\sqrt{x_1^2+y_1^2+z_1^2}}\right ) \\ \amp = GmM\left(\frac{1}{\abs{Q}} -\frac{1}{\abs{P}}\right)\text{.} \end{align*}

Observe that this expression for the work \(W\) is equal to the change in the object's kinetic energy the object undergoes as it moves from position \(P\) to \(Q\text{.}\)

Subsection 2.3.2 Conservative vector fields

Theorem 2.3.3 can be summarized by saying that if \(\boldF=\nabla f\) is a gradient vector field, then the line integrals along any two paths connecting points \(P\) and \(Q\) are always equal: i.e. that the line integral from \(P\) to \(Q\) of \(\boldF\) is independent of the path.

Definition 2.3.7. Conservative vector field.

Let \(\boldF\) be a continuous vector field on the open set \(D\text{.}\) We say \(\boldF\) is conservative if for any points \(P, Q\in D\text{,}\) and any piecewise smooth curves \(\mathcal{C}_1, \mathcal{C}_2\subseteq D\) starting at \(P\) and ending at \(Q\text{,}\) we have

\begin{equation} \int_{\mathcal{C}_1}\boldF\cdot d\boldr=\int_{\mathcal{C}_2}\boldF\cdot d\boldr.\tag{2.3.3} \end{equation}

When (2.3.3) holds, we say that line integrals of \(\boldF\) between points in \(D\) are path independent.

Assume \(\boldF\) is conservative. Given a closed curve \(\mathcal{C}\text{,}\) pick two points \(P, Q\in \mathcal{C}\) and consider \(\mathcal{C}\) as a parametrize curve \(\mathcal{C}_1\) from \(P\) to \(Q\) followed by a parametrized curve \(\mathcal{C}_2\) from \(Q\) to \(P\text{.}\) We have

\begin{align*} \oint_\mathcal{C}\boldF\cdot d\boldr \amp = \int_{\mathcal{C}_1}\boldF\cdot d\boldr+\int_{\mathcal{C}_2}\boldF\cdot d\boldr \\ \amp= \int_{\mathcal{C}_1}\boldF\cdot d\boldr-\int_{-\mathcal{C}_2}\boldF\cdot d\boldr \amp \text{(prop. of reverse curves)}\\ \amp = \int_{\mathcal{C}_1}\boldF\cdot d\boldr-\int_{\mathcal{C}_1}\boldF\cdot d\boldr \amp (\boldF \text{ conservative})\\ \amp = 0\text{.} \end{align*}

How is the conservative property used in the penultimate equality? The parametrizations \(\mathcal{C}_1\) and \(-\mathcal{C}_2\) both start at \(P\) and end at \(Q\text{;}\) since \(\boldF\) is conservative, the corresponding line integrals are equal.

The proof is very similar to the first implication. Given any two curves \(\mathcal{C}_1, \mathcal{C}_2\) connecting points \(P,Q\text{,}\) the curve \(\mathcal{C}\) obtained by first travelling along \(\mathcal{C}_1\) and then along the reverse\(-\mathcal{C}_2\) of \(\mathcal{C}_2\) is closed. We have

\begin{equation*} 0=\oint_\mathcal{C}\boldF\cdot d\boldr=\int_{\mathcal{C}_1}\boldF\cdot d\boldr-\int_{\mathcal{C}_2}\boldF\cdot d\boldr\text{,} \end{equation*}

and hence

\begin{equation*} \int_{\mathcal{C}_1}\boldF\cdot d\boldr=\int_{\mathcal{C}_2}\boldF\cdot d\boldr\text{.} \end{equation*}

Take any piecewise smooth curve \(\mathcal{C}\subseteq D\) from point \(P\) to \(Q\text{,}\) and let \(P=P_0, P_1,\dots, P_{n-1}, P_n=Q\) be a partition of \(\mathcal{C}\) into \(n\) smooth curve segments \(\mathcal{C}_k\) from \(P_{k-1}\) to \(P_k\text{.}\) We have

\begin{align*} \int_\mathcal{C}\boldF\cdot d\boldr \amp = \sum_{k=1}^n \int_{\mathcal{C}_k}\boldF\cdot d\boldr\\ \amp =\sum_{k=1}^n (f(P_k)-f(P_{k-1})) \amp \knowl{./knowl/th_fund_thm_line_integrals.html}{\text{2.3.3}} \\ \amp = f(P_n)-f(P_0) \amp \text{(telescoping sum)} \\ \amp = f(Q)-f(P)\text{.} \end{align*}

This shows that the line integral of \(\boldF\) between any two points in \(D\) is path independent, and hence that \(\boldF\) is conservative on \(D\text{.}\)

Definition 2.3.10. Open connected sets.

An open set \(D\subseteq\R^n\) is connected if for any two points \(P, Q\in D\) there is a piecewise smooth curve \(\mathcal{C}\subseteq D\) from \(P\) to \(Q\text{.}\)

Our proof will assume \(n=2\) for simplicity of notation; it works just as well for \(n=3\text{.}\) Assume \(\boldF=\angvec{F_1, F_2}\) is conservative. We define the scalar function \(f\) as follows: fix any \(P=(x_0,y_0)\) in \(D\text{;}\) for any \((x,y)\in D\) define

\begin{equation*} f(x,y)=\int_P^{(x,y)}\boldF\cdot d\boldr\text{,} \end{equation*}

where the notation \(\int_P^{(x,y)}\boldF\cdot d\boldr\) is understood to mean the line integral of \(\boldF\) over any choice of piecewise smooth curve \(\mathcal{C}\subseteq D\text{.}\) That \(f(x,y)\) is a well-defined function follows from the fact that (a) there is some choice of curve \(\mathcal{C}\) from \(P\) to \((x,y)\) (\(D\) is connected), and (b) the value of the line integral does not depend on this choice (\(\boldF\) is conservative). Next, we claim that \(f\) is a potential function for \(\boldF\text{:}\) i.e., \(\nabla f=\boldF\text{.}\) Indeed, we have

\begin{align*} f_x(x,y) \amp =\lim_{h\rightarrow 0}\frac{1}{h}(f(x+h,y)-f(x,y)) \amp \text{def. of } f_x\\ \amp=\lim_{h\rightarrow 0}\frac{1}{h}(\int_P^{(x+h,y)}\boldF\cdot d\boldr-\int_P^{(x,y)}\boldF\cdot d\boldr) \\ \amp = \lim_{h\rightarrow 0}\frac{1}{h}\int_{(x,y)}^{(x+h,y)}\boldF\cdot d\boldr \amp \text{(integral props.)}\\ \amp = \lim_{h\rightarrow 0}\frac{1}{h}\int_0^h\boldF(x+t, y)\cdot \angvec{1,0}\, dt \amp \boldr(t)=(x+t,y), 0\leq t\leq h \\ \amp =\lim_{h\rightarrow 0}\frac{1}{h}\int_0^hF_1(x+t, y)\, dt\\ \amp = \frac{d}{dh}\left( \int_0^h F_1(x+t,y)\, dt \right)\Bigr\vert_{h=0}\\ \amp = F_1(x+0, y) \amp \text{(FTC!)}\\ \amp = F_1(x,y)\text{.} \end{align*}

This proves \(f_x=F_1\text{;}\) the argument that \(f_y=F_2\) is exactly similar. We conclude \(\nabla f=\angvec{F_1, F_2}=\boldF\text{.}\)

Subsection 2.3.3 Curl test for conservative fields

Definition 2.3.12. Curl of a vector field.

Let \(\boldF=\angvec{F_1, F_2, F_3}\) be a vector field on the set \(D\subseteq \R^3\text{,}\) and assume the first order partial derivatives of the component functions exist. We define the curl of \(\boldF\text{,}\) denoted \(\curl \boldF\) or \(\nabla \times \boldF\text{,}\) as the vector field

\begin{align*} \curl\boldF \amp= \nabla\times \boldF\\ \amp =\det \begin{pmatrix} \boldi \amp \boldj \amp \boldk \\ \frac{\partial}{\partial x} \amp \frac{\partial}{\partial y} \amp\frac{\partial}{\partial z}\\ F_1 \amp F_2 \amp F_3 \end{pmatrix}\\ \amp =\angvec{\partial F_3/\partial y-\partial F_2/\partial z,-(\partial F_3/\partial x-\partial F_1/\partial z), \partial F_2/\partial x-\partial F_1/\partial y}\text{.} \end{align*}

We will study curl in more detail later, but for now we observe that it provides a partial check for whether a vector field is a gradient field.

If \(\boldF=\angvec{F_1,F_2,F_3}=\nabla f\) for some some \(f\text{,}\) then

\begin{align*} \frac{\partial F_3 }{\partial y}-\frac{\partial F_2}{\partial z} \amp = \frac{\partial^2 f }{\partial y\partial z}-\frac{\partial f}{\partial z\partial y} \amp (F_3=f_z, F_2=f_y)\\ \amp=0 \amp \left( \frac{\partial^2 f }{\partial y\partial z}=\frac{\partial^2 f }{\partial z\partial y}\right) \text{.} \end{align*}

This shows the first component of \(\nabla\times \boldF\) is the zero function. Similar reasoning shows the same is true for the second and third components.

Identify \(\boldF(x,y)=\angvec{F_1(x,y), F_2(x,y)}\) with the 3-dimensional vector field \(\boldF(x,y,z)=\angvec{F_1(x,y),F_2(x,y),0}\text{.}\) The result follows easily from Theorem 2.3.13.

Example 2.3.15. Curl test: conclusive.

Show that \(\boldF(x,y,z)=\angvec{x+xy^2,z,y}\) is not a gradient vector field.

Solution.

The curl of \(\boldF\) is the vector field

\begin{align*} \nabla\times \boldF (x,y,z) \amp =\angvec{\partial/\partial y (y)-\partial/\partial z (z), -(\partial/\partial x(y)-\partial/\partial z (x+xy^2)), \partial/\partial x (z)-\partial/\partial y (x+xy^2)}\\ \amp=\angvec{0,0,-2xy}\ne \boldzero \text{.} \end{align*}

Thus \(\boldF\) is not a gradient vector field by Theorem 2.3.13.

Example 2.3.16. Curl test: inconclusive.

Let \(\boldF=\angvec{-y/(x^2+y^2), x/(x^2+y^2)}\text{.}\) Show that (a) \(\nabla\times \boldF=\boldzero\text{,}\) but (b) \(\boldF\) is not a gradient vector field.

Solution.

The curl computation in (a) is straightforward. To see that \(\boldF\) is not a gradient vector field, we find a closed curve \(\mathcal{C}\) for which \(\int_\mathcal{C}\boldF\cdot d\boldr\ne 0\text{.}\) Take \(\mathcal{C}\) to be the unit circle with parametrization \(\boldr(t)=(\cos t, \sin t)\text{,}\) \(0\leq t\leq 2\pi\text{.}\) We have

\begin{align*} \oint_\mathcal{C}\boldF\cdot d\boldr \amp =\int_0^{2\pi}\boldF(\cos t, \sin t)\cdot \angvec{-\sin t, \cos t}\, dt \\ \amp = \int_0^{2\pi}\frac{\sin^2 t+\cos^2 t}{\sin^2 t+\cos^2 t}\, dt \\ \amp = 2\pi\ne 0\text{.} \end{align*}

Example 2.3.16 shows that the implication (2.3.7) is not an equivalence. In other words, it is possible to have \(\nabla\times \boldF=\boldzero\) and yet \(\boldF\) is not a gradient vector field. However, we do get an equivalence if the domain under consideration is assumed to be nice enough: namely, connected and simply connected.

Definition 2.3.17. Simply connected sets.

A set \(D\subseteq \R^n\) is simply connected if each closed curve in \(D\) can be contracted to a point without leaving \(D\text{.}\)

As you see, depending on how nice the domain \(D\) of a vector field is, we get weaker or stronger statements about the relationship between conservative vector fields, gradient vector fields, and curl-zero vector fields. We summarize this with some logical housekeeping.

Example 2.3.20. Curl test: complete.

Let \(\boldF(x,y,z)=\angvec{y, z\cos(yz)+x, y\cos(yz)}\text{.}\) Decide whether \(\boldF\) is a gradient vector field. If yes, find a potential function for \(\boldF\text{.}\)

Solution.

It is straightforward, if somewhat tiresome, to show \(\nabla\times \boldF=\angvec{0,0,0}\text{.}\) Since the domain of \(\boldF\) is \(\R^3\text{,}\) which is connected and simply connected, we conclude from Theorem 2.3.11 that \(\boldF\) is a gradient vector field. Let \(f\) be a potential function for \(\boldF\text{.}\)

\begin{align*} f_x=y \amp\implies f=xy+G(y,z) \ \text{ for some } G(y,z) \\ f_y=x+z\cos (yz)\amp\implies x+\partial G(y,z)/\partial y y=x+z\cos(yz)\amp \text{(by partial formula above)}\\ \amp \implies \partial/\partial y (G(y,z))=z\cos(yz)\\ \amp \implies G(y,z)=\sin(yz)+H(z) \text{ for some } H(z)\\ \amp \implies f(x,y,z)=xy+\sin(yz)+H(z) \text{ for some } H(z)\text{.} \end{align*}

Looking at the partial formula for \(f\) in our last line, we observe that setting \(H(z)=0\) results in the function \(f(x,y,z)=xy+\sin(yz)\text{,}\) which satisfies \(\nabla f=\boldF\text{.}\)

Sage allows us to easily compute the curl of vector fields. Below we compute the curl of the vector field from Example 2.3.20. The command vector in the cell below turns our symbolic list into a vector object.

The same command works for vector fields of dimension 2: for \(\boldF=\angvec{F_1,F_2}\text{,}\) the curl method returns \(\partial F_2/\partial x-\partial F_1/\partial y\text{.}\)