Tutorials › Calculus III › The Fundamental Theorem for Line Integrals

Conservative Fields and Path Independence · Tutorial 776 of 999

The Fundamental Theorem for Line Integrals

Learn why a gradient field’s line integral along a curve is the potential’s terminal value minus its initial value, and apply the formula to parametrized paths.

Intermediate 9 min read

What You'll Learn

  • State the conditions needed to apply the fundamental theorem for line integrals.
  • Derive the endpoint formula from the chain rule and the one-variable Fundamental Theorem of Calculus.
  • Evaluate line integrals using specified initial and terminal points.
  • Apply the formula to smooth and piecewise-smooth parametrized curves.
  • Track orientation correctly and identify a common endpoint-sign error.

From a Vector Field to an Endpoint Calculation

A line integral of a vector field measures the accumulated component of the field in the direction of travel along a curve. Its parametrized definition involves the field at each point of the curve and the curve’s velocity, so evaluating it directly can require substantial algebra.

When the vector field is the gradient of a scalar function, the calculation has a simpler form: the integral depends only on the values of that scalar function at the curve’s endpoints. The result is the fundamental theorem for line integrals. It gives an efficient way to calculate work along a specified path, provided its conditions are met.

Potentials and Line Integrals

Definition: Let \(\phi\) be a differentiable scalar function on an open region \(D\). Its gradient is the vector field \(\nabla\phi\), whose components are the partial derivatives of \(\phi\). If \(\mathbf F=\nabla\phi\) throughout \(D\), then \(\phi\) is called a potential function for \(\mathbf F\) on \(D\).

For a piecewise-smooth parametrized curve \(\mathbf r:[a,b]\to D\), the line integral of a vector field \(\mathbf F\) along the oriented curve is defined by integrating the dot product of the field with the curve’s velocity. If the curve has several smooth pieces, the integral is the sum over those pieces.

$$ \int_C \mathbf F\cdot d\mathbf r = \int_a^b \mathbf F(\mathbf r(t))\cdot\mathbf r'(t)\,dt. $$

The orientation matters: the parameter moves from the initial point \(\mathbf r(a)\) to the terminal point \(\mathbf r(b)\). Reversing the direction of travel reverses the sign of the line integral.

The Fundamental Theorem for Line Integrals

Theorem: Suppose \(D\) is an open region, \(\phi:D\to\mathbb R\) has continuous first partial derivatives, and \(\mathbf F=\nabla\phi\) on \(D\). If \(\mathbf r:[a,b]\to D\) is a piecewise-smooth curve, then $$ \int_C \mathbf F\cdot d\mathbf r = \phi(\mathbf r(b))-\phi(\mathbf r(a)). $$ In words, the line integral equals the potential at the terminal point minus the potential at the initial point.

The curve must stay within the region where the potential is defined and where \(\mathbf F=\nabla\phi\). The formula does not require the curve to be a straight line, nor does it require the parametrization to have constant speed.

Why the Endpoint Formula Works

On any smooth piece of the curve, write \(\mathbf r(t)=(x_1(t),\ldots,x_n(t))\). The multivariable chain rule says that differentiating the potential along the curve gives its gradient dotted with the curve’s velocity:

$$ \frac{d}{dt}\phi(\mathbf r(t)) = \nabla\phi(\mathbf r(t))\cdot\mathbf r'(t) = \mathbf F(\mathbf r(t))\cdot\mathbf r'(t). $$

Thus the integrand in the line integral is exactly the derivative of the potential evaluated along the parametrized curve. The ordinary Fundamental Theorem of Calculus then evaluates the integral on each smooth piece.

1
Apply the chain rule.
Along each smooth piece, the derivative of \(\phi(\mathbf r(t))\) equals \(\mathbf F(\mathbf r(t))\cdot\mathbf r'(t)\).
2
Integrate on each piece.
The Fundamental Theorem of Calculus turns each piece’s integral into the potential at that piece’s terminal point minus its value at its initial point.
3
Add the pieces.
At every join, the potential value at the end of one piece cancels the identical value at the start of the next.

For a single smooth piece, this argument gives the theorem immediately. For a curve with smooth pieces meeting at points \(\mathbf p_1,\ldots,\mathbf p_{m-1}\), with initial point \(\mathbf p_0\) and terminal point \(\mathbf p_m\), the sum is

$$ \bigl(\phi(\mathbf p_1)-\phi(\mathbf p_0)\bigr) +\bigl(\phi(\mathbf p_2)-\phi(\mathbf p_1)\bigr) +\cdots +\bigl(\phi(\mathbf p_m)-\phi(\mathbf p_{m-1})\bigr) = \phi(\mathbf p_m)-\phi(\mathbf p_0). $$

All intermediate potential values cancel. This proves the formula for piecewise-smooth curves as well as for smooth ones.

Worked Examples

Worked Example: A Two-Dimensional Parametrized Curve

Let \(\phi(x,y)=x^2y+3y\), and let \(\mathbf F=\nabla\phi\). Evaluate the line integral along \(\mathbf r(t)=(t,t^2)\), \(0\leq t\leq1\).

First calculate the gradient:

$$ \mathbf F(x,y)=\nabla\phi(x,y)=(2xy,\ x^2+3). $$

The initial point is \(\mathbf r(0)=(0,0)\), and the terminal point is \(\mathbf r(1)=(1,1)\). The endpoint formula gives

$$ \begin{aligned} \int_C\mathbf F\cdot d\mathbf r &=\phi(1,1)-\phi(0,0)\\ &=(1^2\cdot1+3\cdot1)-(0^2\cdot0+3\cdot0)\\ &=4-0\\ &=4. \end{aligned} $$

Check by evaluating the parametrized integral. Since \(\mathbf r'(t)=(1,2t)\),

$$ \begin{aligned} \mathbf F(\mathbf r(t)) &=\mathbf F(t,t^2)=(2t^3,t^2+3),\\ \mathbf F(\mathbf r(t))\cdot\mathbf r'(t) &=(2t^3)(1)+(t^2+3)(2t)\\ &=2t^3+2t^3+6t\\ &=4t^3+6t. \end{aligned} $$

Therefore the direct integral is

$$ \int_0^1(4t^3+6t)\,dt = \left[t^4+3t^2\right]_0^1 = (1+3)-0 = 4. $$

This agrees with the endpoint calculation.

Worked Example: A Curve in Three Dimensions

Let \(\phi(x,y,z)=xe^y+z^2\), with \(\mathbf F=\nabla\phi\). Evaluate the line integral along \(\mathbf r(t)=(1+t,t,2-t)\), \(0\leq t\leq1\).

The gradient is \(\mathbf F(x,y,z)=(e^y,xe^y,2z)\). The curve starts at \((1,0,2)\) and ends at \((2,1,1)\). Hence

$$ \begin{aligned} \int_C\mathbf F\cdot d\mathbf r &=\phi(2,1,1)-\phi(1,0,2)\\ &=(2e^1+1^2)-(1e^0+2^2)\\ &=(2e+1)-(1+4)\\ &=2e-4. \end{aligned} $$

For a direct check, \(\mathbf r'(t)=(1,1,-1)\), and

$$ \begin{aligned} \mathbf F(\mathbf r(t)) &=(e^t,(1+t)e^t,4-2t),\\ \mathbf F(\mathbf r(t))\cdot\mathbf r'(t) &=e^t+(1+t)e^t-(4-2t)\\ &=(2+t)e^t-4+2t. \end{aligned} $$

Since \(\frac{d}{dt}((1+t)e^t)=(2+t)e^t\), the direct integral is

$$ \begin{aligned} \int_0^1\bigl((2+t)e^t-4+2t\bigr)\,dt &=\left[(1+t)e^t-4t+t^2\right]_0^1\\ &=(2e-4+1)-1\\ &=2e-4. \end{aligned} $$

The result matches the endpoint formula.

Worked Example: A Piecewise-Smooth Route

Let \(\phi(x,y)=x^2+y^2\), so \(\mathbf F(x,y)=(2x,2y)\). Consider the route made of two segments: first from \((0,0)\) to \((1,0)\), then from \((1,0)\) to \((2,1)\).

Using the endpoint formula for the whole route gives

$$ \int_C\mathbf F\cdot d\mathbf r = \phi(2,1)-\phi(0,0) = (2^2+1^2)-(0^2+0^2) = 5. $$

To check the piecewise calculation, parametrize the first segment by \(\mathbf r_1(t)=(t,0)\), \(0\leq t\leq1\). Then \(\mathbf r_1'(t)=(1,0)\) and \(\mathbf F(\mathbf r_1(t))=(2t,0)\), so its contribution is

$$ \int_0^1 (2t,0)\cdot(1,0)\,dt = \int_0^1 2t\,dt = \left[t^2\right]_0^1 = 1. $$

Parametrize the second segment by \(\mathbf r_2(s)=(1+s,s)\), \(0\leq s\leq1\). Then \(\mathbf r_2'(s)=(1,1)\) and \(\mathbf F(\mathbf r_2(s))=(2+2s,2s)\). Its contribution is

$$ \int_0^1(2+2s,2s)\cdot(1,1)\,ds = \int_0^1(2+4s)\,ds = \left[2s+2s^2\right]_0^1 = 4. $$

The two contributions sum to \(1+4=5\), as required.

Orientation and a Common Sign Error

The order of subtraction in the endpoint formula is essential: it is always terminal minus initial. For example, with \(\phi(x,y)=x^2+y^2\), a path from \((0,0)\) to \((2,1)\) gives \(5-0=5\). Reversing the path gives \(0-5=-5\), not \(5\).

Common mistake: Writing \(\phi(\text{initial point})-\phi(\text{terminal point})\) for a curve in its given direction. For the route from \((0,0)\) to \((2,1)\), that incorrect order gives \(0-5=-5\). The correction is to follow the curve’s orientation and calculate \(\phi(2,1)-\phi(0,0)=5\).

Also check that the field really is the gradient of the stated potential throughout the curve’s domain. Knowing only the endpoints is not enough to use this theorem unless a suitable potential is available.

Why the Theorem Matters

Directly evaluating a line integral requires substituting the parametrization into every component of the field, computing the velocity, forming a dot product, and integrating the resulting expression. When a potential is known, the theorem replaces all of that work with two evaluations of a scalar function. The direct calculations in the examples verify the result; in practice, the endpoint formula is often the more efficient method.

An immediate consequence is that, for a gradient field on a region, any two piecewise-smooth curves in that region with the same initial and terminal points have the same line integral. Each integral equals the same terminal potential value minus the same initial potential value. This conclusion applies when the curves remain in the region where the potential and gradient field are defined.

Check Your Understanding

Use the hypotheses of the theorem carefully, and keep track of the direction of each curve.

  1. State the endpoint formula for a line integral of \(\nabla\phi\) along a piecewise-smooth curve.
  2. Why does the chain rule make the line-integral integrand the derivative of the potential along the curve?
  3. If a curve starts at \((1,0)\) and ends at \((0,2)\), and \(\phi(x,y)=x^2+3y\), what is the line integral of \(\nabla\phi\) along it?
  4. What sign change occurs if the direction of a curve is reversed?
  5. Which conditions on the field, potential, and curve must be checked before applying the endpoint formula?