Path independence and conservative fields

Push a crate up a hill along a winding trail or straight up a steep face, and gravity does exactly the same work either way — only the start and end heights matter, not the route. Some vector fields share this property and some do not, and Vector Calculus gives a precise test for telling them apart before you ever touch a line integral. A field with this property is called conservative, and once you know it is conservative you can evaluate ∫CF⃗⋅dr⃗\int_C\vec F\cdot d\vec r from two numbers — the potential at the endpoints — with no parametrization of the curve at all. This article builds the equivalence between "conservative," "curl-free," and "path-independent," shows how to construct the scalar potential ϕ\phi by successive integration, and works two examples: one field that passes the test and one that fails it. The same machinery reappears later when Stokes's theorem explains why curl-free fields on suitable domains must be conservative, so getting comfortable with the test and the construction now pays off twice over.

The core insight

A vector field is conservative exactly when it equals the gradient of some scalar potential ϕ\phi, and on a simply connected domain that is equivalent to ∇×F⃗=0\nabla\times\vec F=\mathbf 0, to path-independence of ∫CF⃗⋅dr⃗\int_C\vec F\cdot d\vec r, and to zero circulation around every closed loop.

The core idea

Definition. A vector field F⃗\vec F is conservative on a domain if it is the gradient of some scalar field ϕ\phi, its scalar potential:

F⃗=∇ϕ.\vec F = \nabla\phi.

where: F⃗=(F1,F2,F3)\vec F=(F_1,F_2,F_3) is the given field and ϕ\phi is a scalar function with ∂ϕ/∂x=F1\partial\phi/\partial x=F_1, ∂ϕ/∂y=F2\partial\phi/\partial y=F_2, ∂ϕ/∂z=F3\partial\phi/\partial z=F_3. (Some texts write F⃗=−∇ϕ\vec F=-\nabla\phi, tying the sign to potential energy — MA10002 typically uses the plain F⃗=∇ϕ\vec F=\nabla\phi form, so check which convention a problem states.)

The equivalence chain. On a simply connected domain — informally, a region with no "holes" a loop could snag on — four statements are all equivalent:

F⃗=∇ϕ ⟺ ∇×F⃗=0 ⟺ ∫CF⃗⋅dr⃗ is path-independent ⟺ ∮CF⃗⋅dr⃗=0 for every closed C.\vec F=\nabla\phi \ \Longleftrightarrow\ \nabla\times\vec F=\mathbf 0 \ \Longleftrightarrow\ \int_C\vec F\cdot d\vec r \text{ is path-independent} \ \Longleftrightarrow\ \oint_C\vec F\cdot d\vec r=0 \text{ for every closed } C.

The forward direction F⃗=∇ϕ⇒∇×F⃗=0\vec F=\nabla\phi\Rightarrow\nabla\times\vec F=\mathbf 0 is just the identity ∇×(∇ϕ)=0\nabla\times(\nabla\phi)=\mathbf 0 carried over from the divergence/curl topic. The converse — curl-free implies conservative — genuinely needs the simply-connected condition, and its proof is Stokes's theorem, met next.

Why curl-free can fail without simple connectivity. On the punctured plane R2∖{(0,0)}\mathbb R^2\setminus\{(0,0)\}, the field F⃗=−y ı^+x ȷ^x2+y2\vec F=\dfrac{-y\,\hat\imath+x\,\hat\jmath}{x^2+y^2} has ∇×F⃗=0\nabla\times\vec F=\mathbf 0 everywhere it is defined, yet its integral around a loop encircling the hole is nonzero — the domain's hole is exactly what breaks the converse.

Finding ϕ\phi from F⃗\vec F. Once ∇×F⃗=0\nabla\times\vec F=\mathbf 0 is confirmed, integrate ∂ϕ/∂x=F1\partial\phi/\partial x=F_1 with respect to xx, treating the "constant" of integration as an unknown function g(y,z)g(y,z) of the other variables. Differentiate that result with respect to yy and match against F2F_2 to pin down gg; if a third variable is present, bring in F3F_3 the same way. The picture below shows why the endpoint-only rule works: any two paths between AA and BB can be combined into one closed loop, and a conservative field gives zero circulation around it, so the two paths must contribute equal integrals.

Figure
Two different paths from point A to point B combine into one closed loop with zero net circulation because the field is conservative
Path independence: two routes, one loop, zero circulation A B path C1 path C2 Integral along C1 equals integral along C2, since C1 minus C2 is a closed loop with zero circulation
Derivation AFinding a potential and evaluating a line integral without parametrizing

The goal is to show that F⃗(x,y)=(2xy+3) ı^+(x2−4y) ȷ^\vec F(x,y)=(2xy+3)\,\hat\imath+(x^2-4y)\,\hat\jmath is conservative, to construct its scalar potential ϕ\phi by successive integration and matching, and then to use ϕ\phi alone — no parametrized curve, no direct line-integral computation — to evaluate ∫CF⃗⋅dr⃗\int_C\vec F\cdot d\vec r for any path CC running from (0,0)(0,0) to (1,2)(1,2).

Step 1. Test whether F⃗\vec F is curl-free. In two dimensions the relevant curl condition reduces to ∂F2/∂x=∂F1/∂y\partial F_2/\partial x=\partial F_1/\partial y (the zz-component of ∇×F⃗\nabla\times\vec F). Here ∂F1/∂y=2x\partial F_1/\partial y=2x and ∂F2/∂x=2x\partial F_2/\partial x=2x; these match identically, and since R2\mathbb R^2 is simply connected, F⃗\vec F is conservative.

Step 2. Build ϕ\phi by integrating F1F_1 with respect to xx, holding yy fixed:

ϕ=∫(2xy+3) dx=x2y+3x+g(y),\phi=\int(2xy+3)\,dx=x^2y+3x+g(y),

where g(y)g(y) is an unknown function of yy alone — it plays the role of the "constant" of integration with respect to xx, but it can still depend on the variable that was held fixed.

Step 3. Differentiate this trial ϕ\phi with respect to yy and match against F2F_2 to solve for gg:

∂ϕ∂y=x2+g′(y)F2=x2−4y ⇒ g′(y)=−4y ⇒ g(y)=−2y2+C.\frac{\partial\phi}{\partial y}=x^2+g'(y)\stackrel{!}{=}F_2=x^2-4y \ \Rightarrow\ g'(y)=-4y \ \Rightarrow\ g(y)=-2y^2+C.

Taking C=0C=0 (any constant works, since only differences of ϕ\phi matter), the potential is ϕ(x,y)=x2y+3x−2y2\phi(x,y)=x^2y+3x-2y^2.

Step 4. Apply the fundamental theorem for line integrals, ∫CF⃗⋅dr⃗=ϕ(B)−ϕ(A)\int_C\vec F\cdot d\vec r=\phi(B)-\phi(A), with A=(0,0)A=(0,0) and B=(1,2)B=(1,2):

∫CF⃗⋅dr⃗=ϕ(1,2)−ϕ(0,0)=[(1)(2)+3(1)−2(4)]−0=(2+3−8)−0=−3.\int_C\vec F\cdot d\vec r=\phi(1,2)-\phi(0,0)=\big[(1)(2)+3(1)-2(4)\big]-0=(2+3-8)-0=-3.

So ∫CF⃗⋅dr⃗=−3\int_C\vec F\cdot d\vec r=-3 for any path CC from (0,0)(0,0) to (1,2)(1,2) — a straight line, a spiral, a zigzag all give the same answer, because only the endpoint values of ϕ\phi enter.

Worked example

Problem. Determine whether F⃗(x,y,z)=yz ı^+xz ȷ^+xy2 k^\vec F(x,y,z)=yz\,\hat\imath+xz\,\hat\jmath+xy^2\,\hat k is conservative on R3\mathbb R^3, and contrast it with the closely related field obtained by replacing xy2xy^2 with xyxy.

Step 1. Compute the ı^\hat\imath-component of ∇×F⃗\nabla\times\vec F for F1=yzF_1=yz, F2=xzF_2=xz, F3=xy2F_3=xy^2:

∂F3∂y−∂F2∂z=2xy−x=x(2y−1).\frac{\partial F_3}{\partial y}-\frac{\partial F_2}{\partial z}=2xy-x=x(2y-1).

Step 2. This expression is not identically zero — at (1,0,0)(1,0,0) it equals −1≠0-1\ne 0 — so F⃗\vec F fails the curl test at that very first component, and there is no need to check the other two.

Step 3. Conclusion: F⃗\vec F is not conservative on R3\mathbb R^3; no scalar potential ϕ\phi exists for it, and ∫CF⃗⋅dr⃗\int_C\vec F\cdot d\vec r generally depends on which path CC is taken.

Step 4. Now change only the last component from xy2xy^2 to xyxy, giving G⃗=yz ı^+xz ȷ^+xy k^\vec G=yz\,\hat\imath+xz\,\hat\jmath+xy\,\hat k. Repeating Step 1, ∂G3/∂y−∂G2/∂z=x−x=0\partial G_3/\partial y-\partial G_2/\partial z=x-x=0, and the remaining two curl components vanish identically as well (they can be checked the same way). So G⃗\vec G is conservative, with potential ϕ=xyz\phi=xyz — a direct check gives ∇(xyz)=(yz,xz,xy)=G⃗\nabla(xyz)=(yz,xz,xy)=\vec G. The exponent on yy in the third component was the entire difference between a conservative and a non-conservative field here.

Common traps

  • Declaring a field conservative because it "looks nice" or is a low-degree polynomial — always run the explicit curl test (or, in 2D, the mixed-partial equality) before claiming anything.
  • Quoting "curl-free implies conservative" without the simply-connected caveat; it fails on domains with holes, such as the plane minus the origin.
  • Forgetting that the "constant" produced after integrating F1F_1 with respect to xx is really an unknown function g(y,z)g(y,z) of the other variables, not a true constant — dropping it loses solutions.
  • Applying ϕ(B)−ϕ(A)\phi(B)-\phi(A) to a field that has not yet been verified conservative; the fundamental theorem for line integrals only holds once F⃗=∇ϕ\vec F=\nabla\phi is established.

Ask the tutor: Want to work through constructing a potential for a trickier 3D field, or see exactly how the punctured-plane example breaks the curl-free-implies-conservative direction?

Why does simply connected matter so much for the curl test

Because "curl-free implies conservative" is proved using Stokes's theorem, which needs a surface bounded by the loop that lies entirely inside the domain. On a domain with a hole, a loop around that hole cannot be spanned by such a surface, so the proof breaks down — and indeed the classic example F⃗=(−y,x)/(x2+y2)\vec F=(-y,x)/(x^2+y^2) on the punctured plane is curl-free everywhere it is defined but not conservative. On a hole-free domain this failure cannot happen, so curl-free and conservative become equivalent.

Do I always have to check the curl before finding a potential

Yes, in the sense that if you skip the check and blindly try to integrate F1 with respect to x, then differentiate and match against F2, the matching step will simply fail to produce a consistent g of y alone whenever the field is not conservative — you will find that g prime depends on x, which is impossible for a function of y only. So the curl test and the matching process are two views of the same underlying consistency requirement; checking curl first just catches the failure earlier and more cleanly.

What changes in 3D compared with the 2D mixed-partial test

In 2D, one equality, partial F2 by partial x equals partial F1 by partial y, is the whole curl test, because the only nonzero component of the curl is the z-component. In 3D you must check all three components of nabla cross F, corresponding to three pairs of mixed partials, and if even one component is nonzero anywhere in the domain, the field fails to be conservative there. Constructing the potential also gains a step: after matching F1 and F2 to fix g of y and z, you differentiate with respect to z and match against F3 to fix the remaining unknown function of z alone.

Before this

Where this leads