A wooden canoe on a river in the Boundary Waters Canoe Area
Interactive tutorial · Calculus III

Line Integrals

A line integral adds up how much a vector field points along a path. Scroll down: at each stop a short note explains the next idea, then the picture is yours to drag and explore before the next one arrives.

11 stops · about 10 minutes · works on a phone

Assumptions

Everything on this page follows from the assumptions and definitions below. They are granted, not proved, so judge each one for yourself. A step that leans on one is tagged with its number.

  • A1
    Flat water. The water surface is a flat plane seen from above. A position is a point (x, y), measured in meters.
    Leaves out: waves, depth, and anything below the surface.
  • A2
    A steady current. At each point the current is one fixed velocity vector F(x, y), in meters per second. It does not change with time.
    Leaves out: gusts, turbulence, and eddies that come and go.
  • A3
    A point canoe. The canoe is a single point that travels exactly along the path C from A to B.
    Leaves out: the length of the boat, drifting off the line, and the paddler's effort to stay on it.
  • A4
    The river channel. Between straight banks at y = −3 and y = 3 the current is F = ⟨1 − y²/9, 0⟩: 1 m/s down the middle, falling to zero at each bank.
    Leaves out: bends, uneven depth, and any other shape the speed might take from bank to bank.
  • A5
    The whirlpool. The current is F = 3e^(−(x² + y²))⟨−y, x⟩, circling the origin counterclockwise.
    Leaves out: any pull toward the center, and how a real whirlpool forms or fades.
  • A6
    River with a whirlpool. The two currents add: the channel of A4 plus an eddy of the same kind as A5, centered at (0.5, −1).
    Leaves out: the way a real eddy and the flow around it change each other.
  • A7
    A current read as a force. In Work mode F is a force in newtons that depends only on where the canoe is.
    Leaves out: drag, which depends on how fast and which way the boat moves through the water.
  • D1
    Flow along C is ∫ F · T ds, which equals ∫ F · dr. For a velocity field its units are m²/s. Around a closed loop it is called the circulation.
  • D2
    Flux across C is ∫ F · n ds, where n is the unit normal pointing to the right of travel. For a velocity field its units are m²/s.
  • D3
    Work done by a force F along C is ∫ F · dr, in joules when F is in newtons.
Scroll to begin↓
1 · A straight pathStop 1 of 11
Path
Measure
Vector field
Start A
(,)
End B
(,)
t 0.35
current runs with you current runs against you field arrows (scaled to fit)
Flow along C
0

The computation

  1. 1
    Parametrize the path, 0 ≤ t ≤ 1
  2. 2
    Differentiate
  3. 3
    Plug the path into the field
  4. 4
    Dot with r′(t)
  5. 5
    Integrate in t

At the canoe,

The integrand,

The shaded signed area is the line integral. The darker part is the running total up to the canoe.

Stop 1 · A straight path

A path through a current

Each gray arrow is the current at that point. Here it is the same everywhere: 1 m/s to the right, F = ⟨1, 0⟩.

The dots A and B are the ends of a straight path C, and a canoe sits partway along it. The dark arrow at the canoe is F. The thick arrow is the part of F that points along the path, F · T. It is green when the current runs with you and orange when it runs against you.

The line integral ∫C F · dr adds up that along-the-path part over the whole trip.

Rests on

Try itDrag A and B around the grid, or grab the path itself and slide it. When does the path turn orange? Can you make the answer exactly 0?

Stop 2 · A straight path

How the number is computed

The computation panel works it out the way you would by hand:

  • write the path as r(t) = A + t(B − A) for 0 ≤ t ≤ 1,
  • differentiate to get r′(t),
  • plug the path into F, dot with r′(t), and integrate from 0 to 1.

The graph at the bottom of the panel is the integrand F(r(t)) · r′(t). Its signed area is the answer. The t slider moves the canoe, and the darker shading is the running total so far.

Try itSlide t from 0 to 1 and watch the running total under the graph build up to the final answer.

Stop 3 · A straight path

Fields that change from place to place

A constant field is the easy case. The field menu now has three more:

  • Radial ⟨x, y⟩ points away from the origin and grows as you go out.
  • Rotational ⟨−y, x⟩ swirls counterclockwise.
  • Shear ⟨y, 0⟩ runs right above the x-axis and left below it.

Now the field changes along the path, so the integrand is no longer a constant. Part of a path can be green and part orange, and the pieces can cancel.

Try itTry each field in the menu. In Rotational, find a straight path with zero flow. Hint: aim it through the origin.

Stop 4 · A curved path

Bend the path

The path is now curved, and a square handle M has appeared. The path is the parabola

r(t) = (1 − t)²A + 2t(1 − t)M + t²B

which starts at A, ends at B, and is pulled toward M. With M at the midpoint of AB it is the straight line again. The dashed line is the straight path from A to B, kept for comparison.

Same endpoints, different route. Does the answer change? The blue box under the result compares the two.

Try itDrag M to bend the path in the rotational field. Then switch to Radial and bend it again. Which one cares about the route?

Stop 5 · Flow vs flux

Along the path, or across it?

So far every number has been a flow: the part of F that runs along the path, ∫C F · T ds, which is ∫C F · dr written another way.

Switch Measure to Flux across and the tool adds up the part that crosses the path instead: ∫C F · n ds, where n points to your right as you travel from A to B.

With F = ⟨P, Q⟩, the two integrands use the same pieces:

flow: P x′ + Q y′     flux: P y′ − Q x′

In flux mode, green means the current crosses from your left to your right.

Rests on

Try itSwitch between Flow along and Flux across. In the constant field, find a path with all flow and no flux, then one with all flux and no flow.

Stop 6 · Flow vs flux

Which one ignores the route?

Back at stop 4, bending the path changed the flow in the rotational field but not in the radial one. Flux is the mirror image:

  • Flow ignores the route when the field has no curl (no spin). Then F = ∇f and the flow is f(B) − f(A).
  • Flux ignores the route when the field has no divergence (nothing spreads out or piles up). Whatever crosses one route between A and B must also cross the other.

The rotational field spins but does not spread, and the radial field spreads but does not spin.

Try itWith Flux across on, bend the path in Rotational: the flux holds still. Now try Radial.

Stop 7 · Work vs flow

Force or velocity?

Measure now has a third choice, Work. The computation is identical to flow. What the number means is not.

If F is a∫C F · dr isUnits
ForceWork: energy the field gives to (or takes from) whatever moves along CN · m = J
VelocityFlow along C: how much the current runs along the path. Around a closed loop it is the circulation.m²/s

A river current is a velocity field, so its line integral is a flow, not work.

Rests on

Try itSwitch between Flow along and Work. The number stays put; the wording and units change.

Stop 8 · Whirlpool and channel

A whirlpool

This current swirls counterclockwise around the origin. It is still at the very center, fastest about 0.7 m out, and nearly gone a couple of meters away:

F = 3e−(x² + y²)⟨−y, x⟩

After you plug in a path there is no tidy antiderivative, so step 5 switches to Simpson's rule. It runs twice, at two resolutions, and reports whether the answers agree.

A path that arcs over the top runs against the spin, and one that dips underneath runs with it. A path that stays far away barely notices.

Rests on

Try itDrag M to bend the path over the whirlpool, then under it. Then slide the whole path far away.

Stop 9 · Whirlpool and channel

A river channel

Now a river between two banks. The current is fastest down the middle and stops at the banks:

F = ⟨1 − y²/9, 0⟩

Paddle straight across and the current is perpendicular to you the whole way. The flow along your path is zero, but the flux across it is not: the whole river passes through your line.

The menu also has River with a whirlpool: this channel with an eddy turning near (0.5, −1).

Rests on

Try itThe path starts straight across: zero flow. Drag it to run downstream through the middle, then along a bank. Put it back across the river and switch to Flux across: 4 m²/s, however you bend it between the banks. Then pick River with a whirlpool from the menu.

Stop 10 · Notes

What the line integral leaves out

When F is a force, this tool computes the work that one force does along C. It adds up only the part of the force that points along your path. It is not a model of everything happening to the canoe.

Two other things are going on in a real crossing, and they are separate ideas:

  • Drag from the water. Whenever the canoe moves relative to the water, the water pushes back on the hull. That push depends on how fast and which way the boat is moving, not only on where it is, so it is not a vector field of position like the ones here. It is what carries you downstream if you stop correcting.
  • Your paddling. To hold a straight line across, you angle the bow upstream and keep pushing against the drift. That effort comes from you, not from the field.

So a straight crossing can have zero flow along the path and still wear you out. The current points across your path, not along it, so it adds nothing to the integral. You still burn energy fighting the drift, the same way holding a heavy box still is tiring even though you do no work on the box.

Work also depends on who measures it. To someone standing on the bank, you paddle straight across. To someone drifting on a raft with the current, you are paddling upstream at an angle, and they would measure a different amount of work.

Rests on

Try itThe path runs straight across in Work mode. Read F as a force that pushes downstream: it does zero work on this crossing. Your arms would disagree.

Stop 11 · Notes

Every route, compared

Keep A and B fixed and bend the path. For the constant and radial fields, the flow never changes: they are gradients, so only the endpoints matter. For the rotational, shear, whirlpool and river fields, it does.

On the river, a route through the fast middle and a route along the slow bank get different answers.

Everything is unlocked now: every field, both path shapes, and flow, flux and work. Play as long as you like, then scroll on to finish.

Try itKeep A and B near the slow bank and pull M through the fast middle, then back toward the bank.

Finished

You completed the line integral tutorial

You spent – minutes on it.

Tell Justin you finished

Add a note if you like: what clicked, what was confusing, or what you would like to see next.

This emails your name, your message, and the time you spent on the tutorial to Justin. Nothing else is sent.

The full receipt
ClaimStatusRests onDetail
Flow adds up P x′ + Q y′ and flux adds up P y′ − Q x′, with the normal on the right of travel (stops 2 and 5).✓ ProvedD1, D2Flow integrand F.r' = P x' + Q y'; flux integrand F.(y', -x') = P y' - Q x', with (y', -x') perpendicular to r', the same length, and on the right of travel.
The curved path starts at A, ends at B, and is the straight line when M is the midpoint (stop 4).✓ Proved—r(0) = A and r(1) = B for every M; with M at the midpoint the path is A + t(B - A).
In Rotational, a straight path aimed through the origin has zero flow (stop 3).✓ ProvedD1In the rotational field the flow integrand is identically 0 on any straight path along a line through the origin.
Which fields ignore the route: flow for constant and radial, flux for every field with no divergence (stops 4, 6 and 11).✓ ProvedD1, D2Curl and divergence, field by field: const: curl 0, div 0; radial: curl 0, div not 0; rot: curl not 0, div 0; shear: curl not 0, div 0; whirl: curl not 0, div 0; channel: curl not 0, div 0; eddy: curl not 0, div 0. Each potential's gradient and each stream function give back the field. Constant and radial: flow = f(B) - f(A) for every M. Constant, rotational, shear and river: flux = psi(B) - psi(A) for every M. Rotational, shear and river flow, and radial flux, change with M.
The whirlpool is still at its center, fastest about 0.7 m out, and nearly gone 2 m away (stop 8).✓ ProvedA5Speed is 3r e^(-r^2): zero at the center, largest at r = 1/sqrt(2) = 0.707 m (1.287 m/s), and 8.5% of that at r = 2.
A path over the top of the whirlpool runs against the spin, one underneath runs with it, and one far away barely notices (stop 8).≈ Checked numericallyA5, D1Left to right over the top the flow is -2.0293 (against the spin), underneath 2.0293 (with it), and along y = 3 only -0.00197.
River: the current stops at the banks; straight across, the flow is 0 and the flux is 4 m²/s; every route from bank to bank has that same flux (stop 9).✓ ProvedA4, D2The current is 0 at both banks and 1 m/s in the middle; straight across, flow = 0 and flux = 4 m^2/s; flux = 4 on every bank-to-bank route the tool can draw (mean speed 2/3 m/s).
The numbers the tool shows as you drag.✓ Checked independently—The page's own functions, run on 98 paths across all 7 fields, match SymPy: polynomial fields to 7.1e-15, Simpson's rule (n = 400) on the 28 whirlpool cases to 1.3e-9; the on-screen cross-check is within 3.4e-7.
Whirlpool results on screen are estimates: Simpson’s rule run at two resolutions, shown with “≈”.≈ Checked numerically—The page reports whether the two runs agree to three decimals.
Units: m²/s for the flow or flux of a current, joules for work (stop 7).ReviewedA1, A2, A7, D1, D2, D3Meters per second times meters, and newtons times meters.
The sentences on the cards.Reviewed—Each card was read against the formulas, looking for anything assumed but not listed. No objection stands.
A1, A2, A3, A4, A5, A6, A7, D1, D2, D3Assumed—Granted, not proved. Whether they suit a real river is yours to judge.

Proved: SymPy reduced the difference between the two sides to zero. Checked independently: the page’s own functions were run against SymPy’s exact answers. Checked numerically: evidence, not proof. Reviewed: a model or a person read it. Assumed: an assumption or a definition, granted and not proved. Checks run 2026-11-11 with SymPy 1.14.0; rerun them with interactives/checks/line_integral.py. Cards read by Claude Fable 5.2, 2026-11-10. How it’s checked

Part of Calc Practice: free Calculus 3 practice. Try the line integrals and work problems or see more interactives.