Line Integrals
A line integral adds up a quantity along a curve C instead of along an interval. There are two kinds. The scalar line integral ∫C f ds adds f times arc length, giving things like the mass of a wire. The vector line integral ∫C F · dr adds the part of a vector field along the curve, giving the work done by a force.
Before this lesson: Vector Fields, Vector Functions and Space Curves and Arc Length of a Space Curve
What a line integral measures
Cut the curve C into many tiny pieces. For a scalar line integral, multiply the value of f on each piece by the piece’s length ds, then add. If f is the density of a wire in grams per centimeter, the total is the mass of the wire.
For a vector line integral, F is a force and dr is a tiny step along the curve. The dot product F · dr keeps only the part of the force that points along the step. Adding these gives the work done by F on an object that moves along C. A force pushing with the motion does positive work; a force pushing against it does negative work.
Line integral formulas
Describe C with a vector function r(t) = ⟨x(t), y(t)⟩ or ⟨x(t), y(t), z(t)⟩, for a ≤ t ≤ b. Then ds = |r′(t)| dt and dr = r′(t) dt.
\int_C f\,ds = \int_a^b f\big(\mathbf{r}(t)\big)\,|\mathbf{r}'(t)|\,dt\int_C \mathbf{F} \cdot d\mathbf{r} = \int_a^b \mathbf{F}\big(\mathbf{r}(t)\big) \cdot \mathbf{r}'(t)\,dt = \int_C P\,dx + Q\,dy- Parametrize the curve: write r(t) and the interval a ≤ t ≤ b, going in the given direction.
- Find r′(t). For f ds, also find |r′(t)|.
- Substitute x(t), y(t) (and z(t)) into f or F.
- Multiply by |r′(t)| or dot with r′(t), then integrate from a to b.
Common parametrizations: the segment from point A to point B is r(t) = A + t(B − A), 0 ≤ t ≤ 1. The circle of radius a, counterclockwise, is r(t) = ⟨a cos t, a sin t⟩, 0 ≤ t ≤ 2π. The graph y = g(x) is r(t) = ⟨t, g(t)⟩.
Line integrals examples
Example 1: A scalar line integral along a segment
Evaluate \int_C (x + y)\,ds, where C is the segment from (0, 0) to (3, 4).
\mathbf{r}(t) = \langle 3t, 4t \rangle, \quad 0 \le t \le 1Parametrize the segment: A + t(B − A).
\mathbf{r}'(t) = \langle 3, 4 \rangleDifferentiate.
|\mathbf{r}'(t)| = \sqrt{9 + 16} = 5Find the speed.
x + y = 3t + 4t = 7t
Substitute x(t) and y(t).
\int_C (x + y)\,ds = \int_0^1 7t \cdot 5\,dt
Set up: f times |r′(t)|.
= \Big[\dfrac{35t^2}{2}\Big]_0^1 = \dfrac{35}{2}Integrate and substitute.
Answer: 35/2 = 17.5. Check: the segment has length 5 and the average value of x + y on it is 3.5, and 5 × 3.5 = 17.5.
Example 2: A scalar line integral on a semicircle
Evaluate \int_C x^2\,ds, where C is the upper half of the unit circle.
\mathbf{r}(t) = \langle \cos t, \sin t \rangle, \quad 0 \le t \le \piParametrize the upper half.
|\mathbf{r}'(t)| = \sqrt{\sin^2 t + \cos^2 t} = 1Find the speed: r′(t) = ⟨−sin t, cos t⟩.
\int_C x^2\,ds = \int_0^{\pi} \cos^2 t\,dtSubstitute x = cos t and ds = 1 dt.
= \int_0^{\pi} \dfrac{1 + \cos 2t}{2}\,dtUse the power-reducing identity (see half-angle formulas).
= \Big[\dfrac{t}{2} + \dfrac{\sin 2t}{4}\Big]_0^{\pi}Integrate.
= \dfrac{\pi}{2}Substitute: sin 2π = sin 0 = 0.
Answer: π/2 ≈ 1.571.
Example 3: Work along a parabola
Evaluate \int_C \mathbf{F} \cdot d\mathbf{r}, where F(x, y) = ⟨y, x²⟩ and C is the parabola y = x² from (0, 0) to (1, 1).
\mathbf{r}(t) = \langle t, t^2 \rangle, \quad 0 \le t \le 1Parametrize the graph with x = t.
\mathbf{r}'(t) = \langle 1, 2t \rangleDifferentiate.
\mathbf{F}\big(\mathbf{r}(t)\big) = \langle t^2, t^2 \rangleSubstitute: y = t² and x² = t².
\mathbf{F} \cdot \mathbf{r}'(t) = t^2(1) + t^2(2t)Take the dot product.
= t^2 + 2t^3
Multiply.
\int_0^1 (t^2 + 2t^3)\,dt = \Big[\dfrac{t^3}{3} + \dfrac{t^4}{2}\Big]_0^1Integrate.
= \dfrac{1}{3} + \dfrac{1}{2} = \dfrac{5}{6}Substitute and add.
Answer: 5/6.
Example 4: Circulation around a circle
Find the work done by F(x, y) = ⟨−y, x⟩ on a particle that moves once counterclockwise around the circle x² + y² = 4.
\mathbf{r}(t) = \langle 2\cos t, 2\sin t \rangle, \quad 0 \le t \le 2\piParametrize the circle counterclockwise.
\mathbf{r}'(t) = \langle -2\sin t, 2\cos t \rangleDifferentiate.
\mathbf{F}\big(\mathbf{r}(t)\big) = \langle -2\sin t, 2\cos t \rangleSubstitute: −y = −2 sin t and x = 2 cos t.
\mathbf{F} \cdot \mathbf{r}'(t) = 4\sin^2 t + 4\cos^2 tTake the dot product.
= 4
Use sin² t + cos² t = 1.
W = \int_0^{2\pi} 4\,dt = 8\piIntegrate.
Answer: W = 8π ≈ 25.13. The field swirls counterclockwise, the same way the particle moves, so it helps the motion all the way around. Going clockwise would give −8π.
Example 5: Work on a bead along a twisted wire
A bead slides along a wire shaped like r(t) = ⟨t, t², t³⟩ for 0 ≤ t ≤ 1, with distances in meters. A force F(x, y, z) = ⟨y, z, x⟩ newtons acts on it. Find the work done by the force.
\mathbf{r}'(t) = \langle 1, 2t, 3t^2 \rangleDifferentiate.
\mathbf{F}\big(\mathbf{r}(t)\big) = \langle t^2, t^3, t \rangleSubstitute: y = t², z = t³, x = t.
\mathbf{F} \cdot \mathbf{r}'(t) = t^2 + 2t^4 + 3t^3Take the dot product: t²(1) + t³(2t) + t(3t²).
W = \int_0^1 (t^2 + 3t^3 + 2t^4)\,dt
Set up the work integral.
= \dfrac{1}{3} + \dfrac{3}{4} + \dfrac{2}{5}Integrate each term and substitute t = 1.
= \dfrac{20 + 45 + 24}{60} = \dfrac{89}{60}Add over the common denominator 60.
Answer: W = 89/60 ≈ 1.48 joules.
Common mistakes
| Mistake | Example of the error | Fix |
|---|---|---|
| Leaving out |r′(t)| in f ds | Writing ∫ 7t dt in Example 1 and getting 7/2 | ds = |r′(t)| dt. Here |r′(t)| = 5. |
| Using |r′(t)| in F · dr | Multiplying F by the speed instead of taking a dot product | dr = r′(t) dt, so dot F with the vector r′(t). |
| Ignoring direction | Going clockwise in Example 4 and still reporting 8π | Reversing C changes the sign of ∫ F · dr (but not of ∫ f ds). |
| Differentiating a component wrong | Using r′(t) = ⟨1, t²⟩ for r(t) = ⟨t, t²⟩ | Differentiate each component: r′(t) = ⟨1, 2t⟩. |
| Wrong t-interval | Using 0 ≤ t ≤ 2π for the upper semicircle | The upper half of the circle is 0 ≤ t ≤ π. |
Related methods
The differential form P dx + Q dy
Line integrals are often written ∫C P dx + Q dy. Substitute dx = x′(t) dt and dy = y′(t) dt. This is the same integral as ∫C F · dr with F = ⟨P, Q⟩.
Path independence
For most fields, the value of ∫ F · dr depends on the path, not just on its endpoints. For gradient fields it doesn’t: then ∫C ∇f · dr = f(end) − f(start). That shortcut is the fundamental theorem for line integrals, in the next lesson.
Piecewise curves
If C is made of several smooth pieces, such as the sides of a triangle, parametrize each piece separately and add the results.
Practice problems
- Evaluate \int_C y\,ds, where C is the segment from (0, 0) to (6, 8).
- Evaluate \int_C xy\,ds, where C is the quarter of the circle x² + y² = 4 in the first quadrant.
- Evaluate \int_C \mathbf{F} \cdot d\mathbf{r}, where F = ⟨x, y⟩ and C is r(t) = ⟨t, t²⟩, 0 ≤ t ≤ 2.
- Evaluate \int_C y\,dx + x\,dy, where C is the segment from (0, 0) to (2, 3).
- Find the work done by F = ⟨y, −x⟩ once counterclockwise around the unit circle.
- Evaluate \int_C (x^2 + y^2 + z^2)\,ds, where C is the helix r(t) = ⟨cos t, sin t, t⟩, 0 ≤ t ≤ 2π.
- A thin wire lies along the upper half of the circle x² + y² = 9, in centimeters. Its density is δ(x, y) = y grams per centimeter. Find its mass.
- If ∫C F · dr = 5 and ∫C f ds = 7, find both integrals along −C, the same curve traced backward.
- Evaluate ∫C F · dr for F = ⟨y², xy⟩ from (0, 0) to (1, 1) along (a) the line y = x and (b) the parabola y = x².
- A drone with weight force F = ⟨0, 0, −19.6⟩ newtons flies along r(t) = ⟨4t, 3t, 10t⟩, 0 ≤ t ≤ 1, in meters. Find the work done by gravity.
Show answers
1.
\mathbf{r}(t) = \langle 6t, 8t \rangle, \quad |\mathbf{r}'(t)| = \sqrt{36 + 64} = 10Parametrize the segment and find the speed.
\int_0^1 8t \cdot 10\,dt = \Big[40t^2\Big]_0^1 = 40
Substitute y = 8t and integrate.
Answer: 40
2.
\mathbf{r}(t) = \langle 2\cos t, 2\sin t \rangle, \quad 0 \le t \le \dfrac{\pi}{2}, \quad |\mathbf{r}'(t)| = 2Parametrize the quarter circle.
\int_0^{\pi/2} 4\cos t\sin t \cdot 2\,dt = 8\int_0^{\pi/2} \sin t\cos t\,dtSubstitute xy = 4 cos t sin t.
= 8 \cdot \Big[\dfrac{\sin^2 t}{2}\Big]_0^{\pi/2} = 4Integrate with u-substitution, u = sin t.
Answer: 4
3.
\mathbf{F} \cdot \mathbf{r}'(t) = \langle t, t^2 \rangle \cdot \langle 1, 2t \rangle = t + 2t^3Substitute and take the dot product.
\int_0^2 (t + 2t^3)\,dt = \Big[\dfrac{t^2}{2} + \dfrac{t^4}{2}\Big]_0^2 = 2 + 8 = 10Integrate and substitute t = 2.
Answer: 10
4.
x = 2t, \; y = 3t, \; dx = 2\,dt, \; dy = 3\,dt
Parametrize the segment, 0 ≤ t ≤ 1.
y\,dx + x\,dy = 3t(2\,dt) + 2t(3\,dt) = 12t\,dt
Substitute and combine like terms.
\int_0^1 12t\,dt = 6
Integrate.
Answer: 6
5.
\mathbf{F} \cdot \mathbf{r}'(t) = \langle \sin t, -\cos t \rangle \cdot \langle -\sin t, \cos t \rangleUse r(t) = ⟨cos t, sin t⟩, 0 ≤ t ≤ 2π.
= -\sin^2 t - \cos^2 t = -1
Take the dot product and use sin² t + cos² t = 1.
W = \int_0^{2\pi} (-1)\,dt = -2\piIntegrate.
Answer: −2π ≈ −6.28. This field swirls clockwise, against the motion.
6.
|\mathbf{r}'(t)| = |\langle -\sin t, \cos t, 1 \rangle| = \sqrt{2}Find the speed.
x^2 + y^2 + z^2 = \cos^2 t + \sin^2 t + t^2 = 1 + t^2
Substitute.
\int_0^{2\pi} (1 + t^2)\sqrt{2}\,dt = \sqrt{2}\Big[t + \dfrac{t^3}{3}\Big]_0^{2\pi}Set up and integrate.
= \sqrt{2}\Big(2\pi + \dfrac{8\pi^3}{3}\Big) \approx 125.82Substitute t = 2π: (2π)³ = 8π³.
Answer: √2 (2π + 8π³/3) ≈ 125.82
7.
\mathbf{r}(t) = \langle 3\cos t, 3\sin t \rangle, \quad 0 \le t \le \pi, \quad |\mathbf{r}'(t)| = 3Parametrize the upper half.
m = \int_0^{\pi} 3\sin t \cdot 3\,dt = 9\Big[-\cos t\Big]_0^{\pi}Mass = ∫ δ ds.
= 9(1 + 1) = 18
Substitute.
Answer: 18 g
8.
\int_{-C} \mathbf{F} \cdot d\mathbf{r} = -\int_C \mathbf{F} \cdot d\mathbf{r} = -5Reversing the direction flips the sign of the work.
\int_{-C} f\,ds = \int_C f\,ds = 7Arc length ds is always positive, so f ds doesn’t change.
Answer: −5 and 7
9.
(a)\; \mathbf{r} = \langle t, t \rangle: \; \int_0^1 (t^2 \cdot 1 + t^2 \cdot 1)\,dt = \dfrac{2}{3}On y = x, F = ⟨t², t²⟩ and r′ = ⟨1, 1⟩.
(b)\; \mathbf{r} = \langle t, t^2 \rangle: \; \int_0^1 (t^4 \cdot 1 + t^3 \cdot 2t)\,dt = \int_0^1 3t^4\,dt = \dfrac{3}{5}On y = x², F = ⟨t⁴, t³⟩ and r′ = ⟨1, 2t⟩.
Answer: (a) 2/3; (b) 3/5. Different paths with the same endpoints give different values here.
10.
\mathbf{F} \cdot \mathbf{r}'(t) = \langle 0, 0, -19.6 \rangle \cdot \langle 4, 3, 10 \rangle = -196Take the dot product: only the z-parts multiply to a nonzero number.
W = \int_0^1 (-196)\,dt = -196
Integrate.
Answer: −196 J. Gravity does negative work because the drone climbs 10 m: −19.6 × 10 = −196.
Line integrals FAQ
What is the difference between ds and dr in a line integral?
ds = |r′(t)| dt is a tiny length, a number. dr = r′(t) dt is a tiny step, a vector. Use ds with a scalar function f, and use dr with a vector field F and a dot product.
Does the direction of the curve matter?
For ∫ F · dr, yes: reversing the curve changes the sign. For ∫ f ds, no: lengths are positive in either direction.
How do you find work with a line integral?
Work is W = ∫C F · dr. Parametrize the path, substitute into F, dot with r′(t) and integrate over the t-interval.
What does a line integral of a scalar function represent?
With f = 1 it is the length of C. With a density f, it is the mass of a wire shaped like C. Dividing by the length gives the average value of f along C.
Summary
- Scalar line integral: ∫C f ds = ∫ f(r(t)) |r′(t)| dt.
- Vector line integral: ∫C F · dr = ∫ F(r(t)) · r′(t) dt = ∫ P dx + Q dy.
- Parametrize C first, in the direction of travel.
- Work = ∫ F · dr. Reversing C changes its sign; ∫ f ds does not change.
- In general, ∫ F · dr depends on the path.
Previous lesson: Vector Fields
Next lesson: Conservative Vector Fields
Back to the Calculus 3 Index