Math Insight

How to determine if a vector field is conservative

A conservative vector field (also called a path-independent vector field) is a vector field $\dlvf$ whose line integral $\dlint$ over any curve $\dlc$ depends only on the endpoints of $\dlc$. The integral is independent of the path that $\dlc$ takes going from its starting point to its ending point. The below applet illustrates the two-dimensional conservative vector field $\dlvf(x,y)=(x,y)$.

Applet: The line integral over multiple paths of a conservative vector field

The Java applet did not load, and the above is only a static image representing one view of the applet. The applet was created with LiveGraphics3D. The applet is not loading because it looks like you do not have Java installed. You can click here to get Java.

Applet: The line integral over multiple paths of a conservative vector field

The line integral over multiple paths of a conservative vector field. The integral of conservative vector field $\dlvf(x,y)=(x,y)$ from $\vc{a}=(3,-3)$ (cyan square) to $\vc{b}=(2,4)$ (magenta square) doesn't depend on the path. Path $\dlc$ (shown in blue) is a straight line path from $\vc{a}$ to $\vc{b}$. Paths $\adlc$ (in green) and $\sadlc$ (in red) are curvy paths, but they still start at $\vc{a}$ and end at $\vc{b}$. Each path has a colored point on it that you can drag along the path. The corresponding colored lines on the slider indicate the line integral along each curve, starting at the point $\vc{a}$ and ending at the movable point. Moving each point up to $\vc{b}$ gives the total integral along the path, so the corresponding colored line on the slider reaches 1 (the magenta line on the slider). This demonstrates that the integral is 1 independent of the path.

More information about applet.

What are some ways to determine if a vector field is conservative? Directly checking to see if a line integral doesn't depend on the path is obviously impossible, as you would have to check an infinite number of paths between any pair of points. But, if you found two paths that gave different values of the integral, you could conclude the vector field was path-dependent.

Here are some options that could be useful under different circumstances.

  1. As mentioned in the context of the gradient theorem, a vector field $\dlvf$ is conservative if and only if it has a potential function $f$ with $\dlvf = \nabla f$. Therefore, if you are given a potential function $f$ or if you can find one, and that potential function is defined everywhere, then there is nothing more to do. You know that $\dlvf$ is a conservative vector field, and you don't need to worry about the other tests we mention here. Similarly, if you can demonstrate that it is impossible to find a function $f$ that satisfies $\dlvf = \nabla f$, then you can likewise conclude that $\dlvf$ is non-conservative, or path-dependent.

    For this reason, you could skip this discussion about testing for path-dependence and go directly to the procedure for finding the potential function. If this procedure works or if it breaks down, you've found your answer as to whether or not $\dlvf$ is conservative. However, if you are like many of us and are prone to make a mistake or two in a multi-step procedure, you'd probably benefit from other tests that could quickly determine path-independence. That way, you could avoid looking for a potential function when it doesn't exist and benefit from tests that confirm your calculations.

  2. Another possible test involves the link between path-independence and circulation. One can show that a conservative vector field $\dlvf$ will have no circulation around any closed curve $\dlc$, meaning that its integral $\dlint$ around $\dlc$ must be zero. If you could somehow show that $\dlint=0$ for every closed curve (difficult since there are an infinite number of these), then you could conclude that $\dlvf$ is conservative. Or, if you can find one closed curve where the integral is non-zero, then you've shown that it is path-dependent.

    Although checking for circulation may not be a practical test for path-independence, the fact that path-independence implies no circulation around any closed curve is a central to what it means for a vector field to be conservative.

  3. If $\dlvf$ is a three-dimensional vector field, $\dlvf : \R^3 \to \R^3$ (confused?), then we can derive another condition. This condition is based on the fact that a vector field $\dlvf$ is conservative if and only if $\dlvf = \nabla f$ for some potential function. We can calculate that the curl of a gradient is zero, $\curl \nabla f = \vc{0}$, for any twice continuously differentiable $f : \R^3 \to \R$. Therefore, if $\dlvf$ is conservative, then its curl must be zero, as $\curl \dlvf = \curl \nabla f = \vc{0}$.

    For a continuously differentiable two-dimensional vector field, $\dlvf : \R^2 \to \R^2$, we can similarly conclude that if the vector field is conservative, then the scalar curl must be zero, $$ \pdiff{\dlvfc_2}{x}-\pdiff{\dlvfc_1}{y} = \frac{\partial f^2}{\partial x \partial y} -\frac{\partial f^2}{\partial y \partial x} =0.$$

    We have to be careful here. The valid statement is that if $\dlvf$ is conservative, then its curl must be zero. Without additional conditions on the vector field, the converse may not be true, so we cannot conclude that $\dlvf$ is conservative just from its curl being zero. There are path-dependent vector fields with zero curl. On the other hand, we can conclude that if the curl of $\dlvf$ is non-zero, then $\dlvf$ must be path-dependent.

  4. Can we obtain another test that allows us to determine for sure that a vector field is conservative? We can by linking the previous two tests (tests 2 and 3). Test 2 states that the lack of “macroscopic circulation” is sufficient to determine path-independence, but the problem is that lack of circulation around any closed curve is difficult to check directly. Test 3 says that a conservative vector field has no “microscopic circulation” as captured by the curl. It's easy to test for lack of curl, but the problem is that lack of curl is not sufficient to determine path-independence.

    What we need way to link the definite test of zero “macroscopic circulation” with the easy-to-check test of zero “microscopic circulation.” This link is exactly what both Green's theorem and Stokes' theorem provide. Don't worry if you haven't learned both these theorems yet. The basic idea is simple enough: the “macroscopic circulation” around a closed curve is equal to the total “microscopic circulation” in the planar region inside the curve (for two dimensions, Green's theorem) or in a surface whose boundary is the curve (for three dimensions, Stokes' theorem).

    Let's examine the case of a two-dimensional vector field whose scalar curl $\pdiff{\dlvfc_2}{x}-\pdiff{\dlvfc_1}{y}$ is zero. If we have a closed curve $\dlc$ where $\dlvf$ is defined everywhere inside it, then we can apply Green's theorem to conclude that the “macroscopic circulation” $\dlint$ around $\dlc$ is equal to the total “microscopic circulation” inside $\dlc$. We can indeed conclude that the “macroscopic circulation” is zero from the fact that the “microscopic circulation” $\pdiff{\dlvfc_2}{x}-\pdiff{\dlvfc_1}{y}$ is zero everywhere inside $\dlc$.

    Macroscopic and microscopic circulation

    According to test 2, to conclude that $\dlvf$ is conservative, we need $\dlint$ to be zero around every closed curve $\dlc$. If the vector field is defined inside every closed curve $\dlc$ and the “microscopic circulation” is zero everywhere inside each curve, then Green's theorem gives us exactly that condition. We can conclude that $\dlint=0$ around every closed curve and the vector field is conservative.

    The only way we could run into trouble is if there are some closed curves $\dlc$ where $\dlvf$ is not defined for some points inside the curve. In other words, if the region where $\dlvf$ is defined has some holes in it, then we cannot apply Green's theorem for every closed curve $\dlc$. In this case, we cannot be certain that zero “microscopic circulation” implies zero “macroscopic circulation” and hence path-independence. Such a hole in the domain of definition of $\dlvf$ was exactly what caused in the problem in our counterexample of a path-dependent field with zero curl.

    On the other hand, we know we are safe if the region where $\dlvf$ is defined is simply connected, i.e., the region has no holes through it. In this case, we know $\dlvf$ is defined inside every closed curve $\dlc$ and nothing tricky can happen. We can summarize our test for path-dependence of two-dimensional vector fields as follows.

    If a vector field $\dlvf: \R^2 \to \R^2$ is continuously differentiable in a simply connected domain $\dlr \in \R^2$ and its curl is zero, i.e., $$\pdiff{\dlvfc_2}{x}-\pdiff{\dlvfc_1}{y}=0,$$ everywhere in $\dlr$, then $\dlvf$ is conservative within the domain $\dlr$.

    It turns out the result for three-dimensions is essentially the same. If a vector field $\dlvf: \R^3 \to \R^3$ is continuously differentiable in a simply connected domain $\dlv \in \R^3$ and its curl is zero, i.e., $\curl \dlvf = \vc{0}$, everywhere in $\dlv$, then $\dlvf$ is conservative within the domain $\dlv$.

    One subtle difference between two and three dimensions is what it means for a region to be simply connected. Any hole in a two-dimensional domain is enough to make it non-simply connected. But, in three-dimensions, a simply-connected domain can have a hole in the center, as long as the hole doesn't go all the way through the domain, as illustrated in this figure.

    Simply connected three-dimensional domains

    The reason a hole in the center of a domain is not a problem in three dimensions is that we have more room to move around in 3D. If we have a curl-free vector field $\dlvf$ (i.e., with no “microscopic circulation”), we can use Stokes' theorem to infer the absence of “macroscopic circulation” around any closed curve $\dlc$. To use Stokes' theorem, we just need to find a surface whose boundary is $\dlc$. If the domain of $\dlvf$ is simply connected, even if it has a hole that doesn't go all the way through the domain, we can always find such a surface. The surface can just go around any hole that's in the middle of the domain. With such a surface along which $\curl \dlvf=\vc{0}$, we can use Stokes' theorem to show that the circulation $\dlint$ around $\dlc$ is zero. Since we can do this for any closed curve, we can conclude that $\dlvf$ is conservative.

    The flexiblity we have in three dimensions to find multiple surfaces whose boundary is a given closed curve is illustrated in this applet that we use to introduce Stokes' theorem.

    Applet: Macroscopic and microscopic circulation in three dimensions

    The Java applet did not load, and the above is only a static image representing one view of the applet. The applet was created with LiveGraphics3D. The applet is not loading because it looks like you do not have Java installed. You can click here to get Java.

    Applet: Macroscopic and microscopic circulation in three dimensions

    Macroscopic and microscopic circulation in three dimensions. The relationship between the macroscopic circulation of a vector field $\dlvf$ around a curve and the microscopic circulation of $\dlvf$ (illustrated by small green circles) along a surface in three dimensions must hold for any surface whose boundary is the curve. No matter which surface you choose (change by dragging the blue point on the slider), the total microscopic circulation of $\dlvf$ along the surface must equal the circulation of $\dlvf$ around the curve, as long as the vector field $\dlvf$ is defined everywhere on the surface.

    More information about applet.

    Of course, if the region $\dlv$ is not simply connected, but has a hole going all the way through it, then $\curl \dlvf = \vc{0}$ is not a sufficient condition for path-independence. In this case, if $\dlc$ is a curve that goes around the hole, then we cannot find a surface that stays inside that domain whose boundary is $\dlc$. Without such a surface, we cannot use Stokes' theorem to conclude that the circulation around $\dlc$ is zero.