Part 15 - Line integrals

Posted on Oct 1, 2023
(Last updated: May 26, 2024)

Introduction

In this part we’ll cover a new concept with integrals, the so-called line integral.

Definition

A curve, $C$, parameterized as $\vec{r}(t) = \langle x(t), y(t) \rangle$, for an interval $t \in [a, b]$ and a continuous function, $f: C \rarr \mathbb{R}$.

Assuming $x(t)$ and $y(t)$ are differentiable.

$$ \int_C f(x, y) ds = \int_a^b f(x(t), y(t)) \sqrt{x^\prime(t)^2 + y^\prime(t)^2}\ dt $$

Geometrical sense

Just as an integral over an interval $[a, b]$ describes the area under a curve on that interval. A line integral describes an area under a curve, but on a given line/curve on an interval!

Example

Compute $\int_C 3x^2 y\ ds$

Where $C = \vec{r}(t) = \langle cos(t), sin(t) \rangle$ for $0 \leq t \leq \pi$.

$$ \vec{r}^\prime (t) = \langle -sin(t), cos(t) \rangle $$

$$ \int_0^{\pi} 3 cos^2(t) sin(t) \sqrt{(-sin(t))^2 + (cos(t))^2}\ dt $$

$$ \int_0^{\pi} 3 cos^2(t) sin(t) \cdot 1\ dt $$

Let $u = cos(t)$, $du = -sin(t)\ dt$, $u(0) = cos(0) ) 1$, $u(\pi) = cos(\pi) = -1$.

$$ -\int_{1}^{-1} 3u\ du $$

$$ \int_{-1}^{1} 3u\ du $$

$$ u^3 \bigg\rvert_{u = -1}^{u = 1} = \boxed{2} $$

Non-differentiable lines

There may be some cases where the parameterization isn’t differentiable.

Imagine we have a simple rectangular form. The four corners of the rectnagle will not be differentiable.

What we can do is divide $C$ into $n$ subcurves.

$$ C = C_1 \cup C_2 \cup \ldots \cup C_n $$

$$ \int_C f(x, y) ds = \sum_{j = 1}^{n} \int_{C_j} f(x, y) ds $$

Example

Evaluate $\int_C 2x\ ds$ where $C = x^2$ from $(0, 0)$ to $(1, 1)$ and then a straight line from $(1, 1)$ to $(1, 2)$.

$$ \int_C 2x\ ds = \int_{C_{parabola}} 2x\ ds + \int_{C_{line}} 2x\ ds $$

Let’s start with the line: $$ \vec{r}(t) = \langle x_0 + ta, y_0 + tb \rangle \\ \vec{r}(t) = \langle 1 + t(1 - 1), 1 + t(2 - 1) \rangle \\ \vec{r}(t) = \langle 1, 1 + t \rangle \\ $$

$$ \vec{r}^\prime(t) = \langle 0, 1 \rangle \ | \ 0 \leq t \leq 1 $$

$$ \int_{C_{line}} 2x\ ds = \int_0^1 2 \cdot 1 \cdot \sqrt{0^2 + 1^2}\ dt \\ \int_0^1 2\ dt = \boxed{2} $$

Now for the parabola: $$ \vec{r}(t) = \langle t, t^2 \rangle $$

$$ \vec{r}^\prime(t) = \langle 1, 2t \rangle \ | \ 0 \leq t \leq 1 $$

$$ \int_{C_{parabola}} 2x\ ds = 2 \int_0^1 t \cdot \sqrt{1 + (2t)^2}\ dt \\ $$

Let $u = 1 + (2t)^2$, $du = 8t\ dt$, $u(0) = 1 + (2 \cdot 0)^2$ and $u(1) = 1 + (2\cdot 1)^2 = 5$

$$ \dfrac{2}{8} \int_1^5 \sqrt{u}\ du \\ $$

$$ \dfrac{1}{4} \dfrac{u^{\frac{3}{2}}}{\dfrac{3}{2}} \bigg\rvert_{u = 1}^{u = 5} \\ $$

$$ \dfrac{1}{4} \dfrac{2}{3} u^{\frac{3}{2}} \bigg\rvert_{u = 1}^{u = 5} \\ $$

$$ \dfrac{u^{\frac{3}{2}}}{6} \bigg\rvert_{u = 1}^{u = 5} \\ $$

$$ \dfrac{5^{\frac{3}{2}} - 1}{6} $$

Therefore: $$ \int_C 2x\ ds = \int_{C_{parabola}} 2x\ ds + \int_{C_{line}} 2x\ ds = \boxed{\dfrac{5^{\frac{3}{2}} - 1}{6} + 2} $$

Example with applications

Imagine we have a wire that is described by the following parameterization.

$$ \vec{r}(t) = \langle cos(t), sin(t) \rangle \ | \ 0 \leq \pi $$

The density proportional to the line $y = 1$.

Which means: $$ \rho(x, y) = k(1 - y) \ | \ k \in \mathbb{R} $$

Find the center of mass.

$$ x_0 = 0 - \text{ due to symmetry} $$

$$ y_0 = \dfrac{\int_C \rho(x, y) \cdot y\ ds}{\int_C \rho(x, y)\ ds} $$

$$ \int_0^{\pi} k(1 - sin(t)) \cdot sin(t) \cdot 1\ dt \\ k \int_0^{\pi} (1 - sin(t) \cdot sin(t)\ dt \\ k \int_0^{\pi} sin(t) - sin^2(t) \ dt \\ \ldots \\ \boxed{k \dfrac{4 - \pi}{2}} $$

$$ \begin{align*} m & = \int_0^{\pi} k(1 - sin(t))\ dt \\ & k \int_0^{\pi} (1 - sin(t))\ dt \\ & k \int_0^{\pi} 1 - sin(t)\ dt \\ & k [t + cos(t)] \bigg\rvert_{t = 0}^{t = \pi} \\ & k [t + cos(t)] \bigg\rvert_{t = 0}^{t = \pi} \\ & \boxed{k(\pi - 2)} \end{align*} $$

$$ y_0 = \dfrac{k \dfrac{4 - \pi}{2}}{k(\pi - 2)} \\ $$

$$ y_0 = \dfrac{\dfrac{4 - \pi}{2}}{(\pi - 2)} \\ $$

$$ y_0 = \dfrac{4 - \pi}{2} \dfrac{1}{(\pi - 2)} \\ $$

$$ y_0 = \dfrac{4 - \pi}{2\pi - 4} $$

Line integrals with respect to x or y

So far we have integrated with respect to the arc length. But we can integrate with respect to x or y.

$$ \int_C f(x, y)\ dx \text{ or } \int_C f(x, y)\ dy $$

$$ \int_C f(x, y)\ dx = \int_a^b f(x(t), y(t)) x^\prime(t)\ dt $$

$$ \int_C f(x, y)\ dy = \int_a^b f(x(t), y(t)) y^\prime(t)\ dt $$

Example

Evaluate $\int_C y^2\ dx + x\ dy$

Where $C$ is the line $(-5, -3)$ to $(0, 2)$.

Let’s rewrite our integral: $$ \int_C y^2\ dx + x\ dy = \int_C y^2\ dx + \int_C x\ dy $$

Let’s find the parameterization for the line: $$ \vec{r}(t) = \langle x_0 + ta, y_0 + tb \rangle \\ \vec{r}(t) = \langle -5 + t(0 - (-5)), -3 + t(2 - (-3)) \rangle \\ \vec{r}(t) = \langle -5 + 5t, -3 + 5t \rangle \ | \ 0 \leq t \leq 1 $$

$$ \vec{r}^\prime(t) = \langle 5, 5 \rangle \ | \ 0 \leq t \leq 1 $$

$$ \int_C y^2\ dx = \int_0^1 (-3 + 5t)^2 \cdot 5\ dt = \ldots = \dfrac{35}{3} $$

$$ \int_C x\ dy = \int_0^1 (-5 + 5t) \cdot 5\ dt = \ldots = -\dfrac{25}{2} $$

$$ \int_C y^2\ dx + x\ dy = \int_C y^2\ dx + \int_C x\ dy = \dfrac{35}{3} - \dfrac{25}{2} = \boxed{-\dfrac{5}{6}} $$

Line integrals with three variables

There is no difference in two or three variables: $$ C \in \mathbb{R}^3 \\ f: C \rarr \mathbb{R}^3 \\ \vec{r}(t) = \langle x(t), y(t), z(t) \rangle \ | \ a \leq t \leq b $$

$$ \int_C f(x, y, z)\ ds = \int_a^b f(x(t), y(t), z(t)) \sqrt{x^\prime(t)^2 + y^\prime(t)^2 + z^\prime(t)^2}\ dt $$