Lecture 23: Section 16.2 — Line Integrals (Part B)

In Part A, we introduced the **scalar line integral** $\int_C f\,ds$, which we used to find "curtain area" and the mass of a wire.

In Part B, we will first extend this scalar integral to 3D, and then introduce the second major type of line integral: the **vector line integral** (or **work integral**) $\int_C \vec{F} \cdot d\vec{r}$.

Topic 5: Line Integrals in Space (Scalar)

The concept of a scalar line integral extends naturally to 3D. If $C$ is a space curve parametrized by $\vec r(t)=\langle x(t),y(t),z(t)\rangle$ for $a\le t\le b$, and $f(x,y,z)$ is a scalar function defined on $C$, then:

Scalar Line Integral in 3D

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

This could represent the mass of a 3D wire with density $f(x,y,z)$, or the integral of a scalar field (like temperature) along a path.

Note: It is difficult to visualize this integral in the same way we did in 2D. The "curtain" for a 2D integral $\int_C f(x,y)\,ds$ lives in 3D (as $z=f(x,y)$). To visualize the "curtain" for a 3D integral $\int_C f(x,y,z)\,ds$, we would need a 4th spatial dimension to graph $w=f(x,y,z)$. Instead, we often visualize this by color-mapping the curve $C$ according to the value of $f$ at each point.

Example 5A: Compute $\displaystyle \int_C (x^2+y^2)\,ds$ on the helix $\vec r(t)=\langle a\cos t,\ a\sin t,\ bt\rangle$, $0\le t\le 2\pi$

Solution (Step-by-step):

  1. Parametrize. This is given: $x=a\cos t$, $y=a\sin t$, $z=bt$.
  2. Evaluate $f$ along the path. The function is $f(x,y,z) = x^2+y^2$. $$f(\vec{r}(t)) = (a\cos t)^2 + (a\sin t)^2 = a^2\cos^2 t+a^2\sin^2 t = a^2(\cos^2 t+\sin^2 t) = a^2.$$ The function is constant along the helix (it only depends on the distance from the $z$-axis).
  3. Compute $ds$. $ds = |\vec{r}'(t)|dt$. Since $\vec r'(t)=\langle -a\sin t,\ a\cos t,\ b\rangle$, we have: $$|\vec r'(t)|=\sqrt{(-a\sin t)^2+(a\cos t)^2+b^2} = \sqrt{a^2\sin^2 t+a^2\cos^2 t+b^2} = \sqrt{a^2+b^2}.$$ (This is a constant, which is a key property of a helix). So, $ds = \sqrt{a^2+b^2}\,dt$.
  4. Integrate. $$\int_C (x^2+y^2)\,ds = \int_0^{2\pi} \underbrace{(a^2)}_{f} \cdot \underbrace{(\sqrt{a^2+b^2}\,dt)}_{ds} $$ $$ = a^2\sqrt{a^2+b^2} \int_0^{2\pi} dt = a^2\sqrt{a^2+b^2} \cdot [\theta]_0^{2\pi} = \boxed{2\pi a^2\sqrt{a^2+b^2}}.$$

Example 5B: Compute $\displaystyle \int_C z\,ds$ on the line segment from $(0,0,0)$ to $(1,1,1)$

Solution (Step-by-step):

  1. Parametrize. We use the form $\vec{r}(t) = \vec{r}_0 + t\vec{v}$ for $0 \le t \le 1$.

    Start: $\vec{r}_0 = \langle 0,0,0 \rangle$.
    End: $\vec{r}_1 = \langle 1,1,1 \rangle$.
    Vector: $\vec{v} = \vec{r}_1 - \vec{r}_0 = \langle 1,1,1 \rangle$.

    So, $\vec r(t)= \langle 0,0,0 \rangle + t\langle 1,1,1 \rangle = \langle t,t,t\rangle$, for $0\le t\le 1$.

  2. $f$ along $C$. $f(x,y,z)=z$. Along the path, $z=t$, so $f(\vec{r}(t))=t$.
  3. $ds$. $ds = |\vec{r}'(t)|dt$. Since $\vec r'(t) = \langle 1,1,1 \rangle$, we have $|\vec r'(t)|=\sqrt{1^2+1^2+1^2}=\sqrt{3}$. So $ds=\sqrt{3}\,dt$.
  4. Integrate. $$\int_C z\,ds = \int_0^1 (t) \cdot (\sqrt{3}\,dt) = \sqrt{3}\int_0^1 t\,dt = \sqrt{3}\left[\frac{t^2}{2}\right]_0^1=\boxed{\frac{\sqrt{3}}{2}}.$$

Check Your Understanding

Problem. Compute $\displaystyle \int_C z\,ds$ where $C$ is one turn of the helix $\vec{r}(t) = \langle \cos t, \sin t, t \rangle$ from $t=0$ to $t=2\pi$.

  1. Parametrize. Given: $\vec{r}(t) = \langle \cos t, \sin t, t \rangle$, $0 \le t \le 2\pi$.
  2. $f$ along $C$. $f(x,y,z)=z$. Along the path, $z=t$, so $f(\vec{r}(t))=t$.
  3. $ds$. $ds = |\vec{r}'(t)|dt$. Since $\vec r'(t) = \langle -\sin t, \cos t, 1 \rangle$, we have $$|\vec r'(t)|=\sqrt{(-\sin t)^2+(\cos t)^2+1^2} = \sqrt{\sin^2 t+\cos^2 t+1} = \sqrt{1+1} = \sqrt{2}.$$ So, $ds = \sqrt{2}\,dt$.
  4. Integrate. $$\int_C z\,ds = \int_0^{2\pi} \underbrace{(t)}_{f} \cdot \underbrace{(\sqrt{2}\,dt)}_{ds} = \sqrt{2} \int_0^{2\pi} t\,dt $$ $$ = \sqrt{2} \left[\frac{t^2}{2}\right]_0^{2\pi} = \sqrt{2} \left( \frac{(2\pi)^2}{2} - 0 \right) = \sqrt{2} \left( \frac{4\pi^2}{2} \right) = \boxed{2\pi^2\sqrt{2}}.$$

Topic 6: Line Integrals and Work

We now introduce the second major type of line integral. Instead of integrating a scalar field $f$ (like density or temperature), we will integrate a vector field $\vec{F}$ (like a force field or a fluid velocity field).

The main application is **Work**. Let's build this concept up from what you already know.

The Scaffolding of "Work"

  1. Calc I (Constant Force, Straight Line): If a constant force $F$ moves an object a distance $d$ (in the same direction), the work is $W = F \cdot d$.
  2. Calc II (Variable Force, Straight Line): If a variable force $F(x)$ moves an object along the $x$-axis from $x=a$ to $x=b$, we must integrate: $W = \int_a^b F(x)\,dx$.
  3. Sec 12.3 (Constant Vector Force, Straight Displacement): If a constant force vector $\vec{F}$ moves an object along a straight displacement vector $\vec{D}$, the work is the component of force in the direction of motion: $W = \vec{F} \cdot \vec{D}$.
  4. Sec 16.2 (The New Concept): What if a variable vector field $\vec{F}(x,y)$ moves a particle along a curved path $C$?

We can't just multiply. We must add up the small pieces of work. On a tiny piece of the path $\Delta \vec{r}$, the force $\vec{F}$ is *almost* constant. The small amount of work done is $\Delta W \approx \vec{F} \cdot \Delta \vec{r}$.

Summing these up and taking the limit gives the **Work Integral**: $$W = \int_C \vec{F} \cdot d\vec{r}$$

How to Compute the Work Integral

This new notation $\int_C \vec{F} \cdot d\vec{r}$ is what we must learn to compute.

Let $\vec{F} = \langle P(x,y), Q(x,y) \rangle$ be our force field.
Let $C$ be parametrized by $\vec{r}(t) = \langle x(t), y(t) \rangle$ for $a \le t \le b$.

The differential $d\vec{r}$ represents the infinitesimal displacement vector $\langle dx, dy \rangle$. From $\vec{r}'(t) = \langle x'(t), y'(t) \rangle$, we can write this as: $$d\vec{r} = \vec{r}'(t)\,dt = \langle x'(t), y'(t) \rangle\,dt = \langle x'(t)dt, y'(t)dt \rangle = \langle dx, dy \rangle$$

Now, we can write out the dot product $\vec{F} \cdot d\vec{r}$: $$\vec{F} \cdot d\vec{r} = \langle P, Q \rangle \cdot \langle dx, dy \rangle = P\,dx + Q\,dy$$

This gives us two new, equivalent notations for the work integral, and a way to compute it:

Definition & Computation (Work Integrals)

The line integral of $\vec{F} = \langle P, Q \rangle$ along $C$ is: $$\int_C \vec{F} \cdot d\vec{r} = \int_C P(x,y)\,dx + Q(x,y)\,dy$$ To compute this, we substitute everything in terms of $t$: $$= \int_a^b \left( P(x(t),y(t))\,x'(t) + Q(x(t),y(t))\,y'(t) \right)\,dt$$ (This formula extends naturally to 3D: $\int_C P\,dx + Q\,dy + R\,dz$).

Motivation: What do $\int P\,dx$ and $\int Q\,dy$ represent?

We've derived $W = \int P\,dx + Q\,dy$, but what do these new integrals mean on their own?

  • Physical Meaning (Work by Component):
    • $\displaystyle \int_C P\,dx$ represents the work done by only the horizontal component of the force field $\vec{F}$ as it moves an object along $C$.
    • $\displaystyle \int_C Q\,dy$ represents the work done by only the vertical component of the force field $\vec{F}$ along $C$.
  • Geometric Meaning (Projections):
    • $\displaystyle \int_C P\,dx$ is the signed area of the "curtain" $z=P(x,y)$ projected onto the $xz$-plane.
    • $\displaystyle \int_C Q\,dy$ is the signed area of the "curtain" $z=Q(x,y)$ projected onto the $yz$-plane.

This also explains why direction matters: if the path moves to the left (so $dx$ is negative), the $xz$-projection accumulates negative area.

Crucial Distinction: Orientation (Path Direction)

  • Scalar Integrals ($\int_C f\,ds$): These are independent of orientation. The "curtain area" or "mass" is the same whether you walk from A to B or B to A. $$\int_{-C} f\,ds = \int_C f\,ds$$
  • Component Integrals ($\int_C P\,dx + Q\,dy$): These are dependent on orientation. Reversing the path $C$ (denoted $-C$) negates the integral. This is because $dx = x'(t)dt$ and $dy = y'(t)dt$ change signs if you reverse the path. This is crucial for work, where pushing against the path is negative work. $$\int_{-C} P\,dx + Q\,dy = -\int_C P\,dx + Q\,dy$$

Example 6A: Evaluate $\displaystyle \int_C y\,dx$ for $\vec r(t)=\langle t,t^2\rangle$, $0\le t\le 1$

Solution (Step-by-step):

  1. Parametrize. Given $x(t)=t$ and $y(t)=t^2$, for $0 \le t \le 1$.
  2. Find the differential $dx$. $x(t)=t \implies x'(t)=1$. So, $dx = x'(t)\,dt = 1\cdot dt = dt$.
  3. Substitute $y$. Along the path, $y=y(t)=t^2$.
  4. Form the integral. $$\int_C y\,dx=\int_0^1 \underbrace{(t^2)}_{y} \cdot \underbrace{(dt)}_{dx} = \left[\frac{t^3}{3}\right]_0^1=\boxed{\frac{1}{3}}.$$

Example 6B: Evaluate $\displaystyle \int_C 2x\,dx+3y\,dy$ for $\vec{r}(t) = \langle t^2, t^3 \rangle$, $0\le t\le 1$

Solution (Step-by-step):

  1. Parametrize. Given: $\vec r(t)=\langle t^2,t^3\rangle$, $0\le t\le 1$. So, $x(t)=t^2$ and $y(t)=t^3$.
  2. Find differentials $dx, dy$.

    $x(t)=t^2 \implies x'(t)=2t \implies dx = 2t\,dt$.

    $y(t)=t^3 \implies y'(t)=3t^2 \implies dy = 3t^2\,dt$.

  3. Substitute. Plug $x, y, dx, dy$ into the integrand:

    $(2x)\,dx+(3y)\,dy = (2(t^2))\,(2t\,dt)+(3(t^3))\,(3t^2\,dt)$

    $= 4t^3\,dt+9t^5\,dt = (4t^3+9t^5)\,dt.$

  4. Integrate.

    $\displaystyle \int_0^1 (4t^3+9t^5)\,dt = \left[t^4 + \frac{9t^6}{6}\right]_0^1 = \left[t^4 + \frac{3}{2}t^6\right]_0^1$

    $ = \left(1^4 + \frac{3}{2}(1)^6\right) - (0) = 1 + \frac{3}{2} = \boxed{\frac{5}{2}}.$

Example 6C: Compute the work $W=\displaystyle \int_C \vec F\cdot d\vec r$ done by a constant force $\vec F=\langle 1,2,3\rangle$ along the line from $(0,0,0)$ to $(2,1,0)$

Solution (Step-by-step):

  1. Recall the shortcut. For the special case of a constant force $\vec{F}$ and a straight line path $C$, the work integral simplifies. The work is just the dot product of the force and the total displacement vector $\vec{D} = \vec{r}_1 - \vec{r}_0$. $$W = \vec{F} \cdot \vec{D}$$
  2. Find Displacement Vector $\vec{D}$. $\vec{D} = \vec{r}_{\text{end}} - \vec{r}_{\text{start}} = \langle 2,1,0\rangle - \langle 0,0,0\rangle = \langle 2,1,0\rangle$.
  3. Compute Dot Product. $W = \vec{F} \cdot \vec{D} = \langle 1,2,3\rangle \cdot \langle 2,1,0\rangle$ $$W = (1)(2) + (2)(1) + (3)(0) = 2+2+0=4.$$
  4. Answer. $\boxed{4}$.

    (This is much faster than parametrizing. The full method would be: $\vec{r}_0 = \langle 0,0,0 \rangle$ and $\vec{v} = \langle 2,1,0 \rangle - \langle 0,0,0 \rangle = \langle 2,1,0 \rangle$. So, $\vec{r}(t) = \langle 2t, t, 0 \rangle$ for $0 \le t \le 1$. Then $d\vec{r} = \langle 2, 1, 0 \rangle dt$. The integral becomes $\int_0^1 \langle 1,2,3 \rangle \cdot \langle 2,1,0 \rangle dt = \int_0^1 4\,dt = 4$.)

Check Your Understanding

Problem. Let $C$ be the quarter-circle $\vec r(t)=\langle \cos t,\ \sin t\rangle$, from $t=0$ to $t=\pi/2$. Compute $\displaystyle \int_C x\,dy - y\,dx$.

  1. Parametrize. Given $x(t)=\cos t$ and $y(t)=\sin t$.
  2. Find differentials $dx, dy$.

    $x(t)=\cos t \implies dx = -\sin t\,dt$.

    $y(t)=\sin t \implies dy = \cos t\,dt$.

  3. Substitute. $$x\,dy-y\,dx = (\cos t)(\cos t\,dt) - (\sin t)(-\sin t\,dt)$$ $$= (\cos^2 t)\,dt + (\sin^2 t)\,dt = (\cos^2 t+\sin^2 t)\,dt = 1\cdot dt = dt.$$
  4. Integrate. $\displaystyle \int_0^{\pi/2} dt = [t]_0^{\pi/2} = \boxed{\frac{\pi}{2}}.$

    (Note: The integral $\int_C x\,dy - y\,dx$ is famous. As we'll see, $\frac{1}{2}\int_C x\,dy - y\,dx$ computes the area enclosed by the curve $C$. The area of this quarter-circle is $\frac{1}{4}\pi r^2 = \frac{\pi}{4}$. Our integral gave $\frac{\pi}{2}$, which is $2 \cdot (\text{Area})$. This is a preview of Green's Theorem!)


Lecture Conclusion (Part B)

What You Should Have Learned in Part B

  • How to extend **scalar line integrals** ($\int_C f\,ds$) to 3D.
  • The definition and physical motivation of a **vector line integral** (or **work integral**), $\int_C \vec{F} \cdot d\vec{r}$.
  • The computational process for work integrals: $\int_C P\,dx + Q\,dy + R\,dz$.
  • The crucial distinction between orientation-independent scalar integrals and orientation-dependent vector integrals.

Final Practice Set

Practice #1 (Scalar 3D)

Problem. Compute $\displaystyle \int_C x\,ds$ where $C$ is the helix $\vec{r}(t) = \langle \cos t, \sin t, t \rangle$ from $t=0$ to $t=\pi$.

  1. Type: This is a **scalar** integral (it has $ds$).
  2. Parametrize: Given $\vec{r}(t) = \langle \cos t, \sin t, t \rangle$, $0 \le t \le \pi$. So $x(t) = \cos t$.
  3. $ds$: $ds = |\vec{r}'(t)|dt$. From the CYU in Topic 5, we know $|\vec{r}'(t)| = \sqrt{2}$. So $ds = \sqrt{2}\,dt$.
  4. Integrate:

    $\displaystyle \int_C x\,ds = \int_0^\pi (\cos t) \cdot (\sqrt{2}\,dt) = \sqrt{2} \int_0^\pi \cos t\,dt$

    $\displaystyle = \sqrt{2} [\sin t]_0^\pi = \sqrt{2}(\sin \pi - \sin 0) = \sqrt{2}(0-0) = \boxed{0}.$

Practice #2 (Work 2D)

Problem. Compute $\displaystyle \int_C (y\,dx - x\,dy)$ along $\vec r(t)=\langle t, t^3\rangle$, $0\le t\le 1$.

  1. Type: This is a **work-style** integral (it has $dx, dy$).
  2. Parametrize: Given $x(t)=t$, $y(t)=t^3$.
  3. Differentials: $x=t \implies dx=dt$. $y=t^3 \implies dy=3t^2\,dt$.
  4. Substitute: $y\,dx-x\,dy = (t^3)(dt) - (t)(3t^2\,dt) = (t^3-3t^3)\,dt = -2t^3\,dt$.
  5. Integrate: $\displaystyle \int_0^1 -2t^3\,dt = -2\left[\frac{t^4}{4}\right]_0^1 = -2\left(\frac{1}{4} - 0\right) = \boxed{-\dfrac{1}{2}}$.

Practice #3 (Work 3D)

Problem. Compute $W = \displaystyle \int_C \vec{F} \cdot d\vec{r}$ where $\vec{F} = \langle z, y, x \rangle$ and $C$ is the helix $\vec{r}(t) = \langle \cos t, \sin t, t \rangle$ from $t=0$ to $t=\pi/2$.

  1. Type: This is a **work** integral in 3D.
  2. Parametrize: Given: $\vec{r}(t) = \langle \cos t, \sin t, t \rangle$.

    $x(t)=\cos t, \quad y(t)=\sin t, \quad z(t)=t$

  3. Differentials ($d\vec{r}$): $\vec{r}'(t) = \langle -\sin t, \cos t, 1 \rangle$.

    $d\vec{r} = \langle -\sin t, \cos t, 1 \rangle\,dt$.

  4. $\vec{F}$ along $C$: Substitute $x,y,z$ in terms of $t$ into $\vec{F}$:

    $\vec{F}(\vec{r}(t)) = \langle z(t), y(t), x(t) \rangle = \langle t, \sin t, \cos t \rangle$.

  5. Dot Product: $\vec{F} \cdot d\vec{r}$

    $\langle t, \sin t, \cos t \rangle \cdot \langle -\sin t, \cos t, 1 \rangle\,dt$

    $= (-t\sin t + \sin t\cos t + \cos t)\,dt$

  6. Integrate: $\displaystyle \int_0^{\pi/2} (-t\sin t + \sin t\cos t + \cos t)\,dt$

    Split into three parts:
    1. $\int_0^{\pi/2} \cos t\,dt = [\sin t]_0^{\pi/2} = 1-0 = 1$.
    2. $\int_0^{\pi/2} \sin t\cos t\,dt = \int_0^{\pi/2} \frac{1}{2}\sin(2t)\,dt = \left[-\frac{1}{4}\cos(2t)\right]_0^{\pi/2} = -\frac{1}{4}(\cos\pi - \cos 0) = -\frac{1}{4}(-1 - 1) = \frac{1}{2}$.
    3. $\int_0^{\pi/2} -t\sin t\,dt$: Use Integration by Parts. Let $u=-t, dv=\sin t\,dt$. Then $du=-dt, v=-\cos t$.
    $\int u\,dv = uv - \int v\,du = [-t(-\cos t)]_0^{\pi/2} - \int_0^{\pi/2} (-\cos t)(-dt)$
    $= [t\cos t]_0^{\pi/2} - \int_0^{\pi/2} \cos t\,dt = (\frac{\pi}{2}\cos\frac{\pi}{2} - 0) - [\sin t]_0^{\pi/2} = (0) - (1-0) = -1$.

    Total: $1 + \frac{1}{2} + (-1) = \boxed{\frac{1}{2}}$.