Math graphic
📐 Concept diagram

07-05 — Line Integrals

Phase: 7 — Calculus IV: Vector Calculus Subject: 07-05 Prerequisites: 07-04 — Vector Fields, parametric curves (Phase 5), single-variable integration (Phase 4) Next subject: 07-06 — Green's Theorem


Learning Objectives

By the end of this subject, you will be able to:

  1. Compute scalar line integrals ∫_C f ds for functions along curves, representing arc length, mass of a wire, or other accumulated quantities
  2. Compute vector line integrals ∫_C F · dr representing work done by a force field along a path
  3. Parametrize curves in 2D and 3D and express line integrals in terms of the parameter t
  4. Apply the Fundamental Theorem of Line Integrals (FTLI) to evaluate line integrals of conservative vector fields effortlessly
  5. Determine path independence and recognize when a line integral depends only on the endpoints

Core Content

1. Scalar Line Integrals (with respect to arc length)

⚠️ CRITICAL FOUNDATION: Line integrals ∫_C F · dr compute work done by a force along a path. The Fundamental Theorem of Line Integrals (FTLI) says that for conservative fields, the integral depends only on endpoints: ∫_C ∇f · dr = f(end) - f(start).

Given a scalar function f(x, y) and a curve C, the scalar line integral is:

$∫_C f(x, y) ds
$

Where ds is the arc length element.

Interpretation: - If f = 1: ∫_C 1 ds = arc length of C - If f is density of a wire: ∫_C f ds = mass of the wire - If f is height above xy-plane, ∫_C f ds = area of the "curtain" above C

Computation: Parametrize the curve C as r(t) = ⟨x(t), y(t)⟩ for t ∈ [a, b]. Then:

$ds = |r'(t)| dt = √(x'(t)² + y'(t)²) dt

∫_C f(x, y) ds = ∫_a^b f(x(t), y(t)) · √(x'(t)² + y'(t)²) dt
$

For 3D curves: r(t) = ⟨x(t), y(t), z(t)⟩.

$ds = √(x'(t)² + y'(t)² + z'(t)²) dt
$

Example 1: Evaluate ∫_C (x + y) ds where C is the line segment from (0, 0) to (1, 2).

$Parametrize: r(t) = ⟨t, 2t⟩, t ∈ [0, 1].
r'(t) = ⟨1, 2⟩. |r'(t)| = √(1 + 4) = √5.
x(t) + y(t) = t + 2t = 3t.

∫_C (x+y) ds = ∫₀¹ 3t · √5 dt = 3√5 [t²/2]₀¹ = (3√5)/2.
$

Example 2: Find the mass of a wire in the shape of the helix r(t) = ⟨cos t, sin t, t⟩ for t ∈ [0, 4π] with density f(x, y, z) = x² + y² + z.

$r'(t) = ⟨−sin t, cos t, 1⟩. |r'(t)| = √(sin²t + cos²t + 1) = √2.
f = cos²t + sin²t + t = 1 + t.

Mass = ∫₀^{4π} (1 + t)√2 dt = √2 [t + t²/2]₀^{4π}
= √2 (4π + 8π²) = 4√2 π(1 + 2π).
$

2. Vector Line Integrals (Work Integrals)

Given a vector field F and a curve C, the vector line integral is:

$∫_C F · dr = ∫_C P dx + Q dy   (2D)
∫_C F · dr = ∫_C P dx + Q dy + R dz   (3D)
$

Interpretation: If F is a force field, ∫_C F · dr is the work done by F in moving a particle along C.

Computation: Parametrize C as r(t) for t ∈ [a, b]. Then dr = r'(t) dt, and:

$∫_C F · dr = ∫_a^b F(r(t)) · r'(t) dt
$

In 2D component form:

$∫_C P dx + Q dy = ∫_a^b [P(x(t), y(t)) x'(t) + Q(x(t), y(t)) y'(t)] dt
$

Arbitrariness of parametrization: The line integral ∫_C F · dr depends on the orientation (direction) of C. Reversing the direction changes the sign. But it does NOT depend on the particular parametrization (as long as orientation is preserved).

Example 3: Find the work done by F(x, y) = ⟨x², −xy⟩ along the quarter-circle x² + y² = 4 from (2, 0) to (0, 2).

$Parametrize: r(t) = ⟨2 cos t, 2 sin t⟩, t ∈ [0, π/2].
r'(t) = ⟨−2 sin t, 2 cos t⟩.

F(r(t)) = ⟨4 cos²t, −4 cos t sin t⟩.

F · r' = (4 cos²t)(−2 sin t) + (−4 cos t sin t)(2 cos t)
       = −8 cos²t sin t − 8 cos²t sin t = −16 cos²t sin t.

Work = ∫₀^{π/2} −16 cos²t sin t dt.
Let u = cos t, du = −sin t dt. Limits: t=0→u=1, t=π/2→u=0.
= ∫₁⁰ −16 u² (−du) = ∫₁⁰ 16u² du = [16u³/3]₁⁰ = 0 − 16/3 = −16/3.

The negative work means the field opposes the motion (on net).
$

3. The Fundamental Theorem of Line Integrals (FTLI)

Theorem: If F is a conservative vector field with potential function φ (i.e., F = ∇φ) and C is a smooth curve from point A to point B, then:

$∫_C F · dr = φ(B) − φ(A)
$

The line integral depends ONLY on the endpoints, not on the path. This is the multi-dimensional analog of the Fundamental Theorem of Calculus.

Proof sketch:

$∫_C ∇φ · dr = ∫_a^b ∇φ(r(t)) · r'(t) dt
            = ∫_a^b (d/dt)[φ(r(t))] dt    (chain rule!)
            = φ(r(b)) − φ(r(a))
            = φ(B) − φ(A)
$

Consequences: 1. ∫_C F · dr is path-independent for conservative fields 2. ∮_C F · dr = 0 for any closed curve C (since φ(B) = φ(A)) 3. If F is conservative, you never need to parametrize — just find φ and evaluate at endpoints

Example 4: Evaluate ∫_C F · dr where F(x, y) = ⟨2xy, x²⟩ from (0, 0) to (1, 2) along any path.

$Check: ∂P/∂y = 2x, ∂Q/∂x = 2x. Conservative!
Find φ: φ = ∫ 2xy dx = x²y + g(y).
∂φ/∂y = x² + g'(y) = x² → g'(y) = 0 → g(y) = C.
φ = x²y + C.

∫_C F · dr = φ(1, 2) − φ(0, 0) = 1²·2 − 0 = 2.

No parametrization needed! The answer is 2 regardless of path.
$

4. Path Independence

A line integral ∫_C F · dr is path-independent if it depends only on the endpoints of C.

Equivalently (on a connected domain): - F is conservative (∃ φ with F = ∇φ) - ∮_C F · dr = 0 for all closed curves C - The cross-partial condition holds and the domain is simply connected

Example 5 — Verifying path independence: Compute ∫_C ⟨y, x⟩ · dr from (0, 0) to (1, 1) along two different paths and verify they match.

$Path 1: Straight line r(t) = ⟨t, t⟩, t ∈ [0, 1].
r'(t) = ⟨1, 1⟩. F(r(t)) = ⟨t, t⟩. F·r' = t + t = 2t.
∫₀¹ 2t dt = [t²]₀¹ = 1.

Path 2: Parabola y = x². r(t) = ⟨t, t²⟩, t ∈ [0, 1].
r'(t) = ⟨1, 2t⟩. F(r(t)) = ⟨t², t⟩. F·r' = t² + 2t² = 3t².
∫₀¹ 3t² dt = [t³]₀¹ = 1. ✓

φ = xy, so φ(1,1) − φ(0,0) = 1 − 0 = 1. ✓
$

5. Connecting Notation: P dx + Q dy

The expression P dx + Q dy is called a differential form. If F = ⟨P, Q⟩ is conservative (F = ∇φ), then:

$P dx + Q dy = (∂φ/∂x) dx + (∂φ/∂y) dy = dφ   (the exact differential of φ)
$

A differential form P dx + Q dy is exact if it equals dφ for some φ. The condition ∂P/∂y = ∂Q/∂x is necessary (and on simply-connected domains, sufficient) for exactness.

Common Misconceptions

  1. "Line integrals always require parametrization." Only if the field is non-conservative. For conservative fields, use FTLI.

  2. "The line integral depends on which parametrization you use." It depends on orientation (reversing flips sign), but any parametrization preserving orientation gives the same value.

  3. "∮ F·dr = 0 means F is conservative everywhere." It must be zero for ALL closed curves, not just some. A field can have zero circulation around some loops but not others if the domain has holes.

  4. "Scalar and vector line integrals are the same." Scalar: ∫ f ds (no direction, ds = |r'|dt). Vector: ∫ F·dr (direction matters, dr = r' dt, no absolute value).



Key Terms

Worked Examples

Example 1: Scalar Line Integral — Mass of a Wire

Problem: A wire is bent into a semicircle y = √(1 − x²) from (−1, 0) to (1, 0). The linear density is ρ(x, y) = x². Find its mass.

Solution:

$Parametrize: r(t) = ⟨cos t, sin t⟩, t ∈ [0, π].
r'(t) = ⟨−sin t, cos t⟩. |r'(t)| = √(sin²t + cos²t) = 1.
ρ(x(t), y(t)) = cos²t.

Mass = ∫_C x² ds = ∫₀^π cos²t · 1 dt = ∫₀^π (1 + cos 2t)/2 dt
= [t/2 + sin(2t)/4]₀^π = π/2 + 0 = π/2.
$

Example 2: Vector Line Integral — Work

Problem: Evaluate ∫_C F · dr where F(x, y) = ⟨x²y, xy²⟩ and C is the triangle from (0,0) to (1,0) to (0,1) back to (0,0).

Solution:

C consists of three segments. Let's compute each.

C₁: from (0,0) to (1,0). r(t) = ⟨t, 0⟩, t ∈ [0, 1].
r'(t) = ⟨1, 0⟩. F = ⟨t²·0, t·0⟩ = ⟨0, 0⟩.
∫_C₁ F·dr = 0.

C₂: from (1,0) to (0,1). r(t) = ⟨1−t, t⟩, t ∈ [0, 1].
r'(t) = ⟨−1, 1⟩.
F = ⟨(1−t)²t, (1−t)t²⟩ = ⟨t(1−t)², t²(1−t)⟩.
F·r' = −t(1−t)² + t²(1−t) = (1−t)[−t(1−t) + t²] = (1−t)[−t + t² + t²]
     = (1−t)(2t² − t) = (2t² − t) − (2t³ − t²) = −2t³ + 3t² − t.
∫₀¹ (−2t³ + 3t² − t) dt = [−t⁴/2 + t³ − t²/2]₀¹ = −1/2 + 1 − 1/2 = 0.

C₃: from (0,1) to (0,0). r(t) = ⟨0, 1−t⟩, t ∈ [0, 1].
r'(t) = ⟨0, −1⟩. F = ⟨0, 0⟩ (since x=0).
∫_C₃ F·dr = 0.

Total: 0 + 0 + 0 = 0.

Check: is F conservative? P = x²y, Q = xy².
∂P/∂y = x², ∂Q/∂x = y². Not equal (unless x² = y²). Not conservative.
But work around this triangle is still 0 — that doesn't mean the field is conservative;
it means this particular closed path happens to have zero circulation. To be conservative,
work must be zero for ALL closed paths.

Example 3: FTLI Application

Problem: Evaluate ∫_C (2x + y) dx + (x + 2y) dy from (1, 0) to (0, 1) along any path.

Solution:

$P = 2x + y, Q = x + 2y.
∂P/∂y = 1, ∂Q/∂x = 1. Conservative!

Find φ:
φ = ∫ (2x + y) dx = x² + xy + g(y).
∂φ/∂y = x + g'(y) = x + 2y → g'(y) = 2y → g(y) = y² + C.
φ = x² + xy + y² + C.

By FTLI: ∫_C F·dr = φ(0, 1) − φ(1, 0) = (0+0+1) − (1+0+0) = 1 − 1 = 0.

So the integral is 0 regardless of path.
$

Quiz

Q1: The line integral ∫_C F · dr computes:

A) The arc length of the curve C B) The work done by the force field F along the curve C C) The area under the curve C D) The flux of F across C

Correct: B)


Q2: To evaluate ∫_C F · dr, you parametrize C as r(t) for a ≤ t ≤ b and compute:

A) ∫_a^b F(r(t)) dt B) ∫_a^b F(r(t)) · r′(t) dt C) ∫_a^b F(r(t)) · r(t) dt D) ∫_a^b ‖F(r(t))‖ ‖r′(t)‖ dt

Correct: B)


Q3: The Fundamental Theorem of Line Integrals states that if F = ∇f, then:

A) ∫_C F · dr = 0 for all curves B) ∫_C F · dr = f(r(b)) − f(r(a)) C) ∫_C F · dr = f(r(a)) + f(r(b)) D) ∫_C F · dr = ‖∇f‖ · length(C)

Correct: B)


Q4: Which of the following implies that ∫_C F · dr is independent of the path between two points?

A) F is continuous B) F has constant magnitude C) F is conservative (F = ∇f) D) The curve C is a straight line

Correct: C)


Q5: For F = ⟨y, x⟩, evaluate ∫_C F · dr where C is the line segment from (0, 0) to (1, 1).

A) 0 B) 1 C) 2 D) √2

Correct: B)


Q6: The scalar line integral ∫_C f(x, y) ds (with respect to arc length) uses:

A) ds = dt B) ds = ‖r′(t)‖ dt C) ds = r′(t) dt D) ds = ‖r(t)‖ dt

Correct: B)


Practice Problems

(Answers are below. Try each problem before checking.)

Problem 1: Evaluate ∫_C xy ds where C is the line segment from (0, 0) to (1, 1).

Problem 2: Find the work done by F(x, y) = ⟨x, y⟩ along the parabola y = x² from (0, 0) to (1, 1).

Problem 3: Evaluate ∫_C (x² dx + y² dy) where C is the arc of the circle x² + y² = 4 from (2, 0) to (0, 2). Is this field conservative? Can you use FTLI?

Problem 4: For F(x, y) = ⟨e^x cos y, −e^x sin y⟩, verify it is conservative, find φ, and evaluate ∫_C F·dr along any path from (0, 0) to (1, π/2).

Problem 5: Compute the arc length of the helix r(t) = ⟨cos t, sin t, t⟩ from t = 0 to t = 2π.

Problem 6: Evaluate ∮_C (y dx − x dy) where C is the unit circle x² + y² = 1 traversed counterclockwise.

Problem 7: For F(x, y) = ⟨x², xy⟩, compute ∫_C F·dr along the line segment from (0,0) to (1,1) and along the path r(t) = ⟨t², t⟩ from t=0 to t=1. Are they equal? Why or why not?

Answers (click to expand) **Problem 1:** C: r(t) = ⟨t, t⟩, t ∈ [0, 1]. r'(t) = ⟨1, 1⟩. |r'| = √2. f = t·t = t². ∫₀¹ t² √2 dt = √2 [t³/3]₀¹ = √2/3. **Problem 2:** r(t) = ⟨t, t²⟩, t ∈ [0, 1]. r'(t) = ⟨1, 2t⟩. F(r(t)) = ⟨t, t²⟩. F·r' = t·1 + t²·2t = t + 2t³. Work = ∫₀¹ (t + 2t³) dt = [t²/2 + t⁴/2]₀¹ = 1/2 + 1/2 = 1. (Check with FTLI: F = ⟨x,y⟩ = ∇(x²/2 + y²/2). φ(1,1) − φ(0,0) = (1/2+1/2) − 0 = 1. ✓) **Problem 3:** C: r(t) = ⟨2 cos t, 2 sin t⟩, t ∈ [0, π/2]. r'(t) = ⟨−2 sin t, 2 cos t⟩. F = ⟨(2 cos t)², (2 sin t)²⟩ = ⟨4 cos²t, 4 sin²t⟩. F·r' = −8 cos²t sin t + 8 sin²t cos t = 8 cos t sin t(sin t − cos t). This is messy. FTLI approach: F = ⟨x², y²⟩. ∂P/∂y = 0, ∂Q/∂x = 0. Conservative! φ = x³/3 + y³/3. φ(0,2) − φ(2,0) = 8/3 − 8/3 = 0. **Problem 4:** P = e^x cos y, Q = −e^x sin y. ∂P/∂y = −e^x sin y, ∂Q/∂x = −e^x sin y. Equal → conservative. φ = ∫ e^x cos y dx = e^x cos y + g(y). ∂φ/∂y = −e^x sin y + g'(y) = −e^x sin y → g'(y) = 0 → g(y) = C. φ = e^x cos y + C. ∫_C F·dr = φ(1, π/2) − φ(0, 0) = e¹ cos(π/2) − e⁰ cos(0) = e·0 − 1·1 = −1. **Problem 5:** r'(t) = ⟨−sin t, cos t, 1⟩. |r'(t)| = √(sin²t + cos²t + 1) = √2. Arc length = ∫₀^{2π} √2 dt = 2π√2. **Problem 6:** C: r(t) = ⟨cos t, sin t⟩, t ∈ [0, 2π]. r'(t) = ⟨−sin t, cos t⟩. F(r(t)) = ⟨sin t, −cos t⟩ (since y=sin t, x=cos t). F·r' = (sin t)(−sin t) + (−cos t)(cos t) = −sin²t − cos²t = −1. ∮ = ∫₀^{2π} (−1) dt = −2π. (Note: F = ⟨y, −x⟩. ∂P/∂y = 1, ∂Q/∂x = −1. Not conservative, so nonzero circulation is expected.) **Problem 7:** Path 1: r(t) = ⟨t, t⟩, t ∈ [0, 1]. r' = ⟨1, 1⟩. F = ⟨t², t²⟩. F·r' = 2t². ∫₀¹ 2t² dt = 2/3. Path 2: r(t) = ⟨t², t⟩, t ∈ [0, 1]. r' = ⟨2t, 1⟩. F = ⟨t⁴, t³⟩. F·r' = 2t⁵ + t³. ∫₀¹ (2t⁵ + t³) dt = [t⁶/3 + t⁴/4]₀¹ = 1/3 + 1/4 = 7/12. 2/3 ≠ 7/12. They are NOT equal because F is not conservative: ∂P/∂y = ∂(x²)/∂y = 0, ∂Q/∂x = ∂(xy)/∂x = y. 0 ≠ y (unless y = 0).

Summary

  1. Scalar line integrals ∫_C f ds accumulate scalar quantities (mass, arc length) along a curve and are computed using ds = |r'(t)| dt — they do not depend on the orientation of C
  2. Vector line integrals ∫_C F · dr compute work done by a force field along a path and depend on orientation (direction) of C; they are evaluated by parametrizing and computing ∫ F(r(t)) · r'(t) dt
  3. The Fundamental Theorem of Line Integrals states that for conservative fields F = ∇φ, the line integral equals φ(endpoint) − φ(startpoint), making path parametrization unnecessary
  4. A vector field is conservative if and only if its line integral around every closed curve is zero; in 2D on simply-connected domains, the test ∂P/∂y = ∂Q/∂x is necessary and sufficient
  5. The notation P dx + Q dy represents a differential 1-form; it is exact (equals dφ) precisely when the corresponding vector field is conservative

Pitfalls

  1. Forgetting ds = |r'(t)| dt for scalar integrals. In scalar line integrals ∫_C f ds, the arc-length element ds uses the magnitude of r'(t). Using r'(t) without the absolute value (as in vector integrals) gives the wrong answer.

  2. Assuming a field is conservative just because ∂P/∂y = ∂Q/∂x. The cross-partial equality is sufficient only on simply-connected domains. On domains with holes (like an annulus), a field can pass the cross-partial test yet still have nonzero circulation around the hole — the classic counterexample is ⟨−y, x⟩/(x² + y²).

  3. Confusing scalar and vector line integral notation. ∫_C f ds (scalar) does not depend on orientation, while ∫_C F · dr (vector) flips sign when the curve is reversed. Mixing up ds = |r'(t)| dt with dr = r'(t) dt is a common source of algebraic errors.

  4. Using FTLI on non-conservative fields. The Fundamental Theorem of Line Integrals only applies when F = ∇φ. Always verify conservativity (via the cross-partial test on a simply-connected domain, or by finding a potential φ) before using the endpoint formula φ(B) − φ(A).

  5. Neglecting to check orientation when choosing a parametrization. The line integral ∫_C F · dr depends on direction. If the problem specifies a particular orientation and your parametrization produces the opposite direction, the result will have the wrong sign. Always verify your parametrization matches the specified orientation.



Next Steps

Move on to 07-06 — Green's Theorem to discover the beautiful relationship between line integrals around closed curves and double integrals over the enclosed region — the 2D analog of the Fundamental Theorem of Calculus and a gateway to the deeper theorems of vector calculus.