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.
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.
The shaded signed area is the line integral. The darker part is the running total up to the canoe.
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?
The computation panel works it out the way you would by hand:
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.
A constant field is the easy case. The field menu now has three more:
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.
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?
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.
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:
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.
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 is | Units |
|---|---|---|
| Force | Work: energy the field gives to (or takes from) whatever moves along C | N · m = J |
| Velocity | Flow 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.
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.
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.
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:
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.
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.
| Claim | Status | Rests on | Detail |
|---|---|---|---|
| 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). | ✓ Proved | D1, D2 | Flow 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). | ✓ Proved | D1 | In 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). | ✓ Proved | D1, D2 | Curl 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). | ✓ Proved | A5 | Speed 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 numerically | A5, D1 | Left 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). | ✓ Proved | A4, D2 | The 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). | Reviewed | A1, A2, A7, D1, D2, D3 | Meters 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, D3 | Assumed | — | 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.