# 16.2: Line Integrals

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. (AP)*

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 \({\bf v}(t)=\langle t,t^2\rangle\). Then as we have seen in Section 13.3 on arc length, thelength of one of the straight line segments in the approximation is approximately \(ds=|{\bf v}'|\,dt=\sqrt{1+4t^2}\,dt\), so the integral is

$$\int_0^2 f(t,t^2)\sqrt{1+4t^2}\,dt =\int_0^2 (t+t^2)\sqrt{1+4t^2}\,dt= {167\over48}\sqrt{17}-{1\over12}-{1\over64}\ln(4+\sqrt{17}).$$

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: \({\bf 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

$$\int_C ye^x\,ds = \int_0^1 (2+5t)e^{1+3t}\sqrt{3^2+5^2}\,dt ={16\over 9}\sqrt{34}e^4-{1\over9}\sqrt{34}\,e.$$

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: \({\bf 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

$$\int_C x^2 z\,ds = \int_0^1 (4t)^2 (-1+6t)\sqrt{16+25+36}\,dt =16\sqrt{77}\int_0^1 -t^2+6t^3\,dt={56\over3}\sqrt{77}.$$

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 \(\bf F\) in the direction of a vector \(\bf v\) is

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

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

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

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

$${{\bf F}\cdot {\bf v}\over|{\bf v}|}|{\bf v}|={\bf F}\cdot {\bf 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 \(\bf F\); the displacement vector \(\bf 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 \({\bf r}(t)\); at any point along the path, the (small) tangent vector \({\bf r}'\,\Delta t\) gives an approximation to its motion over a short time \(\Delta t\), so the work done during that time is approximately \({\bf F}\cdot{\bf r}'\,\Delta t\); the total work over some time period is then

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

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

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

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

$$\int_{t_0}^{t_1} {\bf F}\cdot{\bf r}'\,dt=\int_{t_0}^{t_1} {\bf F}\cdot{{\bf r}'\over|{\bf r}'|}|{\bf r}'|\,dt=\int_{t_0}^{t_1} {\bf F}\cdot{\bf T}\,|{\bf r}'|\,dt=\int_{C} {\bf F}\cdot{\bf T}\,ds,$$

using the unit tangent vector \(\bf T\), abbreviating \(|{\bf 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

$$\eqalign{\int_C {\bf F}\cdot{\bf r}'\,dt&=\int_C \langle f,g,h\rangle\cdot\langle x',y',z'\rangle\,dt=\int_C \left(f{dx\over dt}+g{dy\over dt}+h{dz\over dt}\right)\,dt\cr&=

\int_C f\,dx+g\,dy+h\,dz=\int_C f\,dx+\int_C g\,dy+\int_C h\,dz,\cr}$$

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 \({\bf r}(t)=\langle t,t^2\rangle\), subject to the force \({\bf 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 \({\bf r}'(t)=\langle 1,2t\rangle\), and then the work is

$$\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={15\over2}+{\cos(1)-\cos(4)\over2}.$$

Alternately, we might write

$$\int_C x\sin y\,dx+\int_C y\,dy=\int_{-1}^2 x\sin(x^2)\,dx + \int_1^4 y\,dy=-{\cos(4)\over 2}+{\cos(1)\over 2}+{16\over2}-{1\over2}$$

getting the same answer.

### Contributors

Integrated by Justin Marshall.