Line Integrals
In this lesson we will study line integrals, which are a particular type of integrals in which a function is integrated over an arbitrary curve. Specifically, the integrand can be either a scalar or a vector field.
Line Integral of Scalar Fields
The first type of line integral we will study is used to integrate a scalar field over a curve in a given plane or space. Formally, we can define it as follows.
Let $f : \mathbb{R}^3 \to \mathbb{R}$ be a continuous scalar field and $(\gamma, r)$ a piecewise regular parameterized by $r(t)$ with $t \in [a,b]$. The line integral of the scalar field $f$ over $\gamma$ is defined as: $$ \int_{\gamma} f \, ds = \int_a^b f(x(t), y(t), z(t)) \cdot \Vert r'(t) \Vert \, dt $$ where $\Vert r'(t) \Vert$ denotes the magnitude of the tangent vector.
Notice that the factor $\Vert r'(t) \Vert \, dt$ represents the infinitesimal arc length $ds$, this means that, unlike traditional definite integrals, line integrals of scalar fields are independent of the orientation of the curve.
Let’s now look at some practical examples.
Example 1
Evaluate the following integral: $$ \int_{\gamma} (x + y + z) \, ds $$
where $\gamma$ represents the segment from $A=(0,0,0)$ to $B=(1,1,1)$.
Let’s begin by parameterizing the segment:
$$ r(t) = (t,t,t) \quad t \in [0,1] $$
Then, we can determine the tangent vector:
$$ r'(t) = (1,1,1) $$
and its magnitude:
$$ \Vert r'(t) \Vert = \sqrt{1^2 + 1^2 + 1^2} = \sqrt{3} $$
The scalar field evaluated along the parametrized curve is equal to:
$$ f(r(t)) = t + t + t = 3t $$
Therefore:
$$ \begin{aligned} \int_{\gamma} (x + y + z) \, ds &= \int_0^1 3t \cdot \sqrt{3} \, dt\\ &= 3\sqrt{3} \left[ \frac{t^2}{2} \right]_0^1\\ &= \boxed{\frac{3 \sqrt{3}}{2}} \end{aligned} $$
Example 2
Note: the following exercises is taken from Marco Bramanti’s Esercitazioni di Analisi Matematica 2 (2012) (page 164, exercise 2.33).
Determine the following line integral:
$$ \int_{\gamma} z^3 \, ds $$
where $\gamma$ is the arc defined by:
$$ r(t) = (t \cos t, t \sin t, t), \quad t \in \left[\sqrt{2}, \sqrt{7} \right] $$
In this case, the scalar field is $f(x,y,z) = z^3$ while the parameterization is already given by exercise. Let’s proceed by determining the tangent vector, starting from its component:
$$ \begin{aligned} x'(t)&=\cos t-t\sin t\\ y'(t)&=\sin t+t\cos t\\ z'(t)&=1 \end{aligned} $$
That is:
$$ r'(t) = (\cos t - t \sin t, \sin t + t \cos t, 1) $$
Let’s now determine the magnitude of this vector:
$$ \begin{aligned} \Vert r'(t) \Vert^2 &= (\cos t - t \sin t)^2 + (\sin t + t \cos t)^2 + 1\\ &= \cos^2 t - \cancel{2t \sin t \cos t} + t^2 \sin^2 t\\ &\quad+\sin^2 t + \cancel{2t \sin t \cos t} + t^2 \cos^2 t + 1\\ &= \underbrace{\cos^2 t + \sin^2 t}_1 + t^2(\underbrace{\sin^2 t + \cos^2 t}_1) + 1\\ &= 1 + t^2 + 1\\ &= t^2 + 2 \end{aligned} $$
Hence:
$$ \Vert r'(t) \Vert^2 = t^2 + 2 \implies \Vert r'(t) \Vert = \sqrt{t^2 + 2} $$
By evaluating the scalar field along the parametrized curve, we obtain:
$$ f(r(t)) = t^3 $$
Therefore:
$$ \int_\gamma z^3\, ds = \int_{\sqrt{2}}^{\sqrt{7}} t^3 \sqrt{t^2 + 2} \, dt $$
We can solve this integral by substitution. Let:
$$ u = t^2 + 2, t^2 = u - 2 $$
Then:
$$ du = 2t \, dt \implies t \, dt = \frac{du}{2} $$
The limits of integration become:
$$ t = \sqrt{2} \implies u = \sqrt{2}^2 + 2 = 4\\ t = \sqrt{7} \implies u = \sqrt{7}^2 + 2 = 9 $$
Hence, we obtain:
$$ \begin{aligned} \int_4^9 (u-2) \sqrt{u} \, \frac{du}{2} &= \frac{1}{2} \int_4^9 (u-2) \sqrt{u} \, du\\ &= \frac{1}{2} \int_4^9 (u^{3/2} - 2u^{1/2}) \, du\\ &= \frac{1}{2} \left[ \frac{2u^{5/2}}{5} - \frac{4u^{3/2}}{3} \right]_4^9\\ &= \left[ \frac{1}{5} u^{5/2} - \frac{2}{3} u^{3/2} \right]_4^9\\ &= \left( \frac{243}{5} - 18 \right) - \left( \frac{32}{5} - \frac{16}{3} \right)\\ &= \frac{153}{5} - \frac{16}{15}\\ &= \frac{443}{15}\\ &\approx \boxed{29.533} \end{aligned} $$
Exercise 3
Note: the following exercises is taken from Marco Bramanti’s Esercitazioni di Analisi Matematica 2 (2012) (page 163, exercise 2.29).
Determine the moment of inertia of an uniform ring of mass $m$ and radius $R$ about a tangent to the ring.
This exercise is particular useful because it allows us to see how line integrals of scalar fields can also be used to solve real-world engineering problems. In fact, the moment of inertia about an axis is given by:
$$ \int d^2 \, dm $$
where $dm$ is an infinitesimal mass element and $d$ represents the distance of that mass element from the rotational axis.
Let’s begin by placing the uniform ring on the $xy$-plane, centered on the origin. Its parametric equation becomes:
$$ \begin{cases} x = R \cos t\\ y = R \sin t \end{cases}, \qquad t \in [0, 2\pi] $$
Then, we can choose the line $y = R$ as the rotational axis, which is tangent to the ring at $(0,R)$. A generic point on the ring will have coordinates $P = (R \cos t, R \sin t)$, while its distance from the line $y = R$ will be equal to: $$ d = \vert R \sin t - R \vert $$
Since $R > 0$ and $\sin t \leq 1$ we can write:
$$ d = R(1 - \sin t) $$
By squaring, we obtain:
$$ d^2 = R^2 (1 - \sin t)^2 $$
Now, let’s determine the infinitesimal mass element. Since the ring is uniform, its linear mass density is constant and thus we have:
$$ \lambda = \frac{m}{2 \pi R} $$
Let’s now recall that the infinitesimal arc length element is $$ ds = \Vert r'(t) \Vert \, dt $$
which, in this case, corresponds to:
$$ r'(t) = (-R \sin t, R \cos t) $$
Hence, we have:
$$ \begin{aligned} \Vert r'(t) \Vert &= \sqrt{(-R \sin t)^2 + (R \cos t)^2}\\ &= \sqrt{R^2 \sin^2 t + R^2 \cos^2 t}\\ &= \sqrt{R^2 (\underbrace{\sin^2 t + \cos^2 t}_1)}\\ &= R \end{aligned} $$
Which implies that $ds = R \, dt$. The infinitesimal mass element is therefore:
$$ dm = \lambda ds = \frac{m}{2 \pi R} R \, dt \implies dm = \frac{m}{2\pi} \, dt $$
Finally, we can evaluate the following integral to determine the moment of inertia:
$$ \begin{aligned} \int_{\gamma} d^2 \, dm &= \int_0^{2\pi} R^2 (1-\sin t)^2 \frac{m}{2\pi} \, dt\\ &= \frac{mR^2}{2\pi} \int_0^{2\pi} (1 - \sin t)^2 \, dt\\ &= \frac{mR^2}{2\pi} \int_0^{2\pi} (1- 2\sin t + \sin^2 t) \, dt\\ &= \frac{mR^2}{2\pi} \left( \int_0^{2\pi} 1 \, dt - 2 \int_0^{2\pi} \sin t \, dt + \int_0^{2\pi} \sin^2 t \, dt \right) \end{aligned} $$
The first two integrals are immediate:
$$ \int_0^{2\pi} 1 \, dt = 2\pi, \quad \int_0^{2\pi} \sin t \, dt = 0 $$
For the third one, we can recall the following trigonometric identity:
$$ \sin^2 t = \frac{1 - \cos 2t}{2} $$
Which allows us to easily solve it as follows:
$$ \begin{aligned} \int_0^{2\pi} \sin^2 t \, dt &= \int_0^{2\pi} \frac{1 - \cos 2t}{2} \, dt\\ &= \frac{1}{2} \int_0^{2\pi} (1 - \cos 2t) \, dt\\ &= \frac{1}{2} \left[ t - \frac{1}{2} \sin 2t \right]_0^{2\pi}\\ &= \frac{1}{2} \left[ \left( 2\pi - \frac{1}{2} \sin 4 \pi \right) - \left( 0 - \frac{1}{2} \sin 0 \right) \right]\\ &= \frac{1}{2}[(2\pi - 0) - (0 - 0)]\\ &= \frac{1}{2} \cdot 2\pi\\ &= \pi \end{aligned} $$
Therefore, we conclude that:
$$ \begin{aligned} \int_{\gamma} d^2 \, dm &= \frac{mR^2}{2\pi} (2 \pi + 0 + \pi)\\ &= \boxed{\frac{3}{2} mR^2} \end{aligned} $$
Line Integrals of Vector Fields
As mentioned earlier, line integrals can also be used to integrate vector fields over a curve in a given plane or space. Unlike line integrals of scalar fields, these integrals depend on the orientation of the curve.
Formally, we can define it as follows:
Let $\mathbf{F} : \mathbb{R}^3 \to \mathbb{R}^3$ be a continuous vector field defined as follows: $$ \mathbf{F}(x,y,z) = (P(x,y,z), Q(x,y,z), R(x,y,z)) $$
and let $d \mathbf{r}$ be an infinitesimal displacement along the curve defined by the following differential linear form:
$$ d\mathbf{r} = (dx, dy, dz) $$
Moreover, let $(\gamma, r)$ be a piecewise regular curve parametrized by:
$$ \begin{aligned} r : [a,b] &\longrightarrow \mathbb{R}^3 \\ t &\longmapsto (x(t), y(t), z(t)) \end{aligned}, \quad t \in [a,b] $$
Then, the line integral of the vector field $\textbf{F}$ over $\gamma$ is defined as:
$$ \begin{aligned} \int_{\gamma} \textbf{F} \, d\mathbf{r} &= \int_a^b \textbf{F}(r(t)) \cdot r'(t) \, dt\\ &= \int_a^b [ P(x(t), y(t), z(t)) x'(t) + Q(x(t), y(t), z(t)) y'(t)\\ &+ R(x(t), y(t), z(t)) z'(t) ] \, dt \end{aligned} $$
Unlike the previous case, here we compute the dot product between the parameterized vector field and the tangent vector. In particular, the integral accounts for the component of the vector field in the direction of motion along the curve. Notice that reversing the orientation of the curve changes the sign of the integral.
Finally, if $\gamma$ denotes a closed curve, we can also use the following notation:
$$ \oint_{\gamma} \textbf{F} \, d \mathbf{r} $$
Let’s now move on to some practical examples.
Example 1
Compute the following integral:
$$ \int_{\gamma} \textbf{F} \, d\mathbf{r}, \quad \textbf{F}(x,y,z) = (y,x,z) $$
over the segment that begins at $A = (0,0,0)$ and ends at $B = (1,1,1)$.
Let’s begin by parameterizing the curve:
$$ r(t) = (t,t,t), \quad t \in [0,1] $$
Then, let’s calculate its derivative:
$$ r'(t) = (1,1,1) $$
By evaluating the vector field along the parametrized curve, we obtain:
$$ \textbf{F}(r(t)) = (t,t,t) $$
Therefore, the dot product is: $$ \textbf{F}(r(t)) \cdot r'(t) = t + t + t = 3t $$
We can now evaluate the integral:
$$ \begin{aligned} \int_{\gamma} \textbf{F} \, d\mathbf{r} &= \int_0^1 3t \, dt\\ &= \left[ \frac{3t^2}{2} \right]_0^1\\ &= \boxed{\frac{3}{2}} \end{aligned} $$
Example 2
Note: the following exercises is taken from Marco Bramanti’s Esercitazioni di Analisi Matematica 2 (2012) (page 512, exercise 6.6).
Line integrals of vector fields can also be used to determine the work done by a force field, which is the case in the following exercise.
Determine the work done by the vector field:
$$ \textbf{F}(x,y,z) = (y,-x,z) $$
along the oriented curve defined by:
$$ \begin{cases} x = (3 + \cos 3t) \cos t\\ y = (3 + \cos 3t) \sin t\\ z = \sin 3t \end{cases}, \qquad t \in [0, 2\pi] $$
Let’s begin by evaluating the vector field along the parametrized curve:
$$ \textbf{F}(r(t)) = \begin{pmatrix} (3 + \cos 3t) \sin t\\ -(3 + \cos 3t) \cos t\\ \sin 3t \end{pmatrix} $$
Then, we can proceed by determining the tangent vector:
$$ \begin{aligned} x'(t) &= -3\sin 3t \cdot \cos t - (3+ \cos 3t) \sin t\\ y'(t) &= -3 \sin 3t \cdot \sin t + (3+ \cos 3t) \cos t\\ z'(t) &= 3 \cos 3t \end{aligned} $$
Therefore:
$$ r'(t) = \begin{pmatrix} -3\sin 3t \cos t - (3+ \cos 3t) \sin t\\ -3 \sin 3t \sin t + (3+ \cos 3t) \cos t\\ 3 \cos 3t \end{pmatrix} $$
We can now evaluate the following integral:
$$ \begin{aligned} \oint_{\gamma} \mathbf{F} \cdot d\mathbf{r} &= \int_0^{2\pi} \textbf{F}(r(t)) \cdot r'(t) \, dt\\ &= \int_0^{2\pi} \big[(3 + \cos 3t) \sin t (-3 \sin 3t \cos t\\ &\qquad- (3 + \cos 3t) \sin t)\\ &\quad-(3 + \cos 3t) \cos t (-3 \sin 3t \sin t\\ &\qquad+ (3 + \cos 3t) \cos t)\\ &\quad+ 3 \sin 3t \cos 3t \big] \, dt \end{aligned} $$
This integral may look scary, but we can simplify it tremendously by introducing the following substitution:
$$ \rho = 3 + \cos 3t $$
The first two products become:
$$ \begin{aligned} &\rho \sin t (-3 \sin 3t \cos t - \rho \sin t) - \rho \cos t (-3 \sin 3t \sin t + \rho \cos t)\\ &= \cancel{-3\rho \sin 3t \sin t \cos t} - \rho^2 \sin^2 t + \cancel{3\rho \sin 3t \cos t \sin t} - \rho^2 \cos^2 t\\ &= -\rho^2(\underbrace{\sin^2 t + \cos^2 t}_1)\\ &= -\rho^2 \end{aligned} $$
Which implies that:
$$ -\rho^2 = -(3 + \cos 3t)^2 $$
The dot product is now reduced to:
$$ \begin{aligned} \mathbf{F}(r(t)) \cdot r'(t) &= -(3 + \cos 3t)^2 + 3\sin 3t \cos 3t\\ &= -9 - 6 \cos 3t - \cos^2 3t + 3 \sin 3t \cos 3t \end{aligned} $$
Consequently:
$$ \begin{aligned} \oint_{\gamma} \mathbf{F} \cdot d\mathbf{r} &= -9 \int_0^{2\pi} \, dt -6 \int_0^{2\pi} \cos 3t \, dt - \int_0^{2\pi} \cos^2 3t \, dt\\ &\quad +3 \int_0^{2\pi} \sin 3t \cos 3t \, dt \end{aligned} $$
Let’s evaluate each integral individually. The first two are immediate:
$$ -9\int_0^{2\pi} \, dt = -18\pi, \quad -6 \int_0^{2\pi} \cos 3t \, dt = 0 $$
For the third one, we can use the following trigonometric identity:
$$ \cos^2 3t = \frac{1 + \cos 6t}{2} $$
obtaining:
$$ \begin{aligned} -\int_0^{2\pi} \cos^2 3t \, dt &= -\frac{1}{2} \int_0^{2\pi} (1+ \cos 6t) \, dt\\ &= -\pi \end{aligned} $$
For the fourth one, we can recall that:
$$ \sin 3t \cos 3t = \frac{1}{2} \sin 6t $$
Therefore:
$$ 3 \int_0^{2\pi} \sin 3t \cos 3t \, dt = 0 $$
Adding up the various contributions, we conclude that:
$$ \begin{aligned} \oint_{\gamma} \textbf{F} \cdot d\textbf{r} &= -18\pi - 0 - \pi + 0\\ &= -19\pi\\ &\approx \boxed{-59.69} \end{aligned} $$