JOVANA
Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
All guides

Line Integrals & Conservative Fields

Drag an object through a field of force along a winding path and add up the work — that running total is a line integral. For special 'conservative' fields the total depends only on where you start and stop, and a single scalar potential hands you the answer with a subtraction.

Adding up work along a path

In Volume I a definite integral added up a quantity along a straight stretch of the x-axis: chop [a, b] into tiny pieces, multiply each piece by the height of f there, and sum. A line integral does the very same thing, but the path is no longer a flat interval — it is a curve C wandering through space, and the thing we are accumulating is not a height but the push of a vector field. Picture walking a curved trail through a steady wind. At each step you advance by a tiny displacement vector dr, and the wind there has its own vector F. The work the wind does on that one step is the dot product F · dr — only the part of the wind aligned with your motion counts.

Sum those tiny dot products over the whole curve and pass to the limit, and you get the line integral, written 'integral over C of F · dr'. This is exactly the work integral of physics: the total work done by a force as an object travels along C. To actually compute it, you trace the curve with a parameter t — say r(t) = (x(t), y(t)) for t from 0 to 1 — so that dr = r'(t) dt. The whole thing collapses back into an ordinary single-variable integral in t: 'integral from 0 to 1 of F(r(t)) · r'(t) dt'. That is the practical recipe; the rest of this guide is about when you can avoid doing it the hard way.

The surprise: sometimes the path doesn't matter

Here is the experiment that opens the whole subject. Pick two points, A and B. Compute the line integral of F from A to B along one path; then do it again along a wildly different path. For a generic field the two numbers disagree — the work spent depends on the route, just as the gas you burn driving across town depends on which streets you take. But for certain special fields, every path from A to B gives the identical answer. The field has path independence: the integral depends only on the endpoints, never on the winding in between.

Path independence has an equivalent and even more striking face. If every A-to-B path gives the same number, then take any loop — a closed curve that returns to where it began — and split it into a trip out and a trip back. The two legs cancel, so the line integral around any closed loop is zero. A field with this property is called a [[conservative-field|conservative field]], and the name is borrowed straight from physics: gravity and electrostatics are conservative, which is exactly the statement that energy is conserved — you cannot ride a closed loop and come back with free work in your pocket. Friction, by contrast, is non-conservative: walk a closed loop dragging against it and you have paid real energy that never comes back.

Where the path-free answer hides: the scalar potential

Why would a field be so well-behaved? Because, secretly, it is the slope of a single landscape. Imagine a scalar height function phi(x, y, z) — a scalar potential, one plain number assigned to each point, like elevation on a topographic map. From Volume I and the earlier multivariable rung you know the gradient nabla phi: the vector that points uphill in the direction of steepest increase, with length equal to the steepest slope. A field is conservative precisely when it IS such a gradient — when F = nabla phi for some phi. The force is everywhere just pointing 'downhill on phi' (or up, by convention), and that hidden landscape is what makes the route stop mattering.

There is a quick field test for two dimensions. Write F = (P, Q). If F came from a potential, then mixed partial derivatives must agree — the partial derivative of P with respect to y must equal the partial derivative of Q with respect to x. (This is just Clairaut's symmetry of second derivatives applied to phi.) When that equality holds on a region with no holes, F is conservative and a potential exists; the relation P dy = Q dx assembled into a single object is what advanced calculus calls an [[exact-form|exact form]], the differential of phi. The honest caveat lives in 'no holes': on a region with a puncture, the test can pass locally yet the field still circulate around the hole, so no single-valued global potential exists. The classic example is the field that swirls around the origin like 1/r — locally curl-free, globally not conservative.

The gradient theorem: a fundamental theorem for paths

Recall the Volume I fundamental theorem of calculus: integrating a derivative f' from a to b just returns f(b) - f(a). You never sum up the inside; you read off the antiderivative at the two ends and subtract. The [[gradient-theorem|gradient theorem]] — also called the fundamental theorem of line integrals — is the exact same statement lifted to curves. If F = nabla phi, then 'integral over C of nabla phi · dr = phi(B) - phi(A)', where A and B are the start and end of the curve. The interior of the path evaporates; only the potential at the two endpoints survives.

The proof is a one-line chain rule, and it is worth seeing because it shows why the theorem must be true. Parametrize C by r(t) for t from a to b. Along the curve the potential becomes a single-variable function g(t) = phi(r(t)). The multivariable chain rule says g'(t) = nabla phi(r(t)) · r'(t) — which is exactly the integrand of our line integral. So we are integrating g'(t) from a to b, and the ordinary fundamental theorem of calculus finishes it as g(b) - g(a) = phi(B) - phi(A). The whole mystery of path independence is just the chain rule wearing a coat.

Goal: integral over C of F . dr, where F = (2xy, x^2 + 1), A=(0,0), B=(1,3)

Step 1  Test: d/dy [2xy] = 2x,   d/dx [x^2 + 1] = 2x   -> equal -> conservative
Step 2  Find phi with dphi/dx = 2xy  ->  phi = x^2 y + h(y)
Step 3  Then dphi/dy = x^2 + h'(y) must equal x^2 + 1 -> h'(y)=1 -> h(y)=y
        so phi(x,y) = x^2 y + y
Step 4  Gradient theorem:  phi(B) - phi(A) = phi(1,3) - phi(0,0)
                         = (1*3 + 3) - (0 + 0) = 6

No path was ever chosen. Any curve from (0,0) to (1,3) gives 6.
A full worked line integral done by potential instead of parametrizing a path — recover phi by partial integration, then subtract at the endpoints.

Building the potential, step by step

Once the mixed-partials test passes, recovering phi is a tidy procedure of partial integration — running the gradient backwards one variable at a time. The trick is that integrating with respect to one variable leaves an unknown 'constant' that may still depend on the other variables, and the remaining equations pin it down. Here is the routine for a two-dimensional field F = (P, Q).

  1. Check that the partial of P by y equals the partial of Q by x on a hole-free region. If they disagree, stop — no potential exists and you must integrate along the actual path.
  2. Integrate P with respect to x, treating y as frozen. This gives phi up to an unknown function h(y) added on, since anything depending only on y vanishes under the x-partial.
  3. Differentiate your candidate phi with respect to y and set it equal to Q. The x-dependent pieces cancel, leaving a plain equation for h'(y).
  4. Integrate h'(y) to get h(y), assemble the full phi, and finish any line integral over this field by the gradient theorem: just compute phi(end) minus phi(start).

This guide is the hinge of the rung. The line integral is the raw object — work along a path — and conservative fields are the lucky case where the gradient theorem makes the path vanish. The integral theorems still ahead handle the general case: Green's theorem will rewrite a loop integral as an area integral of how much the field rotates, and the gradient theorem you just met is the lowest rung of a tower whose summit is the generalized Stokes theorem. The single phrase 'integrate a derivative over a region, read its antiderivative on the boundary' is the secret heartbeat of all of vector calculus — and you have now seen it for curves.