Sign up freeSign in

Courses · Calculus 3 · Unit guide

Calculus 3: Vector fields and line integrals

How to integrate along curves, and when only the endpoints matter

This unit covers: Line integrals of scalar and vector fields, conservative fields, the Fundamental Theorem for line integrals.

Take the unit quiz Study the flashcards Make flashcards from my notes
Calculus 3: Vector fields and line integrals mindmap: What a vector field is, Line integrals of scalar functions, Line integrals of vector fields, Scalar vs vector line integrals, Conservative fields, Testing whether a field is conservative, Finding a potential function, The Fundamental Theorem for line integrals, Path independence and closed loops
The unit on one page. Open the image to save or print it.

Quick question: if you reverse the direction of a path, does your line integral change? Students mix this up all the time in multivariable calculus. We'll build up vector fields, scalar and vector line integrals, conservative fields, and the Fundamental Theorem for line integrals, one step at a time.

In this guide
  1. What a vector field is
  2. Line integrals of scalar functions
  3. Line integrals of vector fields
  4. Scalar vs vector line integrals
  5. Conservative fields
  6. Testing whether a field is conservative
  7. Finding a potential function
  8. The Fundamental Theorem for line integrals
  9. Path independence and closed loops

What a vector field is

A vector field assigns a vector to every point in a region of the plane or space. In two dimensions you write it as F equals the pair P and Q, two functions of x and y. Take F equals negative y comma x. At the point one comma zero, the arrow points straight up, and overall the arrows swirl counterclockwise around the origin.

Key points.

  • A vector field assigns a vector to every point
  • In 2D: F(x, y) = ⟨P(x, y), Q(x, y)⟩
  • Example: F = ⟨−y, x⟩ swirls counterclockwise

Line integrals of scalar functions

To integrate a scalar function along a curve, parametrize the curve. For the circle of radius two, r of t is two cosine t, two sine t, for t from zero to two pi. Then f d s becomes f of r of t times the speed, the length of r prime, d t. On this circle f is four and the speed is two, so the answer is sixteen pi.

r(t) = ⟨2cos t, 2sin t⟩, 0≤t≤2π
∫C f ds = ∫ f(r(t)) |r′(t)| dt
f = x² + y² = 4,  |r′(t)| = 2
∫0^2π 4·2 dt = 16π

Key points.

  • Parametrize the curve: r(t), a ≤ t ≤ b
  • ds = |r′(t)| dt, the speed times dt
  • Circle of radius 2 with f = x² + y² gives 16π

Line integrals of vector fields

The line integral of F dot d r measures the work a force does along a path. You compute it as the integral of F of r of t dot r prime of t, d t. Take the swirl field around the unit circle. Along the curve F is negative sine t, cosine t, and r prime is the very same vector. Their dot product is one, so the work is two pi.

∫C F·dr = ∫ F(r(t))·r′(t) dt
F = ⟨−y, x⟩, r = ⟨cos t, sin t⟩
F(r(t)) = ⟨−sin t, cos t⟩ = r′(t)
F·r′ = sin²t + cos²t = 1
∫0^2π 1 dt = 2π

Key points.

  • ∫C F·dr measures work along a path
  • Compute ∫ F(r(t))·r′(t) dt
  • Swirl field around unit circle gives 2π

Scalar vs vector line integrals

Here's the distinction students lose points on. The scalar line integral uses arc length, so it measures things like the mass of a wire, and running the curve backwards gives the same answer. The vector line integral uses d r, which carries direction, so it measures work. If you reverse the orientation, the integral of F dot d r changes sign. Going clockwise around our circle gives negative two pi.

Scalar: ∫C f ds

  • Uses ds = |r′(t)| dt
  • Gives mass, length, curtain area
  • Direction of travel doesn't matter

Vector: ∫C F·dr

  • Uses dr = r′(t) dt
  • Gives work or circulation
  • Reversing the path flips the sign

Conservative fields

A vector field is conservative when it's the gradient of some scalar function, called a potential function. For example, if f equals x squared y plus y cubed, its gradient is two x y comma x squared plus three y squared, so that field is conservative. Gravity and electrostatic forces are classic physical examples, and the potential is closely tied to potential energy.

A vector field F is conservative if F = ∇f for some scalar function f, called a potential function. Definition of a conservative field

Key points.

  • F is conservative if F = ∇f
  • f is called a potential function
  • Example: f = x²y + y³ gives F = ⟨2xy, x² + 3y²⟩

Testing whether a field is conservative

To test F equals P comma Q, compare the partial of P with respect to y with the partial of Q with respect to x. If they're equal on an open, simply connected region, F is conservative. For two x y comma x squared plus three y squared, both are two x, so it passes. For the swirl field they're negative one and one, so it fails.

F = ⟨P, Q⟩
test: ∂P/∂y = ∂Q/∂x ?
F = ⟨2xy, x² + 3y²⟩
∂P/∂y = 2x = ∂Q/∂x  ✓
⟨−y, x⟩: −1 ≠ 1  ✗

Key points.

  • For F = ⟨P, Q⟩ compare ∂P/∂y and ∂Q/∂x
  • Equal on an open, simply connected region means conservative
  • ⟨2xy, x² + 3y²⟩ passes; ⟨−y, x⟩ fails

Finding a potential function

Once the test passes, you find the potential in a few steps. Integrate P, two x y, with respect to x to get x squared y plus an unknown function g of y. Differentiate that with respect to y, giving x squared plus g prime of y, and set it equal to Q. That leaves g prime equals three y squared, so g is y cubed plus a constant.

  1. Integrate P in x: f = x²y + g(y)
  2. Differentiate in y: f_y = x² + g′(y)
  3. Set equal to Q: g′(y) = 3y²
  4. Integrate: f = x²y + y³ + C

The Fundamental Theorem for line integrals

The Fundamental Theorem for line integrals says the integral of grad f dot d r along C equals f at the end minus f at the start. Take f equals x squared y plus y cubed, from zero zero to one two. At the end f is two plus eight, which is ten, and at the start it's zero. So the integral is ten, no matter which path you take.

∫C ∇f·dr = f(r(b)) − f(r(a))
f = x²y + y³
start (0,0), end (1,2)
f(1,2) = 2 + 8 = 10
f(0,0) = 0  →  integral = 10

Key points.

  • ∫C ∇f·dr = f(end) − f(start)
  • Only the endpoints of the path matter
  • From (0,0) to (1,2) with f = x²y + y³ gives 10

Path independence and closed loops

This theorem has two consequences you'll use constantly. For a conservative field, line integrals are path independent, since only the endpoints matter. And around any closed curve, the start and end are the same point, so the integral is zero. Read that backwards and you get a quick test: the swirl field gave two pi around the unit circle, which isn't zero, so it can't be conservative.

Key points.

  • Conservative fields are path independent
  • Around any closed curve, ∮ F·dr = 0
  • A nonzero loop integral means not conservative
  • ⟨−y, x⟩ gives 2π around the circle, so it isn't conservative

Remember this

If you remember one thing, it's this: when F is a gradient, the line integral depends only on the endpoints. Now quiz yourself on parametrizing curves, testing for conservative fields, and finding potential functions.

Practice this unit

  • Calculus 3: Vector Fields and Line Integrals quiz15 multiple-choice questions with explanations · no account needed
  • Calculus 3: Vectors and the Geometry of Space quiz15 multiple-choice questions with explanations · no account needed
  • Calculus 3: Vector Functions and Motion in Space quiz15 multiple-choice questions with explanations · no account needed
  • Calculus 3: Vector Fields and Line Integrals34 flashcards · study free
  • Calculus 3: Vectors and the Geometry of Space36 flashcards · study free
  • Calculus 3: Vector Functions and Motion in Space32 flashcards · study free
  • Calculus 3: Partial Derivatives30 flashcards · study free

Every Calculus 3 deck and quiz: the Calculus 3 page.

Other Calculus 3 unit guides

  • Vectors and the geometry of spaceStudy guide
  • Vector functions and motion in spaceStudy guide
  • Partial derivativesStudy guide
  • Gradient and directional derivativesStudy guide
  • Optimization and Lagrange multipliersStudy guide
  • Double integralsStudy guide
  • Triple integrals and coordinate changesStudy guide
  • Green’s theoremStudy guide
  • Surface integrals, Stokes’ theorem and the Divergence TheoremStudy guide

Try it with your own material

Upload a PDF, slides or notes and study the deck in minutes. Making your own cards is free with no limits.

Make flashcards from my notesSee how Quizcard works