Skip to content

How to tell if a vector field is conservative

6 min read

Short answer

A vector field F\mathbf F is conservative if F=∇f\mathbf F=\nabla f for some potential function ff. For F=(P,Q)\mathbf F=(P,Q) on a simply connected domain, test with ∂P∂y=∂Q∂x\dfrac{\partial P}{\partial y}=\dfrac{\partial Q}{\partial x} (in 3D, curl⁡F=0\operatorname{curl}\mathbf F=\mathbf 0). Then ∫CF⋅dr=f(end)−f(start)\int_C\mathbf F\cdot d\mathbf r=f(\text{end})-f(\text{start}), independent of the path.

Conservative compared with Not conservativeConservativeF = ∇fP_y = Q_xPath independentClosed loop gives 0Example: (2xy, x²)Not conservativeNo potential fP_y ≠ Q_xDepends on the pathLoop can be nonzeroExample: (−y, x)
The cross-partial test is a quick yes/no. A passing test plus a simply connected domain guarantees a potential function exists.

Finding the potential function

Integrate PP with respect to xx to get f=∫P dx+g(y)f=\int P\,dx+g(y). Differentiate with respect to yy and match with QQ to solve for g′(y)g'(y), then integrate. Check that ∇f=F\nabla f=\mathbf F.

The caveat about domains

The test Py=QxP_y=Q_x proves conservative only on a simply connected domain (no holes). The field (−yx2+y2,xx2+y2)\left(\dfrac{-y}{x^2+y^2},\dfrac{x}{x^2+y^2}\right) passes the test everywhere it is defined but is not conservative on the punctured plane, because its circulation around the origin is 2π2\pi.

Worked example

Show F=(2xy+3, x2−2y)\mathbf F=(2xy+3,\ x^2-2y) is conservative, find ff, and evaluate the line integral from (0,0)(0,0) to (1,2)(1,2).

Py=2xP_y=2x and Qx=2xQ_x=2x. Equal, and the domain is the whole plane, so F\mathbf F is conservative.

f=∫(2xy+3) dx=x2y+3x+g(y)f=\int(2xy+3)\,dx=x^2y+3x+g(y). Then fy=x2+g′(y)f_y=x^2+g'(y) must equal x2−2yx^2-2y, so g′=−2yg'=-2y and g=−y2g=-y^2: f(x,y)=x2y+3x−y2.f(x,y)=x^2y+3x-y^2. Line integral =f(1,2)−f(0,0)=(2+3−4)−0=1=f(1,2)-f(0,0)=(2+3-4)-0=1, along any path.

Try it yourself

Find a potential function for F=(ycos⁡x+1, sin⁡x)\mathbf F=(y\cos x+1,\ \sin x).

Show the answer

Py=cos⁡x=QxP_y=\cos x=Q_x ✓. f=∫(ycos⁡x+1) dx=ysin⁡x+x+g(y)f=\int(y\cos x+1)\,dx=y\sin x+x+g(y); fy=sin⁡x+g′=sin⁡xf_y=\sin x+g'=\sin x gives g′=0g'=0. So f=ysin⁡x+xf=y\sin x+x.

Keep going with practice

Conservative fields and potential functions are explored in Vidi's Multivariable & Vector Calculus course.