01 / 20

Line Integrals
Scalar Fields

Learn to compute line integrals of scalar functions along curves in space: the foundation of work, mass, and arc-length calculations in multivariable calculus.

Multivariable Calculus

What Is a Line Integral?

A line integral generalizes a definite integral to functions evaluated along a curve rather than along a straight interval. Instead of integrating \( f(x) \) from \( a \) to \( b \) on the \( x \)-axis, we integrate \( f \) along a path \( C \) through space.

Visualizing the Curtain Area

x z Curve C f(x, y) Curtain area

Think of \( \displaystyle\int_C f\, ds \) as the area of the curtain that hangs from the graph of \( f \) down to the curve \( C \) in the \( xy \)-plane. Each vertical strip has height \( f \) and infinitesimal width \( ds \).

Why Line Integrals Matter

Arc Length
Setting \( f = 1 \) gives the length of curve \( C \).
Mass of a Wire
If \( f \) is linear density, the integral gives total mass.
Average Value
Dividing by arc length yields the average of \( f \) along \( C \).

The Formal Definition

The key factor is \( \left\|\mathbf{r}'(t)\right\| \), the speed of the parametrization. It converts the parameter increment \( dt \) into the true arc-length increment \( ds \):

Extension to 3D Curves

For a curve in three dimensions parametrized by \( \mathbf{r}(t) = \langle x(t), y(t), z(t) \rangle \), the formula is identical in structure:

Scalar vs Vector Line Integrals

Scalar Field Vector Field
Integrand \( f(\mathbf{r})\, ds \) \( \mathbf{F} \cdot d\mathbf{r} \)
Measures Accumulation along length Work / circulation
Direction Independent of direction Sign depends on direction
Speed factor \( \|\mathbf{r}'(t)\| \) Built into \( \mathbf{r}'(t) \)
Output Always \( \geq 0 \) (if \( f \geq 0 \)) Can be negative

How to Compute Step by Step

1
Parametrize \( C \). Write \( \mathbf{r}(t) = \langle x(t), y(t) \rangle \) (or with \( z(t) \)) for \( t \in [a, b] \).
2
Compute \( \mathbf{r}'(t) \). Differentiate each component.
3
Find the speed. Compute \( \|\mathbf{r}'(t)\| = \sqrt{x'(t)^2 + y'(t)^2} \).
4
Substitute into \( f \). Replace \( x, y \) with \( x(t), y(t) \) in \( f \).
5
Integrate. Evaluate \( \displaystyle\int_a^b f(\mathbf{r}(t))\,\|\mathbf{r}'(t)\|\, dt \).

Example 1: Line Segment

Problem: Evaluate \( \displaystyle\int_C (x + y)\, ds \), where \( C \) is the segment from \( (0, 0) \) to \( (3, 4) \).

x y 1 2 3 1 2 3 (0,0) (3,4)
1
Parametrize: \( \mathbf{r}(t) = \langle 3t, 4t \rangle \), \( t \in [0, 1] \).
2
Speed: \( \mathbf{r}'(t) = \langle 3, 4 \rangle \), so \( \|\mathbf{r}'(t)\| = \sqrt{9 + 16} = 5 \).
3
Substitute: \( f(\mathbf{r}(t)) = 3t + 4t = 7t \).
4
Integrate: \( \displaystyle\int_0^1 7t \cdot 5\, dt = 35\!\int_0^1 t\, dt = 35 \cdot \tfrac{1}{2} = \frac{35}{2} \).

Example 2: Circular Arc

Problem: Evaluate \( \displaystyle\int_C x^2\, ds \), where \( C \) is the upper semicircle of \( x^2 + y^2 = 4 \) (from \( (2, 0) \) to \( (-2, 0) \)).

x y (2, 0) (-2, 0) r = 2
1
Parametrize: \( \mathbf{r}(t) = \langle 2\cos t, 2\sin t \rangle \), \( t \in [0, \pi] \).
2
Speed: \( \|\mathbf{r}'(t)\| = \sqrt{4\sin^2 t + 4\cos^2 t} = 2 \).
3
Substitute: \( f = (2\cos t)^2 = 4\cos^2 t \).
4
Integrate: \( \displaystyle\int_0^{\pi} 4\cos^2 t \cdot 2\, dt = 8\!\int_0^{\pi}\!\cos^2 t\, dt = 8 \cdot \frac{\pi}{2} = 4\pi \).

Example 3: Parabolic Curve

Problem: Evaluate \( \displaystyle\int_C 2x\, ds \), where \( C \) is the parabola \( y = x^2 \) from \( (0, 0) \) to \( (1, 1) \).

x y (0,0) (1,1) 1 1
1
Parametrize: Let \( x = t \), so \( y = t^2 \), \( t \in [0, 1] \).
2
Speed: \( \|\mathbf{r}'(t)\| = \sqrt{1 + (2t)^2} = \sqrt{1 + 4t^2} \).
3
Substitute: \( f(\mathbf{r}(t)) = 2x = 2t \).
4
Integrate: \( \displaystyle\int_0^1 2t\,\sqrt{1 + 4t^2}\, dt \). Using \( u = 1+4t^2 \), this becomes \( \displaystyle\frac{1}{6}(5\sqrt{5} - 1) \).

Arc Length: The Simplest Case

When you set \( f = 1 \), the line integral becomes the arc-length formula you already know:

This confirms that the line integral of a scalar field is a true generalization of arc length. Every arc-length problem is secretly a line integral with the simplest possible integrand.

Piecewise Smooth Curves

x y (0,0) (2,3) (4,1) C₁ C₂

If \( C \) is made of several smooth pieces \( C_1, C_2, \ldots, C_n \), split the integral:

Average Value Along a Curve

Just as the average of \( f \) on \( [a,b] \) is \( \frac{1}{b-a}\int_a^b f\, dx \), the average of \( f \) along a curve \( C \) is:

Example: From Example 1, \( \int_C (x+y)\, ds = \frac{35}{2} \) and \( L = 5 \). So the average value of \( x + y \) along that segment is \( \frac{35/2}{5} = \frac{7}{2} \).

Common Mistakes

✕ Forgetting \( \|\mathbf{r}'(t)\| \)
Writing \( \int_a^b f(\mathbf{r}(t))\, dt \) without the speed factor. This gives the wrong units and value.
✕ Using \( dx \) instead of \( ds \)
The element \( ds \) accounts for arc length, not just horizontal displacement. They are only equal when \( C \) is a horizontal line.
✕ Wrong parametrization bounds
Mismatching the parameter range. For a semicircle, \( t \in [0, \pi] \), not \( [0, 2\pi] \).

Question 1 of 5

What does the factor \( \|\mathbf{r}'(t)\| \) represent in the line integral formula \( \int_a^b f(\mathbf{r}(t))\,\|\mathbf{r}'(t)\|\, dt \)?

Question 2 of 5

Evaluate \( \displaystyle\int_C 1\, ds \) where \( C \) is the circle \( x^2 + y^2 = 9 \), traversed once.

Question 3 of 5

For the line segment from \( (0,0) \) to \( (1,1) \) with \( f(x,y) = x \), which setup is correct?

Question 4 of 5

True or false: Reversing the direction of traversal along \( C \) changes the sign of \( \displaystyle\int_C f\, ds \) for a scalar field \( f \).

Question 5 of 5

A wire is bent into the shape of \( y = x^2 \) from \( x = 0 \) to \( x = 1 \), with linear density \( \rho(x,y) = 3 \) (constant). What does \( \displaystyle\int_C 3\, ds \) compute?