\(\def\ans#1{\bbox[border:1px solid green,6pt]{#1}}\)

Line Integrals


We started in Calculus 1 with integrals over an interval, then earlier in this course, we studied integrals over regions in the xy plane and over volumes. Now we'll see what we call line integrals, which are integrals along a path in three-dimensional space (later, we'll see integrals over surfaces).

Here's the idea: consider a surface in 3-D space, defined by \(z=f(x,y)\). Suppose there's a path along this surface, as shown below (pretend that there's a surface extending on both sides of the path). The curve \(C\) is the projection of this path onto the xy plane.

The line integral \[\int_C f(x,y) \ ds\] gives the area of this "curtain" under the curve.

To find \(ds\), zoom in a segment of \(C\) in the xy plane:

Since \(ds=\sqrt{dx^2+dy^2}\), \[\dfrac{ds}{dt} = \sqrt{\left(\dfrac{dx}{dt}\right)^2+\left(\dfrac{dy}{dt}\right)^2} \longrightarrow ds = \sqrt{\left(\dfrac{dx}{dt}\right)^2+\left(\dfrac{dy}{dt}\right)^2}\ dt.\] If \(\vec{r}(t) = \langle x(t),y(t) \rangle\), we can write this as \(ds = |\vec{r}\ '(t)| \ dt\), so the line integral becomes

\[\int_C f(x,y)\ ds = \int_C f\big(x(t),y(t)\big) \ |\vec{r}\ '(t)| \ dt.\]


Evaluate the line integral \(\int_C 2+x^2y\ ds\), where \(C\) is the upper half of the unit circle \(x^2+y^2 = 1\).


Since we evaluate a line integral in terms of \(t\), we need to parametrize \(C\). We can do it as follows:

\[\begin{align} x &= \cos t\\ y &= \sqrt{1-x^2} = \sqrt{1-\cos^2 t} = \sin t \end{align}\]

Since this is the upper half of the circle, \(0 \leq t \leq \pi\).

Then \(\vec{r}\ '(t) = \langle -\sin t, \cos t \rangle\), so \(|\vec{r}\ '(t)| = \sqrt{\sin^2 t + \cos^2 t} = 1\). Therefore, the line integral becomes

\[\begin{align} \int_0^\pi &2+\cos^2 t\ \sin t \ dt\\ &= 2t-\dfrac{1}{3}\cos^3 t\bigg|_0^\pi \ \ \ \ \textrm{ by u-substitution}\\ &= \ans{2\pi + \dfrac{2}{3}} \end{align}\]

Alternate Solution

What if we parameterized the curve differently (recall that parameterization isn't unique)? It would be simpler to parameterize it as follows, but we'll find that the integral is tricker:

\[\begin{align} x &= t\\ y &= \sqrt{1-t^2} \end{align}\]

In this case, \(-1 \leq t \leq 1\):

Then \(\vec{r}\ '(t) = \langle 1,\dfrac{-t}{\sqrt{1-t^2}} \rangle\), so \[|\vec{r}\ '(t)| = \sqrt{1+\left(\dfrac{-t}{\sqrt{1-t^2}}\right)^2} = \dfrac{1}{\sqrt{1-t^2}}.\] Therefore, the line integral becomes

\[\begin{align} \int_C f(x,y)\ ds &= \int_{-1}^1 (2+t^2\sqrt{1-t^2}) \cdot \dfrac{1}{\sqrt{1-t^2}}\ dt\\ &= \int_{-1}^1 \dfrac{2}{\sqrt{1-t^2}}+t^2 \ dt \end{align}\]

To integrate this, we need to use trigonometric substitution: if we define \(t=\sin \theta\), then \(dt = \cos \theta \ d\theta\).

\[\begin{align} \int \dfrac{2}{\sqrt{1-t^2}}\ dt &= \int \dfrac{2}{\cos \theta} \cdot \cos \theta\ d\theta\\ &= 2\theta = 2\sin^{-1} t \end{align}\]

Going back to the line integral:

\[\begin{align} \int_{-1}^1 &\dfrac{2}{\sqrt{1-t^2}} + t^2 \ dt\\ &= 2\sin^{-1} t+\dfrac{1}{3}t^3\bigg|_{-1}^1\\ &= \ans{2\pi + \dfrac{2}{3}} \end{align}\]

Notice, of course, that we get the same answer in both cases; one had a simpler parameterization and an easier integral, and vice versa.

Try it yourself:

(click on a problem to show/hide its answer)

  1. Evaluate the integral \(\displaystyle\int_C x^2+y^2\ ds\), where \(C\) is the circle of radius 4 centered at the origin.
  2. \(\displaystyle\int_0^{2\pi} 16 \cdot 4\ dt = 128\pi\)

  3. Evaluate the integral \(\displaystyle\int_C \dfrac{x}{x^2+y^2}\ ds\), where \(C\) is the line segment from \((1,1)\) to \((10,10)\).
  4. \(\displaystyle\int_1^{10} \dfrac{1}{2t} \cdot \sqrt{2}\ dt = \dfrac{\sqrt{2}}{2}\ln 10\)

A line integral in three dimensions is similar: \[\int_C f\big(x(t),y(t),z(t)\big) |\vec{r}\ '(t)|\ dt,\] where \(\vec{r}(t) = \langle x(t),y(t),z(t) \rangle\).

Evaluate the line integral \(\int_C xy+2z\ ds\), where \(C\) is the line segment from \(P(1,0,0)\) to \(Q(0,1,1)\).


Start by parameterizing the line segment \(C\): \[r(t) = \langle 1-t,t,t \rangle, \ \ \ \ 0 \leq t \leq 1\] Then \(\vec{r}\ '(t) = \langle -1,1,1 \rangle\), so \(|\vec{r}\ '(t)| = \sqrt{3}\).

Rewriting the line integral in terms of t:

\[\begin{align} \int_C xy+2z\ ds &= \int_0^1 \big((1-t)t+2t\big)\sqrt{3}\ dt\\ &= \sqrt{3} \int_0^1 3t-t^2\ dt\\ &= \sqrt{3} \bigg[\dfrac{3}{2}t^2-\dfrac{1}{3}t^3 \bigg]_0^1\\ &= \ans{\dfrac{7\sqrt{3}}{6}} \end{align}\]

Try it yourself:

(click on the problem to show/hide the answer)

Evaluate the integral \(\displaystyle\int_C xyz\ ds\), where \(C\) is the line segment from \((0,0,0)\) to \((1,2,3)\).

Arc Length

We can use line integrals to calculate arc length, when the function is \(f(x,y) = 1\) or \(f(x,y,z)=1\):

\[\textrm{Arc Length } = \int_C\ ds = \int_C |\vec{r}\ '(t)|\ dt\]

The flight of an eagle is given by \[\vec{r}(t) = \langle 2400 \cos \dfrac{t}{2}, 2400 \sin \dfrac{t}{2}, 500t \rangle\] in ft. How far does the eagle travel over \(0 \leq t \leq 10\)?


\[\begin{align} \vec{r}\ '(t) &= \langle -1200 \sin \dfrac{t}{2}, 1200 \cos \dfrac{t}{2}, 500 \rangle\\ |\vec{r}\ '(t)| &= \sqrt{1200^2\left(\sin^2 \dfrac{t}{2} + \cos^2 \dfrac{t}{2}\right) + 500^2} = 1300\\ \implies L &= \int_C |\vec{r}\ '(t)| \ dt\\ &= \int_0^{10} 1300 dt = \ans{13,000\ ft} \end{align}\]

Note that the magnitude of the velocity vector is 1300, meaning that the eagle traveled at 1300 ft/min for 10 minutes, for a total of 13,000 ft.

Line Integrals in Vector Fields

A line integral arises when we describe the work done on an object moving along a path \(C\) in a force field.

At every point in this force field, the object feels a force, but only the tangential component of the force does any work: \[|\vec{F}_T| = |\vec{F}| \cos \theta,\] where \(\theta\) is the angle between \(\vec{F}\) and \(\vec{F}_T\).

\[\begin{align} \vec{F}_T = \vec{F} \cdot \vec{T} \ \ \ \ &: \textrm{ force (where } \vec{T} \textrm{ is the unit tangent vector)}\\ ds = |\vec{r}\ '(t)| \ dt \ \ \ &: \textrm{ distance traveled along the curve} \end{align}\]

Recall that work is the product of force and distance, so

\[\begin{align} W &= \int_C \vec{F} \cdot \vec{T}\ ds\\ &= \int_a^b \vec{F} \cdot \dfrac{\vec{r}\ '(t)}{|\vec{r}\ '(t)|} |\vec{r}\ '(t)|\ dt \end{align}\]


\[\ans{W = \int_a^b \vec{F} \cdot \vec{r}\ '(t)\ dt}\]

Note that work is a scalar.

Electric Force Field

An electric force field is described by \[\vec{F} = \dfrac{k \langle x,y,z \rangle}{(x^2+y^2+z^2)^{3/2}},\] where \(k\) is a constant. Suppose that \(k=1\) and find the work done by this force field in moving a particle from \((1,1,1)\) to \((3,3,3)\).


Start by parameterizing the line segment \(C\): \[r(t) = \langle 1+t,1+t,1+t \rangle, \ \ \ \ 0 \leq t \leq 2\] Then \(\vec{r}\ '(t) = \langle 1,1,1 \rangle\) and the force is written in parametric form as \[\vec{F} = \dfrac{1}{\big(3(1+t^2)\big)^{3/2}} \langle 1+t,1+t,1+t \rangle,\] so \[\vec{F} \cdot \vec{r}\ '(t) = \dfrac{3(1+t)}{\sqrt{27}(1+t)^3} = \dfrac{1}{\sqrt{3}(1+t)^2}.\]

The work, therefore, is

\[\begin{align} W &= \int_a^b \vec{F} \cdot \vec{r}\ '(t)\ dt\\ &= \int_0^2 \dfrac{1}{\sqrt{3}(1+t)^2}\ dt\\ &= -\dfrac{1}{\sqrt{3}(1+t)} \bigg|_0^2 = \ans{\dfrac{2}{3\sqrt{3}} = \dfrac{2\sqrt{3}}{9}} \end{align}\]

Try it yourself:

(click on the problem to show/hide the answer)

Find the work done by moving an object from \((0,0)\) to \((2,8)\) along the parabola \(y=2x^2\) if \(\vec{F} = \langle y,x \rangle\).
\(W = \displaystyle\int_0^2 6t^2\ dt = 16\)