Reading and display settings

Appearance

System follows your operating system and keeps following it, even if you change it later. The header's sun, moon and monitor cycle the same three options.

Text size (%) 100%

Default. Scales every text size on the site, equations and tables included.

Reading width 70ch

How much text runs across one line of prose. Narrower is easier to track; wider fits more on screen.

Line spacing 1.6

The leading on body text. Taller leading helps a tired eye stay on the line.

Density

Padding and gaps around controls, cards, and tables — how much breathing room the layout leaves itself.

Motion

System follows your operating system. Reduced removes every transition on this site. Full keeps them on unless your system asks for less.

1

Cut the area into strips

The Riemann sum, and the limit that defines the integral

Our running example is still the robot on a line, but now we know its velocity rather than its position. The odometer reading — how far the robot actually went — should be the velocity accumulated over time. Here the velocity is $v(t) = t^2 - 3t + 2$ metres per second, the same function that was the derivative in Part 3, and it is negative for $1 < t < 2$, so the robot backs up in the middle of the trip.

To accumulate it, chop the interval $[a,b]$ into $n$ strips of width $\Delta x = (b-a)/n$ and stand a rectangle on each strip. The height comes from one sample point $x_i^*$ inside strip $i$, and the Riemann sum is just the total rectangle area:

$$ S_n \;=\; \sum_{i=1}^{n} f(x_i^*)\,\Delta x . $$

Which point you pick is the rule: the left end, the right end, the midpoint, or a trapezoid that joins both heights. Change the rule and the picture changes slightly; change the strip width and it changes a lot. The definite integral is what all of it settles on as the mesh goes to zero:

$$ \int_a^b f(x)\,dx \;=\; \lim_{\|\Delta x\| \to 0} \sum_{i=1}^{n} f(x_i^*)\,\Delta x . $$

Slide the interval, slide the number of strips on a logarithmic scale, and switch rules. The readout compares your coarse sum against a high-resolution midpoint reference and names the error. Drag the two dots on the curve to move $a$ and $b$ directly.

Velocity against time, sliced into strips over $[a,b]$. Blue strips count up, pink strips count down; their signed sum is the Riemann sum.

2

Refinement: the mesh goes to zero

Why the rule stops mattering in the limit

The mesh of a partition is the widest strip, $\|\Delta x\| = \max_i \Delta x_i$. The integral's limit is taken as the mesh shrinks, not merely as $n$ grows: every strip must get thin, so no single rectangle can hide a jump. Suppose the function is smooth, with a bounded derivative. Then the left, right, midpoint and trapezoid sums are all trying to approximate the same smooth area, and the only question is how fast each one's error decays.

Left and right disagree with each other by a boundary term of order $\Delta x$, so both are first-order accurate: doubling $n$ roughly halves the error. Midpoint and trapezoid are second-order: doubling $n$ cuts the error by about four. All four converge to the same number as the mesh vanishes, which is exactly why the notation $\int_a^b f$ does not mention a rule at all.

Press Play to double $n$ on a timer, or step it by hand, and watch the error fall on log–log axes. A straight line of slope $-2$ is drawn for comparison: the midpoint error tracks it, and the readout shows the ratio between successive errors hovering near four.

Log–log plot of midpoint error $|S_n - \int_0^3 v|$ against the number of strips $n$. The dashed line has slope $-2$.

💡 Rule independence, quantitatively: the rules differ by where they sample, and that difference is bounded by how much $f$ moves across one strip. Send the strip width to zero and the difference goes with it. The limit is rule-free.
3

Signed area: when velocity points backward

Net displacement is not distance travelled

Area below the axis is not "negative area" in any geometric sense — it is area counted with a sign. Our velocity is negative between its roots $t=1$ and $t=2$: the robot is reversing. A strip whose height $v(t)$ is negative contributes $v(t)\,\Delta x < 0$ to the sum, so it cancels part of the ground already covered.

$$ \int_a^b v(t)\,dt \;=\; \underbrace{(\text{area above the axis})}_{t \in [0,1]\cup[2,3]} \;-\; \underbrace{(\text{area below the axis})}_{t \in [1,2]} . $$

That signed total is the net displacement: it is where the robot ends up relative to where it started, not how far it went. The odometer — total distance — integrates speed instead, the absolute value $|v(t)|$, so every strip adds. Slide the end time $b$ and watch the two numbers separate exactly while the curve is below the axis, then reconverge once the robot is moving forward again.

Velocity $v(t)=t^2-3t+2$. Blue region adds to the odometer and the displacement; pink region adds only to the odometer, and subtracts from displacement.

⚠️ $v$ negative means velocity points the other way. The robot's odometer never decreases; its displacement can.
4

Area so far: the accumulation function

Building a new function out of old area

So far the endpoint $b$ was a number. Let it move. Fix a starting time $a$ and define the accumulation function

$$ A(x) \;=\; \int_a^x v(t)\,dt , $$

which is the signed area swept from $a$ up to $x$. Its value at $x$ depends on everything $v$ did before $x$ — the area is memory. Slide $x$ and watch the shaded region on the top panel and the marker on the bottom panel move together. The readout reports $A(x)$ and the small increment $\Delta A$ over the last quarter-second, alongside $v(x)\,\Delta x$: they agree because a thin strip is nearly a rectangle of height $v(x)$.

That agreement is the content of Part 9, stated backwards: differentiating the accumulated area returns the original velocity, $A'(x)=v(x)$. Integration undoes differentiation.

Top: velocity $v(t)$ with the area from $a=0$ to the current $x$ shaded. Bottom: the accumulated area $A(x)$, drawn by sweeping $x$.

5

Where this shows up

Accumulation is everywhere a total is built from a rate

The whole point of defining the integral as a limit of sums is that the sums are what a computer can actually do. Part 9 shows that the limit can often be evaluated by antiderivatives, which is what makes integration a practical tool rather than only a definition. Differential equations (Volume II, Part 12) run the idea forward: Euler and Runge–Kutta advance a solution by taking exactly these strip-sized steps, and a finer step is a finer mesh. And calculus of probability (Volume II, Part 11) is built on integrals of densities — a probability is the accumulated area under a density curve, so signed accumulation becomes the language of expectation.

6

Notation to carry forward

NotationReads asWhere it comes up
∫ab f(x) dxThe definite integral — a number, signed area over $[a,b]$Every accumulation; densities, work, displacement
∑ f(xi*) ΔxA Riemann sum: rectangle areas before the limitNumerical quadrature; this part, Step 1
‖Δx‖ → 0The mesh going to zero — the limit that defines the integralWhy the rule does not matter (Step 2)
∫ab |v| dtTotal distance: accumulate the speed, never the signed velocityThe odometer; arc length later on
A(x) = ∫ax fThe accumulation function, and $A'(x)=f(x)$The Fundamental Theorem, Part 9
7

Further reading

8

Check your understanding

0/4 answered