Multivariable Calculus — Topic 08

Line Integrals
Integrating Along a Curve

A line integral extends ordinary integration from a straight interval to any curved path through space. There are two kinds: scalar line integrals that accumulate a field quantity along the curve, and vector line integrals that measure the total work done by a force field. Both reduce to familiar single-variable integrals once you parametrise the curve.

2Types of Line Integral
10Worked Examples
5SVG Diagrams
10Quiz Questions
Share this page
On This Page
  1. What is a Line Integral?
  2. Parametrising a Curve
  3. Scalar Line Integrals, ∫C f ds
  4. Vector Line Integrals, ∫C F·dr (Work)
  5. Line Integrals in Component Form
  6. Conservative Fields and Path Independence
  7. Fundamental Theorem for Line Integrals
  8. Worked Examples
  9. Common Mistakes
  10. 10-Question Quiz

§ 01What is a Line Integral?

A line integral integrates a function not over a flat interval [a, b] on the number line, but over a curved path C in 2D or 3D space.

Ordinary integration sums up values f(x) along the x-axis. A line integral sums up values along a curve: which might spiral, loop, or wind through three dimensions. To make this tractable, you describe the curve using a parametrisation: a set of equations x = x(t), y = y(t), z = z(t) that trace the curve as t moves from a to b.

There are two fundamentally different kinds, and it is essential to keep them distinct:

Type 1 — Scalar
Scalar Line Integral
C f ds

Integrates a scalar-valued function f(x,y,z) with respect to arc length ds. The result does not depend on the direction you travel along C.

Physical meaning: total mass of a wire with density f, or total arc length when f = 1.

Type 2 — Vector
Vector Line Integral
C F·dr

Integrates a vector field F dotted with the displacement element dr along the curve. The result changes sign if you reverse direction along C.

Physical meaning: work done by force field F on a particle moving along C.

§ 02Parametrising a Curve

Every line integral computation starts by choosing a parametrisation of the curve C. A parametrisation assigns coordinates (x, y) or (x, y, z) to each value of a parameter t ∈ [a, b].

A parametrised curve and its tangent vector r'(t)
x y A t=a B t=b P r'(t) ds C
As t increases, the position vector r(t) = (x(t), y(t)) traces the curve. The tangent vector r'(t) = (x'(t), y'(t)) points in the direction of travel. Its magnitude |r'(t)| is the speed, and ds = |r'(t)| dt is the arc length element.

Common Parametrisations to Memorise

Line segment
A to B
r(t) = (1−t)A + tB,  t ∈ [0,1]. Or component-wise: x = x₀ + t(x₁−x₀), y = y₀ + t(y₁−y₀).
Circle
Radius r, centred at origin
x = r cosθ, y = r sinθ,  θ ∈ [0, 2π]. Counter-clockwise by default.
Graph y = f(x)
x ∈ [a,b]
Use x itself as parameter: x = t, y = f(t),  t ∈ [a,b]. Clean and simple.
Helix
In 3D
x = cosθ, y = sinθ, z = θ/(2π),  θ ∈ [0, 2π]. One complete turn rising one unit.
Ellipse
Semi-axes a, b
x = a cosθ, y = b sinθ,  θ ∈ [0, 2π].
Piecewise curve
C = C₁ ∪ C₂
Parametrise each piece separately and add the integrals: ∫_C = ∫_{C₁} + ∫_{C₂}.
The Arc Length Element ds Given r(t) = (x(t), y(t)) in 2D, the arc length element is:
ds = |r'(t)| dt = √[(dx/dt)² + (dy/dt)²] dt
In 3D: ds = √[(dx/dt)² + (dy/dt)² + (dz/dt)²] dt.  This factor must appear in every scalar line integral.

§ 03Scalar Line Integrals — ∫C f ds

A scalar line integral integrates a real-valued function f(x, y) or f(x, y, z) with respect to arc length along the curve C.

Scalar Line Integral — Definition
C f ds = ∫ab f(x(t), y(t)) · |r'(t)| dt

Substitute the parametrisation into f, then multiply by the speed |r'(t)|. The result is an ordinary definite integral in t.

The 4-Step Method for Scalar Line Integrals

1
Write down the parametrisation r(t) = (x(t), y(t)) for t ∈ [a, b].
2
Compute r'(t) = (x'(t), y'(t)) and the speed |r'(t)| = √(x'² + y'²).
3
Substitute into f: replace x with x(t) and y with y(t) in the formula for f.
4
Evaluate ∫ab f(x(t), y(t)) · |r'(t)| dt using standard integration techniques.

A key property: the scalar line integral is independent of parametrisation direction. Traversing C from B to A gives the same result as from A to B, because |r'(t)| is always positive.

§ 04Vector Line Integrals — ∫C F·dr (Work)

A vector line integral integrates a vector field F = (P, Q) in 2D (or F = (P, Q, R) in 3D) over the curve C by taking the dot product with the displacement element dr.

Vector Line Integral — Definition
C F·dr = ∫ab F(r(t)) · r'(t) dt

Substitute the parametrisation into F, dot with r'(t), and integrate. The dot product selects the component of F tangent to the curve at each point.

Work = component of F along the path
F T F·T C start end
At each point the dot product F·T gives the component of F tangent to the curve — positive if F helps the motion, negative if it opposes it.
Sign of work: positive vs negative contribution
F·dr > 0 F·dr < 0
Where F and the direction of travel agree, F·dr is positive (the field does positive work). Where they oppose, F·dr is negative. The total work is the signed sum.

The 4-Step Method for Vector Line Integrals

1
Parametrise C: write r(t) = (x(t), y(t)) for t ∈ [a, b]. Compute r'(t) = (x'(t), y'(t)).
2
Substitute into F: replace x and y in F(x, y) = (P, Q) with x(t) and y(t) to get F(r(t)).
3
Form the dot product: F(r(t)) · r'(t) = P(x(t),y(t)) · x'(t) + Q(x(t),y(t)) · y'(t).
4
Integrate: ∫ab [P x'(t) + Q y'(t)] dt — an ordinary integral in t.
Direction Matters for Vector Line Integrals If −C denotes the same curve traversed in the opposite direction, then ∫−C F·dr = −∫C F·dr. The sign flips because dr reverses. This is fundamentally different from scalar line integrals, which are independent of direction.

§ 05Line Integrals in Component Form

In practice, vector line integrals are often written in component form using the differential notation dx and dy rather than the dot product. The two notations are completely equivalent.

Component Form — 2D
C P dx + Q dy

Here dx = x'(t) dt and dy = y'(t) dt. Substituting the parametrisation: ∫ab [P(x(t),y(t))x'(t) + Q(x(t),y(t))y'(t)] dt.

This is identical to ∫C F·dr with F = (P, Q).

Component Form — 3D
C P dx + Q dy + R dz

With F = (P, Q, R) and r'(t) = (x'(t), y'(t), z'(t)), this equals ∫ab [Px' + Qy' + Rz'] dt.

Relationship Between the Two Notations

Writing F·dr explicitly: F·dr = (P, Q)·(dx, dy) = P dx + Q dy. Every vector line integral can be expanded into component form, and every component-form integral is a vector line integral. Use whichever form is notationally cleaner for the problem at hand.

§ 06Conservative Fields and Path Independence

For a general vector field F, the value of ∫C F·dr depends on which path C you take between two endpoints: change the path and you change the integral. However, for a special class of fields called conservative fields, the integral depends only on the endpoints, not the path.

Definition — Conservative Field
F is conservative ⟺ F = ∇f for some scalar f

The scalar function f is called the potential function of F. For F = (P, Q) in 2D, this means P = ∂f/∂x and Q = ∂f/∂y.

Testing for a Conservative Field

In 2D, a field F = (P, Q) is conservative on a simply-connected domain if and only if:

Conservative Test — 2D
∂P/∂y = ∂Q/∂x

This is called the curl condition. If the partial derivatives of P with respect to y equals the partial derivative of Q with respect to x everywhere in the domain, then F is conservative.

In 3D, F = (P, Q, R) is conservative if and only if curl F = ∇ × F = 0, which gives three conditions: ∂R/∂y = ∂Q/∂z, ∂P/∂z = ∂R/∂x, and ∂Q/∂x = ∂P/∂y.

Finding the Potential Function

If F is conservative, find f by integrating P with respect to x (treating y as constant), then differentiating with respect to y to match Q and solve for any remaining functions of y.

1
Integrate P with respect to x: f(x,y) = ∫ P dx + g(y), where g(y) is an unknown function of y.
2
Differentiate f with respect to y: ∂f/∂y = [derivative of the x-integral] + g'(y).
3
Set ∂f/∂y = Q and solve for g'(y). If g'(y) is a pure function of y only, integrate to find g(y).
4
Write the full potential: f(x,y) = [result from step 1] + g(y) + C.

§ 07The Fundamental Theorem for Line Integrals

If F is conservative with potential function f, there is a dramatic shortcut: the vector line integral reduces to evaluating f at the two endpoints only.

Fundamental Theorem for Line Integrals
C ∇f · dr = f(B) − f(A)

If C runs from point A to point B and f is a potential function for ∇f, then the integral equals f evaluated at the endpoint B minus f evaluated at the starting point A. The entire path is irrelevant.

Path independence: three paths, one answer
C₁ C₂ C₃ A B ∫C₁ = ∫C₂ = ∫C₃ = f(B)−f(A)
For a conservative field, any path from A to B gives the same integral. You can pick the easiest path — or skip the path entirely and just evaluate the potential function at the endpoints.
Closed Path ⟹ Zero Integral A consequence of the FTLI: if C is a closed curve (it returns to its starting point, so A = B), then ∮C F·dr = f(B) − f(A) = f(A) − f(A) = 0. A vector line integral around any closed path is zero if and only if F is conservative.

§ 08Worked Examples

Example 01 Scalar line integral — arc length of the helix r(t) = (cosт, sinт, t), t ∈ [0, 2π]
Setup

Arc length = ∫C 1 ds = ∫0 |r'(t)| dt. The integral of f = 1 against arc length gives the total length.

r'(t)
r'(t) = (−sinт, cosт, 1)
|r'(t)|
|r'| = √(sin²t + cos²t + 1) = √(1+1) = √2
Integrate
0 √2 dt = 2π√2
Result
Arc length = 2π√2 ≈ 8.886
Example 02 Scalar line integral — ∫C (x + y) ds along y = x² from (0,0) to (1,1)
Parametrise

Use x = t, y = t² for t ∈ [0, 1]. Then dx/dt = 1, dy/dt = 2t.

|r'(t)|
|r'| = √(1² + (2t)²) = √(1 + 4t²)
f on curve
f(x(t), y(t)) = t + t²
Integrate
01 (t + t²) √(1 + 4t²) dt

This requires numerical evaluation (or a trigonometric substitution). Using a CAS or Wolfram Alpha: ≈ 0.6063.

For exam purposes, leaving the answer as ∫01 (t + t²)√(1+4t²) dt is acceptable unless numerical evaluation is specified.

Set-Up Complete
C (x+y) ds = ∫01 (t+t²)√(1+4t²) dt ≈ 0.606
Example 03 Scalar line integral — ∫C xy ds where C is the unit circle
Parametrise

Unit circle: x = cosθ, y = sinθ, θ ∈ [0, 2π].

|r'|
r'(θ) = (−sinθ, cosθ) → |r'| = 1
Integrand
xy = cosθ sinθ = sin(2θ)/2
Integrate
0 (sin 2θ)/2 · 1 dθ = [−cos(2θ)/4]0 = 0

The integral is zero by symmetry, the function xy is odd under θ → θ + π, so positive and negative contributions cancel exactly over the full circle.

Result
C xy ds = 0
Example 04 Vector line integral — ∫C F·dr, F = (y, x), C: line segment from (0,0) to (1,2)
Parametrise

Line segment: r(t) = (t, 2t), t ∈ [0, 1]. So x(t) = t, y(t) = 2t, r'(t) = (1, 2).

F on curve
F(r(t)) = (y(t), x(t)) = (2t, t)
Dot product
F · r' = (2t)(1) + (t)(2) = 2t + 2t = 4t
Integrate
01 4t dt = [2t²]01 = 2
Result
C F·dr = 2
Example 05 C y dx + x² dy, C: parabola y = x² from (0,0) to (2,4)
Parametrise

x = t, y = t², t ∈ [0, 2]. Then dx = dt, dy = 2t dt.

Substitute
y dx + x² dy = t² · dt + t² · 2t dt = (t² + 2t³) dt
Integrate
02 (t² + 2t³) dt = [t³/3 + t⁴/2]02 = 8/3 + 8 = 32/3
Result
C y dx + x² dy = 32/3
Example 06 Work done by F = (x², xy) along the upper semicircle from (1,0) to (−1,0)
Parametrise

Upper unit semicircle: x = cosθ, y = sinθ, θ ∈ [0, π]. So r'(θ) = (−sinθ, cosθ).

F on curve
F = (cos²θ, cosθ sinθ)
Dot product
F · r' = cos²θ(−sinθ) + cosθ sinθ(cosθ) = −cos²θ sinθ + cos²θ sinθ = 0
Integrate
0π 0 dθ = 0

The field F = (x², xy) is conservative (check: ∂P/∂y = 0, ∂Q/∂x = y = 0 along this path? Actually ∂(xy)/∂x = y and ∂(x²)/∂y = 0, so the field is NOT conservative in general, the zero result here is specific to this field on this path, not due to path independence).

Result
Work = 0

The field happens to be orthogonal to the semicircle at every point: a non-trivial geometric coincidence.

Example 07 Testing conservativeness: F = (2xy + 1, x² + 3y²)
Identify P, Q

P = 2xy + 1, Q = x² + 3y².

Check ∂P/∂y
∂P/∂y = ∂(2xy+1)/∂y = 2x
Check ∂Q/∂x
∂Q/∂x = ∂(x²+3y²)/∂x = 2x
Conclusion

∂P/∂y = ∂Q/∂x = 2x throughout ℝ². F is conservative.

Conservative
F = ∇f exists — proceed to find f.
Example 08 Finding the potential function for F = (2xy + 1, x² + 3y²)
Integrate P in x
f = ∫ (2xy + 1) dx = x²y + x + g(y)

g(y) is an unknown function of y only.

∂f/∂y
∂f/∂y = x² + g'(y)
Match Q

Set ∂f/∂y = Q = x² + 3y²:

x² + g'(y) = x² + 3y² ⟹ g'(y) = 3y²
Integrate g'
g(y) = y³ + C
Potential Function
f(x,y) = x²y + x + y³ + C

Verify: ∂f/∂x = 2xy + 1 = P ✓ and ∂f/∂y = x² + 3y² = Q ✓

Example 09 Using FTLI: ∫C F·dr for F = (2xy+1, x²+3y²) from (0,0) to (2,1)
Recall f

From Example 08: f(x,y) = x²y + x + y³. F is conservative, so path doesn't matter.

Apply FTLI
C F·dr = f(2,1) − f(0,0)
Evaluate
f(2,1) = 4(1) + 2 + 1 = 7 f(0,0) = 0 + 0 + 0 = 0
Result
C F·dr = 7 − 0 = 7

This answer is the same for any path from (0,0) to (2,1).

Example 10 Piecewise path: ∫C y dx − x dy, C = C₁ (x-axis) then C₂ (vertical line) to (2,3)
Decompose

C₁: horizontal segment from (0,0) to (2,0). C₂: vertical segment from (2,0) to (2,3). Total: ∫C = ∫C₁ + ∫C₂.

C₁ segment

x = t, y = 0, dx = dt, dy = 0, t ∈ [0,2]:

C₁ = ∫02 (0)dt − t(0) = ∫02 0 dt = 0
C₂ segment

x = 2, y = t, dx = 0, dy = dt, t ∈ [0,3]:

C₂ = ∫03 t(0) − 2 dt = ∫03 −2 dt = −6
Add
C = 0 + (−6) = −6
Result
C y dx − x dy = −6

Note: ∂P/∂y = 1 ≠ −1 = ∂Q/∂x so F = (y, −x) is NOT conservative, and the answer would differ for other paths.

§ 09Common Mistakes

Mistake 1 — Forgetting the Speed Factor in Scalar Integrals Writing ∫ab f(r(t)) dt instead of ∫ab f(r(t)) |r'(t)| dt. The arc length element ds = |r'(t)| dt is not automatically 1 unless the curve happens to be parametrised at unit speed. Always compute |r'(t)| explicitly.
Mistake 2 — Forgetting That Vector Line Integrals Are Signed The scalar line integral ∫C f ds is the same regardless of the direction you traverse C. The vector line integral ∫C F·dr changes sign when you reverse direction: ∫−C F·dr = −∫C F·dr. Confusing the two types leads to sign errors.
Mistake 3 — Applying FTLI to a Non-Conservative Field Always check the curl condition ∂P/∂y = ∂Q/∂x before using f(B) − f(A). If the field is not conservative, the FTLI does not apply and you must parametrise the path.
Mistake 4 — Incorrect Limits After Parametrisation After writing r(t) = (x(t), y(t)), the integral limits must match the parameter range t ∈ [a, b] — not the original x or y coordinates. If the curve runs from x = 0 to x = 3 but you parametrised with t = x², the limits become t ∈ [0, 9].
Mistake 5 — Confusing ds and dr ds = |r'(t)| dt is a positive scalar (the arc length element). dr = r'(t) dt is a vector. These appear in completely different contexts: ds in scalar line integrals, dr in vector line integrals. Writing ∫ F ds (instead of F·dr) or ∫ f dr (instead of f ds) mixes up the two types.

§ 1010-Question Quiz

Test your understanding of both types of line integral, parametrisation, and conservative fields.

Quiz — Line Integrals  |  10 Questions

Cookie Settings