Multivariable Calculus · Undergraduate

The Fundamental Theorem for Line Integrals

Quick answer

If F = ∇f, then the line integral of F along any curve from A to B equals f(B) − f(A): the path does not matter, and around any closed curve the integral is zero. Such fields are called conservative, and f is a potential function. In the plane, a field (P, Q) on a region without holes is conservative exactly when ∂P/∂y = ∂Q/∂x. A potential is found by integrating one component and matching the other.

What you'll learn

  • Evaluate line integrals of gradient fields from endpoint values
  • Explain path independence and zero circulation
  • Test a vector field for being conservative
  • Find a potential function by integrating components

Integrals that only see the endpoints

The fundamental theorem of calculus says ∫abF′(x) dx=F(b)−F(a)\int_a^b F'(x)\,dx = F(b) - F(a): integrating a derivative gives the change in the function. Line integrals have the same shortcut, with the gradient as the derivative.

Fundamental theorem for line integrals. Let CC be a smooth curve from AA to BB, and let ff have a continuous gradient on CC. Then

∫C∇f⋅dr=f(B)−f(A)\displaystyle\int_C \nabla f \cdot d\mathbf{r} = f(B) - f(A)

The proof is the chain rule. Along r(t)\mathbf{r}(t), the multivariable chain rule gives ddtf(r(t))=∇f⋅r′(t)\tfrac{d}{dt} f\big(\mathbf{r}(t)\big) = \nabla f \cdot \mathbf{r}'(t), so the line integral is ∫abddtf(r(t)) dt\int_a^b \tfrac{d}{dt} f\big(\mathbf{r}(t)\big)\,dt, and the ordinary fundamental theorem finishes it.

A field that is a gradient, F=∇f\mathbf{F} = \nabla f, is called conservative, and ff is a potential function for it.

Two paths through the gradient field of x²y Arrows of the field (2xy, x²) in the first quadrant, with two paths from (1, 0) to (2, 3): a straight segment and a curve that bends to the right before rising. The line integral along each path is 12, the change in x²y between the endpoints. 123123xy (1, 0) (2, 3)
  • segment
  • curve
Two paths through the gradient field of x²y

Why path independence and zero loops go together

Suppose F\mathbf{F} is conservative, and CC is a closed curve, starting and ending at the same point AA. The theorem gives f(A)−f(A)=0f(A) - f(A) = 0. So the integral of a conservative field around every closed curve is zero.

The converse holds too. Take two paths C1C_1 and C2C_2 from AA to BB. Going out along C1C_1 and back along C2C_2 reversed makes a closed loop, whose integral is ∫C1F⋅dr−∫C2F⋅dr\int_{C_1} \mathbf{F} \cdot d\mathbf{r} - \int_{C_2} \mathbf{F} \cdot d\mathbf{r}. If every loop integral is zero, the two paths agree: the integral is independent of path. And a path-independent field is conservative, with potential f(P)=∫APF⋅drf(P) = \int_A^P \mathbf{F} \cdot d\mathbf{r} along any path. The three properties, being a gradient, path independence and zero circulation, are one property seen three ways.

That is why the rotation field (−y,x)(-y, x) of line integrals cannot be a gradient: its circulation around the unit circle is 2π2\pi, not 00.

A test for conservative fields

If F=(P,Q)=∇f\mathbf{F} = (P, Q) = \nabla f, then P=fxP = f_x and Q=fyQ = f_y, so ∂P∂y=fxy\tfrac{\partial P}{\partial y} = f_{xy} and ∂Q∂x=fyx\tfrac{\partial Q}{\partial x} = f_{yx}. These mixed partials are equal. So

Test. If F=(P,Q)\mathbf{F} = (P, Q) is conservative, then ∂P∂y=∂Q∂x\displaystyle\frac{\partial P}{\partial y} = \frac{\partial Q}{\partial x}. Conversely, if the equation holds on an open region with no holes, then F\mathbf{F} is conservative there.

The condition “no holes” is essential, as the third mistake below shows. In space, the test is that all three pairs of mixed partials match, which the lesson on curl and divergence packages as curl⁡F=0\operatorname{curl}\mathbf{F} = \mathbf{0}.

Worked examples

Common mistakes

Practice problems

  1. Find a potential for F=(2x, 2y)\mathbf{F} = (2x,\ 2y).

    Answer

    f=x2+y2f = x^2 + y^2

    Full solution

    fx=2xf_x = 2x and fy=2yf_y = 2y. Any constant may be added.

  2. Decide whether F=(x+y, x−y)\mathbf{F} = (x + y,\ x - y) is conservative. If so, find a potential.

    Answer

    Yes; f=x22+xy−y22f = \tfrac{x^2}{2} + xy - \tfrac{y^2}{2}

    Full solution

    ∂P∂y=1=∂Q∂x\tfrac{\partial P}{\partial y} = 1 = \tfrac{\partial Q}{\partial x}. Integrating PP gives x22+xy+g(y)\tfrac{x^2}{2} + xy + g(y), and matching QQ gives g′=−yg' = -y.

  3. Decide whether F=(y, −x)\mathbf{F} = (y,\ -x) is conservative.

    Answer

    No

    Full solution

    ∂P∂y=1\tfrac{\partial P}{\partial y} = 1 and ∂Q∂x=−1\tfrac{\partial Q}{\partial x} = -1. Its circulation around the unit circle is −2π-2\pi, confirming it.

  4. Evaluate ∫C(x+y) dx+(x−y) dy\int_C (x + y)\,dx + (x - y)\,dy along r(t)=(t, t3)\mathbf{r}(t) = (t,\ t^3), 0≤t≤20 \le t \le 2.

    Answer

    −14-14

    Full solution

    With the potential of Exercise 2, the endpoints (0,0)(0, 0) and (2,8)(2, 8) give f(2,8)−f(0,0)=2+16−32=−14f(2, 8) - f(0, 0) = 2 + 16 - 32 = -14.

  5. Evaluate ∫Cyz dx+xz dy+xy dz\int_C yz\,dx + xz\,dy + xy\,dz along any curve from (0,0,0)(0, 0, 0) to (1,2,3)(1, 2, 3).

    Answer

    66

    Full solution

    The field is ∇(xyz)\nabla(xyz), so the integral is 1⋅2⋅3−01 \cdot 2 \cdot 3 - 0.

  6. Find a potential for F=(ey, xey+1)\mathbf{F} = \big(e^y,\ x e^y + 1\big) and evaluate ∫CF⋅dr\int_C \mathbf{F} \cdot d\mathbf{r} from (0,0)(0, 0) to (2,ln⁡3)(2, \ln 3).

    Answer

    f=xey+yf = x e^y + y; the integral is 6+ln⁡36 + \ln 3

    Full solution

    Integrating PP gives xey+g(y)x e^y + g(y), and matching QQ gives g′=1g' = 1. Then f(2,ln⁡3)=2⋅3+ln⁡3f(2, \ln 3) = 2 \cdot 3 + \ln 3 and f(0,0)=0f(0, 0) = 0.

  7. Find ∮C2x dx+2y dy\oint_C 2x\,dx + 2y\,dy around the ellipse x2+4y2=4x^2 + 4y^2 = 4.

    Answer

    00

    Full solution

    The field is ∇(x2+y2)\nabla(x^2 + y^2), defined on the whole plane. Every closed curve gives 00.

  8. For Example 4, evaluate ∫CF⋅dr\int_C \mathbf{F} \cdot d\mathbf{r} along the segment from (0,0,0)(0, 0, 0) to (1,2,12)\left(1, 2, \tfrac{1}{2}\right).

    Answer

    4+2e3/24 + 2e^{3/2}

    Full solution

    f(1,2,12)=1⋅4+2e3/2f\left(1, 2, \tfrac{1}{2}\right) = 1 \cdot 4 + 2e^{3/2} and f(0,0,0)=0f(0, 0, 0) = 0.

  9. A student checks F=(−yx2+y2, xx2+y2)\mathbf{F} = \left(\tfrac{-y}{x^2 + y^2},\ \tfrac{x}{x^2 + y^2}\right), finds ∂P∂y=∂Q∂x\tfrac{\partial P}{\partial y} = \tfrac{\partial Q}{\partial x}, and concludes that ∮CF⋅dr=0\oint_C \mathbf{F} \cdot d\mathbf{r} = 0 around the unit circle. What went wrong?

    Answer

    The field is undefined at the origin, a hole inside the circle; the circulation is 2π2\pi.

    Full solution

    On the unit circle the field equals (−sin⁡t,cos⁡t)(-\sin t, \cos t), the same as the rotation field, so the circulation is 2π2\pi. The test guarantees a potential only on a region without holes, and every region containing the circle but avoiding the origin has one.

Frequently asked questions

What does the fundamental theorem for line integrals say?

If C runs from point A to point B and f has continuous gradient, then the integral of ∇f · dr along C equals f(B) − f(A).

What is a conservative vector field?

A field that is the gradient of some function f, called a potential function. Its line integrals depend only on the endpoints, and its integral around every closed curve is zero.

How do you test whether a plane field is conservative?

Check whether ∂P/∂y = ∂Q/∂x. If the field is defined on an open region with no holes, equality means the field is conservative; inequality always means it is not.

How do you find a potential function?

Integrate P with respect to x, adding an unknown function g(y) instead of a constant. Differentiate the result with respect to y, set it equal to Q, and solve for g.

Why is it called conservative?

For a conservative force F = −∇U, kinetic energy plus potential energy U stays constant along any motion: energy is conserved.

What to learn next