+15 XP

Play: Riemann Sum Explorer

Drag the dt slider and watch the rectangles fill in the area. The top plot shows the rectangles under the curve; the bottom plot compares the running Riemann estimate (green) against the exact integral (orange).

dt — width of each rectangle (step size)dt = 1.00
f(t) = t² − t + 1, with 10 rectangles
0246810
Integral (area so far): Riemann sum vs exact
0246810
exact integral
Riemann sum
Exact total area: 293.3Riemann estimate: 250.0Off by 14.8%

Shrink dt → more, skinnier rectangles hug the curve and the green estimate snaps onto the orange exact line. The catch: more rectangles = more computation. And because each rectangle uses its left edge while the curve is rising, every rectangle sits slightly under the curve — so a big dt underestimates the area.

Try this:
1. Start with a big dt — see the green estimate fall short of the orange exact line, and the "off by" percentage climb. (That's the left-edge underestimate from the last lesson.)
2. Shrink dt — watch the green line snap onto the orange one and the error shrink toward zero.
3. Ask yourself the NMA question: if smaller dt is always more accurate, why not just use the tiniest dt possible? (Answer: each step costs computation — with a real simulation running millions of steps, tiny dt gets slow. Always a tradeoff.)