# 16.2: Line Integrals

- Page ID
- 4832

We have so far integrated "over'' intervals, areas, and volumes with single, double, and triple integrals. We now investigate integration over or "along'' a curve---"line integrals'' are really "curve integrals''.

As with other integrals, a geometric example may be easiest to understand. Consider the function \(f=x+y\) and the parabola \(y=x^2\) in the \(x\)-\(y\) plane, for \(0\le x\le 2\). Imagine that we extend the parabola up to the surface \(f\), to form a curved wall or curtain (Figure \(\PageIndex{1}\)). What is the area of the surface thus formed? We already know one way to compute surface area, but here we take a different approach that is more useful for the problems to come.

**Figure \(\PageIndex{1}\):** Approximating the area under a curve.

As usual, we start by thinking about how to approximate the area. We pick some points along the part of the parabola we're interested in, and connect adjacent points by straight lines; when the points are close together, the length of each line segment will be close to the length along the parabola. Using each line segment as the base of a rectangle, we choose the height to be the height of the surface \(f\) above the line segment. If we add up the areas of these rectangles, we get an approximation to the desired area, and in the limit this sum turns into an integral.

Typically the curve is in vector form, or can easily be put in vector form; in this example we have \({\vecs{v}}(t)=\langle t,t^2\rangle\). Then as we have seen in Section 13.3 on arc length, the length of one of the straight line segments in the approximation is approximately \(ds=|{\vecs{v}}'|\,dt=\sqrt{1+4t^2}\,dt\), so the integral is

$$ \begin{align*} \int_0^2 f(t,t^2)\sqrt{1+4t^2}\,dt &=\int_0^2 (t+t^2)\sqrt{1+4t^2}\,dt \\[4pt] &= {167\over48}\sqrt{17}-{1\over12}-{1\over64}\ln(4+\sqrt{17}). \end{align*} $$

This integral of a function along a curve \(C\) is often written in abbreviated form as

$$\int_C f(x,y)\,ds.$$

Example \(\PageIndex{1}\)

Compute \(\int_C ye^x\,ds \) where \(C\) is the line segment from \((1,2)\) to \((4,7)\).

**Solution**

We write the line segment as a vector function:

\({\vecs{v}}=\langle 1,2\rangle + t\langle 3,5\rangle\), \(0\le t\le 1\),

or in parametric form

- \(x=1+3t\),
- \(y=2+5t\).

Then

$$ \begin{align*} \int_C ye^x\,ds &= \int_0^1 (2+5t)e^{1+3t}\sqrt{3^2+5^2}\,dt \\[4pt] &={16\over 9}\sqrt{34}e^4-{1\over9}\sqrt{34}\,e. \end{align*} \nonumber$$

All of these ideas extend to three dimensions in the obvious way.

Example \(\PageIndex{2}\)

Compute \(\int_C x^2 z \,ds\) where \(C\) is the line segment from \((0,6,-1)\) to \((4,1,5)\).

**Solution**

We write the line segment as a vector function:

\({\vecs{v}}=\langle 0,6,-1\rangle + t\langle 4,-5,6\rangle\), \(0\le t\le 1\),

or in parametric form

- \(x=4t\),
- \(y=6-5t\),
- \(z=-1+6t\).

Then

$$ \begin{align*} \int_C x^2 z\,ds &= \int_0^1 (4t)^2 (-1+6t)\sqrt{16+25+36}\,dt \\[4pt] &=16\sqrt{77}\int_0^1 -t^2+6t^3\,dt \\[4pt] & ={56\over3}\sqrt{77}. \end{align*} \nonumber$$

Now we turn to a perhaps more interesting example. Recall that in the simplest case, the work done by a force on an object is equal to the magnitude of the force times the distance the object moves; this assumes that the force is constant and in the direction of motion. We have already dealt with examples in which the force is not constant; now we are prepared to examine what happens when the force is not parallel to the direction of motion.

We have already examined the idea of components of force, in Example 12.3.4: the component of a force \(\vecs{F}\) in the direction of a vector \(\vecs{v}\) is

$${\vecs{F}\cdot {\vecs{v}}\over|{\vecs{v}}|^2}{\vecs{v}},$$

the projection of \(\vecs{F}\) onto \(\vecs{v}\). The length of this vector, that is, the magnitude of the force in the direction of \(\vecs{v}\), is

$${\vecs{F}\cdot {\vecs{v}}\over|{\vecs{v}}|},$$

the scalar projection scalar projection of \(\vecs{F}\) onto \(\vecs{v}\). If an object moves subject to this (constant) force, in the direction of \(\vecs{v}\), over a distance equal to the length of \(\vecs{v}\), the work done is

$${\vecs{F}\cdot {\vecs{v}}\over|{\vecs{v}}|}|{\vecs{v}}|=\vecs{F}\cdot {\vecs{v}}.$$

Thus, work in the vector setting is still "force times distance'', except that "times'' means "dot product''.

If the force varies from point to point, it is represented by a vector field \(\vecs{F}\); the displacement vector \(\vecs{v}\) may also change, as an object may follow a curving path in two or three dimensions. Suppose that the path of an object is given by a vector function \({\vecs{r}}(t)\); at any point along the path, the (small) tangent vector \(\vecs{r}'\,\Delta t\) gives an approximation to its motion over a short time \(\Delta t\), so the work done during that time is approximately \(\vecs{F}\cdot{\vecs{r}}'\,\Delta t\); the total work over some time period is then

$$\int_{t_0}^{t_1} \vecs{F}\cdot{\vecs{r}}'\,dt.$$

It is useful to rewrite this in various ways at different times. We start with

$$\int_{t_0}^{t_1} \vecs{F}\cdot{\vecs{r}}'\,dt=\int_C \vecs{F}\cdot\,d{\vecs{r}},$$

abbreviating \({\vecs{r}}'\,dt\) by \(d{\vecs{r}}\). Or we can write

$$ \begin{align} \int_{t_0}^{t_1} \vecs{F} \cdot{\vecs{r}}'\,dt & =\int_{t_0}^{t_1} \vecs{F} \cdot {\vecs{r}'\over|{\vecs{r}}'|}|{\vecs{r}}'|\,dt \\[4pt] &=\int_{t_0}^{t_1} \vecs{F}\cdot\vecs{T}\,|{\vecs{r}}'|\,dt\\[4pt] &=\int_{C} \vecs{F}\cdot\vecs{T}\,ds, \end{align} $$

using the unit tangent vector \(\vecs{T}\), abbreviating \(|\vecs{r}'|\,dt\) as \(ds\), and indicating the path of the object by \(C\). In other words, work is computed using a particular line integral of the form we have considered. Alternately, we sometimes write

$$ \begin{align*} \int_C \vecs{F}\cdot{\vecs{r}}'\,dt &=\int_C \langle f,g,h\rangle\cdot\langle x',y',z'\rangle\,dt \\[4pt] &= \int_C \left(f{dx\over dt}+g{dy\over dt}+h{dz\over dt}\right)\,dt \\[4pt] &= \int_C f\,dx+g\,dy+h\,dz \\[4pt] &=\int_C f\,dx+\int_C g\,dy+\int_C h\,dz, \end{align*} $$

and similarly for two dimensions, leaving out references to \(z\).

Example \(\PageIndex{3}\)

Suppose an object moves from \((-1,1)\) to \((2,4)\) along the path \({\vecs{r}}(t)=\langle t,t^2\rangle\), subject to the force \(\vecs{F}=\langle x\sin y,y\rangle\). Find the work

done.

**Solution**

We can write the force in terms of \(t\) as \(\langle t\sin(t^2),t^2\rangle\), and compute \({\vecs{r}}'(t)=\langle 1,2t\rangle\), and then the work is

\[ \begin{align*} \int_{-1}^2 \langle t\sin(t^2),t^2\rangle\cdot\langle1,2t\rangle \,dt &= \int_{-1}^2 t\sin(t^2) + 2t^3\,dt \\[4pt] &={15\over2}+{\cos(1)-\cos(4)\over2}. \end{align*} \]

Alternately, we might write

\[ \begin{align*} \int_C x\sin y\,dx+\int_C y\,dy &=\int_{-1}^2 x\sin(x^2)\,dx + \int_1^4 y\,dy \\[4pt] &=-{\cos(4)\over 2}+{\cos(1)\over 2}+{16\over2}-{1\over2} \end{align*} \]

getting the same answer.

## Contributors

Integrated by Justin Marshall.