Calculus 3 • Vector Fields & Line/Surface Integrals

Conservative Fields & Potentials — Conservative Vector Fields and Potential Functions

Understanding when line integrals depend only on endpoints, and how to recover the scalar potential that encodes the entire field.

Three-dimensional axes with spatial movement and a multivariable function.
Inside this lesson 10 sections 5 questions 8 figures

SECTION 1

Historical Context & Motivation

The concept of a conservative vector field arose from one of the deepest questions in classical mechanics: when does the work done by a force depend only on where an object starts and ends, rather than on the particular path it takes? Physicists in the eighteenth and nineteenth centuries realized that gravitational and electrostatic forces share this remarkable property, and mathematicians sought the formal conditions that guarantee it. The interplay between physics and pure analysis produced the theoretical apparatus we still use today — the gradient, the curl, and the notion of a potential function whose partial derivatives reconstruct the entire vector field.

1687 • Newton's Principia

Isaac Newton formulated the inverse-square law of gravitation. Although he did not use vector-field language, his work implied that gravitational work is path-independent — the seed of the conservative-field idea.

1788 • Lagrange's Mécanique Analytique

Joseph-Louis Lagrange reformulated mechanics using scalar energy functions, introducing what we now call the potential energy and showing that forces derivable from such a function conserve total energy.

1828 • Green's Essay

George Green introduced the concept of a potential function for electrostatics and proved integral identities that link volume integrals to boundary integrals — precursors of Stokes' theorem.

1850s • Stokes & Kelvin Formalize Curl

George Gabriel Stokes and Lord Kelvin established the curl operator and Stokes' theorem, providing the definitive criterion: a smooth vector field on a simply connected domain is conservative if and only if its curl vanishes everywhere.

The central question this lesson addresses is therefore: given a vector field F, how do we decide whether a scalar function f exists such that F = ∇f, and if it does, how do we construct it? Answering this question simplifies line-integral evaluation from a difficult parametric computation to a trivial subtraction f(B) − f(A).

SECTION 2

Core Principles & Definitions

A vector field F defined on an open region D in ℝ² or ℝ³ is called conservative if there exists a scalar function f : D → ℝ, called a potential function, such that F = ∇f throughout D. The following foundational ideas underpin everything that follows.

1

Path Independence

For a conservative field, the line integral ∫C F · dr depends only on the endpoints of C, not on the curve itself. Any two paths sharing the same endpoints yield the same integral.
2

Vanishing Circulation

Equivalently, the circulation around every closed curve in D is zero: ∮C F · dr = 0. This is the closed-loop test for conservativity.
3

Curl-Free Condition

If F is continuously differentiable on a simply connected domain, then F is conservative if and only if curl F = 0. In 2-D, this reduces to ∂P/∂y = ∂Q/∂x.
4

Fundamental Theorem for Line Integrals

When F = ∇f, the line integral evaluates as ∫C F · dr = f(B) − f(A), where A and B are the start and end points — directly analogous to the single-variable FTC.
5

Simply Connected Domains

The domain must have no holes: every simple closed curve in D can be continuously shrunk to a point. On domains with holes, a curl-free field may fail to be conservative (e.g., the classic angular field around the origin).
✦

KEY TAKEAWAY

Think of a conservative vector field like the slope of a landscape. Imagine hiking across hilly terrain: the net change in your elevation depends only on your starting altitude and finishing altitude, not on whether you took the winding scenic route or the direct ridge trail. The potential function is the elevation map, and the vector field is the collection of steepest-descent arrows at every point. Whenever such an elevation map exists, the work done by gravity depends only on the height difference — that is path independence.

SECTION 3

Visual Explanation — Conservative vs. Non-Conservative Fields

The diagram below places two vector fields side by side. On the left, a conservative field whose arrows radiate outward from the origin — this is the gradient of f(x, y) = ½(x² + y²). On the right, a non-conservative (rotational) field whose arrows circulate around the origin. Two different paths connecting the same pair of endpoints are shown in each panel. In the conservative field the line integrals along both paths are equal; in the rotational field they differ.

Conservative Field: F = ∇fNon-Conservative (Rotational)ABPath 1Path 2∫₁ F·dr = ∫₂ F·dr = f(B)−f(A)ABPath 1Path 2∫₁ F·dr ≠ ∫₂ F·dr
Left panel: a conservative (gradient) field with two paths from A to B — both paths yield the same line integral. Right panel: a rotational field where the two paths produce different line integrals. The cyan arrows represent the conservative field, while the pink arrows show the rotational field.

The left panel captures the essence of conservativity: no matter how you travel from A to B, the integral accumulates the same net value because the field is the gradient of a single scalar function f, and the integral telescopes to f(B) − f(A). The right panel shows that rotational fields inject a net 'swirl' that makes the integral path-dependent. The curl operator detects exactly this swirl; when curl F = 0 on a simply connected domain, the field admits no rotation and a potential function must exist.

SECTION 4

Mathematical Framework

We now formalize the definitions and state the key theorems that connect gradients, curls, and line integrals. Throughout, let D ⊆ ℝⁿ be an open connected region, and let F be a continuously differentiable vector field on D.

GRADIENT CONDITION (DEFINITION)

F(x,y,z)=∇f=(∂f/∂x)i+(∂f/∂y)j+(∂f/∂z)kF(x, y, z) = ∇f = (∂f/∂x) i + (∂f/∂y) j + (∂f/∂z) k

A field F = ⟨P, Q, R⟩ is conservative if there exists a scalar function f (the potential function) such that P = ∂f/∂x, Q = ∂f/∂y, and R = ∂f/∂z. The potential is unique up to an additive constant.

FUNDAMENTAL THEOREM FOR LINE INTEGRALS

∫CF⋅dr=f(r(b))−f(r(a))∫_C F · dr = f(r(b)) − f(r(a))

If F = ∇f and C is any smooth curve from point A = r(a) to point B = r(b) lying in D, then the line integral equals the difference in potential values at the endpoints. This is the multi-variable analogue of the single-variable Fundamental Theorem of Calculus.

CURL TEST (3-D)

curlF=∇×F=(∂R/∂y−∂Q/∂z)i+(∂P/∂z−∂R/∂x)j+(∂Q/∂x−∂P/∂y)k=0curl F = ∇ × F = (∂R/∂y − ∂Q/∂z) i + (∂P/∂z − ∂R/∂x) j + (∂Q/∂x − ∂P/∂y) k = 0

On a simply connected domain, curl F = 0 everywhere is both necessary and sufficient for F to be conservative. In two dimensions this simplifies to the single equation ∂Q/∂x = ∂P/∂y.

CLOSED-LOOP CRITERION

∮CF⋅dr=0foreveryclosedcurveCinD∮_C F · dr = 0 for every closed curve C in D

This is logically equivalent to path independence. By Stokes' theorem, the circulation around a closed curve equals the flux of curl F through any surface bounded by the curve; if curl F = 0, every such flux — and hence every circulation — vanishes.

⚠

Topology Matters

The curl test can fail on domains with holes. The classic counter-example is F = ⟨−y/(x² + y²), x/(x² + y²)⟩ defined on ℝ² \ {(0,0)}. One can verify that ∂Q/∂x = ∂P/∂y everywhere in the domain, yet ∮ F · dr = 2π around any circle enclosing the origin. The domain is not simply connected, so the curl test's sufficiency clause does not apply.

SECTION 5

Finding the Potential Function — Step-by-Step Method

Once we have established that a field F = ⟨P, Q, R⟩ is conservative (e.g., by verifying curl F = 0 on a simply connected domain), the next task is to reconstruct the potential function f. The standard technique exploits the three partial-derivative equations P = fx, Q = fy, R = fz sequentially. The algorithm works in both two and three dimensions and is detailed in the diagram below.

Algorithm: Recovering f from F = ⟨P, Q, R⟩Step 1: Integrate P with respect to xf(x,y,z) = ∫ P dx + g(y,z)Step 2: Differentiate result w.r.t. y∂f/∂y = (known) + g'(y,z) = Q⟹ solve for g'(y,z), then integrateStep 3: g(y,z) = ∫ g'(y,z) dy + h(z)Substitute back into ff = (result from Step 1) with g foundStep 4: Differentiate w.r.t. z, set = R∂f/∂z = (known) + h'(z) = R⟹ solve for h(z) by integrationResult: f(x,y,z) + CPotential function recovered ✓1234✦
Flowchart for recovering the potential function f from a conservative field F = ⟨P, Q, R⟩. Each integration step introduces an unknown function of the remaining variables, which is pinned down in the subsequent step by matching the next component of F.

In two dimensions the algorithm terminates one step earlier because there is no z-variable: integrate P with respect to x, differentiate with respect to y, match to Q to find the unknown function g(y), and you are done. The key insight at every stage is that the integration constant with respect to one variable is actually an arbitrary function of the remaining variables, and the next partial-derivative match eliminates that freedom.

SECTION 6

Worked Example

Consider the vector field F = ⟨2xy + z², x² + 2yz, 2xz + y²⟩. We will verify that F is conservative, find its potential function, and then evaluate the line integral of F along any path from (0, 0, 0) to (1, 1, 1).

Finding the Potential and Evaluating a Line Integral

  1. 1

    Step 1 — Verify the Curl-Free Condition

    We compute each component of curl F = ∇ × F. First, (∂R/∂y − ∂Q/∂z) = ∂(2xz + y²)/∂y − ∂(x² + 2yz)/∂z = 2y − 2y = 0. Second, (∂P/∂z − ∂R/∂x) = ∂(2xy + z²)/∂z − ∂(2xz + y²)/∂x = 2z − 2z = 0. Third, (∂Q/∂x − ∂P/∂y) = ∂(x² + 2yz)/∂x − ∂(2xy + z²)/∂y = 2x − 2x = 0.
    curl F = ⟨0, 0, 0⟩. Since the domain is all of ℝ³ (simply connected), F is conservative.
  2. 2

    Step 2 — Integrate P = 2xy + z² with Respect to x

    We need f such that fx = 2xy + z². Integrating with respect to x (treating y and z as constants): f(x, y, z) = x²y + xz² + g(y, z), where g(y, z) is an unknown function.
    f = x²y + xz² + g(y, z)
  3. 3

    Step 3 — Determine g(y, z) Using Q = x² + 2yz

    Differentiate f with respect to y: fy = x² + gy(y, z). Setting this equal to Q = x² + 2yz gives gy = 2yz. Integrate with respect to y: g(y, z) = y²z + h(z).
    f = x²y + xz² + y²z + h(z)
  4. 4

    Step 4 — Determine h(z) Using R = 2xz + y²

    Differentiate f with respect to z: fz = 2xz + y² + h′(z). Setting this equal to R = 2xz + y² gives h′(z) = 0, so h(z) = C (a constant). We may choose C = 0.
    f(x, y, z) = x²y + xz² + y²z
  5. 5

    Step 5 — Evaluate the Line Integral via the FTC for Line Integrals

    By the Fundamental Theorem for Line Integrals, ∫C F · dr = f(1, 1, 1) − f(0, 0, 0) = (1·1 + 1·1 + 1·1) − 0 = 3. No parametrization of the path is needed.
    ∫_C F · dr = 3

SECTION 7

Equivalent Conditions & Common Pitfalls

Several characterizations of conservative fields are logically equivalent, but each is useful in different contexts. The table below collects the main conditions and contrasts them with the situations where they break down.

ConditionWhen to UseWatch Out For
F = ∇f (existence of potential)Direct definition; use when you can explicitly construct f by sequential integration.Integration technique requires careful bookkeeping of which variables are held constant.
curl F = 0 (irrotational)Quick screening test — compute mixed partials. Sufficient on simply connected domains.Fails as a sufficient condition on domains with holes (e.g., ℝ² \ {0}).
∮ F · dr = 0 (zero circulation)Conceptual understanding; ties directly to energy conservation in physics.Must hold for every closed curve in the domain, not just a few test curves.
Path independenceUseful for theoretical arguments and for evaluating line integrals by choosing the simplest path.Hard to verify directly; usually established via one of the other conditions.

Equivalent characterizations of conservative vector fields and their practical caveats.

✦

KEY TAKEAWAY

These four conditions — gradient existence, curl-free, zero circulation, and path independence — are four windows into the same room. In practice, the curl test is the fastest diagnostic, but always verify the simply connected domain hypothesis first. Think of it like checking whether a road system has no one-way loops: if the network is fully connected with no hidden roundabouts (holes), then the absence of local rotation (curl = 0) guarantees global path independence.

SECTION 8

Connections to Stokes' Theorem and Differential Forms

Conservative fields sit at the foundation of a much larger edifice in vector calculus and differential geometry. Understanding how the ideas of this lesson connect to more advanced topics provides both motivation for further study and deeper insight into why the curl test works.

This LessonAdvanced Extension
F = ∇f (potential function)The 1-form ω = P dx + Q dy + R dz is exact: ω = df. The potential function f is the 0-form whose exterior derivative is ω.
curl F = 0 (necessary condition)The 1-form ω is closed: dω = 0. By the Poincaré lemma, every closed form on a contractible domain is exact — hence the simply-connected requirement.
∮ F · dr = 0 for closed curvesStokes' theorem: ∮_C F · dr = ∬_S (∇ × F) · dS. If curl F = 0, every surface integral vanishes, giving zero circulation.
Domain with holes breaks sufficiencyDe Rham cohomology: the first cohomology group H¹(D) measures how many 'independent holes' the domain has, quantifying the gap between closed and exact forms.

How conservative-field concepts generalize in advanced mathematics.

The language of differential forms may seem abstract, but it unifies Green's theorem, Stokes' theorem, and the Divergence theorem into a single statement: ∫∂Ω ω = ∫Ω dω. The conservative-field story is the simplest instance of this grand generalization: choosing ω = df and Ω = a curve C gives the Fundamental Theorem for Line Integrals directly.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

A vector field F is defined on all of ℝ² and satisfies ∮C F · dr = 0 for every circle C centered at the origin. Does this guarantee that F is conservative? Explain why or why not.
Show answer
No, this does not guarantee conservativity. The zero-circulation condition must hold for every closed curve in the domain, not just for circles centered at the origin. A field could have zero circulation around origin-centered circles while having nonzero circulation around other closed curves (for instance, rectangles or off-center loops). To conclude conservativity, one must verify that ∮ F · dr = 0 for all simple closed curves, or equivalently verify that curl F = 0 on the simply connected domain.

Question 2: BASIC CALCULATION

Determine whether F = ⟨3x²y + y³, x³ + 3xy² + 1⟩ is conservative. If so, find its potential function f(x, y).
Show answer
Compute ∂P/∂y = 3x² + 3y² and ∂Q/∂x = 3x² + 3y². Since these are equal on all of ℝ² (simply connected), F is conservative. Integrate P with respect to x: f = x³y + xy³ + g(y). Differentiate with respect to y: fy = x³ + 3xy² + g′(y). Set equal to Q = x³ + 3xy² + 1, giving g′(y) = 1, so g(y) = y + C. Therefore f(x, y) = x³y + xy³ + y + C.

Question 3: INTERMEDIATE

Let F = ⟨yexy + 2x, xexy − 3y²⟩. Show that F is conservative, find its potential, and evaluate ∫C F · dr from (0, 1) to (2, 0) along any smooth path.
Show answer
Check: ∂P/∂y = exy + xyexy and ∂Q/∂x = exy + xyexy; they are equal on ℝ², so F is conservative. Integrate P with respect to x: f = exy + x² + g(y). Differentiate w.r.t. y: fyf_y = xexy + g′(y) = xexy − 3y², so g′(y) = −3y² and g(y) = −y³. Thus f = exy + x² − y³. Evaluate: f(2,0) − f(0,1) = (1 + 4 − 0) − (1 + 0 − 1) = 5 − 0 = 5.

Question 4: APPLIED

A force field in 3-D is given by F = ⟨yz + 1, xz + 2y, xy + 3z²⟩. A particle travels from A = (1, 0, 0) to B = (0, 1, 2) along a helix parametrized by r(t) = ⟨cos t, sin t, 2t/π⟩ for 0 ≤ t ≤ π/2. Without parametrizing the integral, compute the work done by F on the particle.
Show answer
First verify conservativity: ∂P/∂y = z, ∂Q/∂x = z ✓; ∂P/∂z = y, ∂R/∂x = y ✓; ∂Q/∂z = x, ∂R/∂y = x ✓. So curl F = 0 on ℝ³. Find f: integrate P = yz + 1 w.r.t. x to get f = xyz + x + g(y,z). Then fyf_y = xz + gyg_y = xz + 2y gives gyg_y = 2y, so g = y² + h(z). Then fzf_z = xy + h′(z) = xy + 3z² gives h′(z) = 3z², so h = z³. Thus f = xyz + x + y² + z³. Work = f(0,1,2) − f(1,0,0) = (0 + 0 + 1 + 8) − (0 + 1 + 0 + 0) = 9 − 1 = 8.

Question 5: CRITICAL THINKING

Let F = ⟨−y/(x² + y²), x/(x² + y²)⟩ be defined on D = ℝ² \ {(0, 0)}. (a) Verify that ∂P/∂y = ∂Q/∂x everywhere in D. (b) Show that ∮C F · dr = 2π when C is the unit circle traversed counterclockwise. (c) Explain why parts (a) and (b) do not contradict each other.
Show answer
(a) P = −y/(x²+y²), so ∂P/∂y = (−(x²+y²) + 2y²)/(x²+y²)² = (y²−x²)/(x²+y²)². Similarly Q = x/(x²+y²), so ∂Q/∂x = ((x²+y²) − 2x²)/(x²+y²)² = (y²−x²)/(x²+y²)². They are equal. (b) Parametrize the unit circle: r(t) = ⟨cos t, sin t⟩, dr = ⟨−sin t, cos t⟩ dt. Then F(r(t)) = ⟨−sin t, cos t⟩ and F · dr/dt = sin²t + cos²t = 1. So ∮ F · dr = ∫₀²π 1 dt = 2π. (c) There is no contradiction because D = ℝ²\{0} is not simply connected — it has a hole at the origin. The theorem 'curl F = 0 implies conservative' requires the domain to be simply connected. This is the standard example showing the topological hypothesis is essential, not merely a technicality.

SUMMARY

Lesson Summary

Summary

A conservative vector field is one that can be written as the gradient of a scalar potential function f, meaning F = ∇f. Equivalent characterizations include path independence of line integrals, zero circulation around every closed curve, and (on simply connected domains) the vanishing of curl F. The topology of the domain is critical: the curl test is necessary everywhere but sufficient only when the domain has no holes.

When a field is conservative, the Fundamental Theorem for Line Integrals reduces evaluation to f(B) − f(A), bypassing parametrization entirely. The potential is recovered by sequential partial integration: integrate with respect to one variable, match the next component to determine the unknown function, and repeat. These ideas extend naturally into the language of differential forms, where conservative fields correspond to exact 1-forms and the curl condition corresponds to closedness — the Poincaré lemma bridging the two on contractible domains.

Varsity Tutors • Calculus 3 • Conservative Fields & Potentials