This simulator builds a definite integral as a signed sum of rectangle or trapezoid strips across a chosen interval and function. Change the sampling rule, refine the partition count, reverse the bounds, and sweep the upper limit to watch the running accumulation total emerge alongside the exact analytic value.
• A real-time 3D-staged view of the integrand curve, colored signed-area strips (teal for positive contributions, orange for negative), the moving integration boundary, and a separate vertical gauge comparing the approximate and exact totals, with home view, focus-selected-part, auto-rotate, expand and toggleable labels. • Four selectable functions: ½x² − 1 (quadratic), sin x, ¼x³ − x (cubic), and |x| (absolute value). • Four live sliders/selects: starting bound a (−3 to 3), ending bound b (−3 to 3, may be less than a), subinterval count n (4 to 80 equal-width partitions), and quadrature rule (left endpoint, right endpoint, midpoint, trapezoid). • Play/pause, single-step and larger-step time controls, plus a playback-speed selector from 0.1x to 60x laboratory speed. • Three actions: accumulate (sweep the upper bound from a toward b), full (jump straight to the full interval), and stop. • Six live metrics: current upper bound, approximate signed total, exact integral, approximation error, positive contributions, and negative contributions. • A Curves & measurements tab with an approximation-convergence chart (comparing 4/8/12/20/40/80-partition results against the exact value) and a local-accumulation-rate chart, the full model equations, and snapshot measurements. • An Experiments tab with four guided scenarios (refine a smooth curve, signed cancellation, reverse the interval, compare sampling rules), a model-verification bench of independent automated checks, and a timestamped event log with a copyable trial report. • A Learn & assess tab with four guided lessons, a two-question knowledge-check quiz, and a written scope/reference statement linking to OpenStax Calculus.
Each strip's height comes from the chosen sampling rule — left endpoint, right endpoint or midpoint uses a single function value per subinterval, while the trapezoid rule averages the two endpoint heights. Every strip contributes a signed area equal to its height times its width; the definite integral is the net accumulation of those signed contributions, not total geometric area, so equal positive and negative pieces can cancel to zero even though the curve visibly rises above and dips below the axis.
Swapping the bounds a and b reverses the sign of the integral, because the directed interval — and therefore every sampled strip within it — also reverses direction. For a continuous accumulation function A(t) = ∫ₐᵗ f(x) dx, the Fundamental Theorem of Calculus guarantees A′(t) = f(t): the curve's height at any point is exactly the instantaneous rate at which the running total is accumulating there.
The approximation-convergence chart plots the quadrature result at 4, 8, 12, 20, 40 and 80 partitions against a flat reference line at the exact integral, so refining n visibly closes the gap for a smooth curve like the quadratic or sine functions. The equations panel gives the partition width Δx, the left/midpoint/trapezoid summation formulas, and the exact accumulation A(t) = F(t) − F(a) via each function's known antiderivative.
The four built-in experiments walk through refining a smooth quadratic under the midpoint rule, watching sine's symmetric positive and negative areas cancel to zero, reversing the interval on the quadratic to flip its sign, and comparing how different sampling rules handle the corner in |x|. The model-verification bench in the Experiments tab independently checks known exact integrals, reversed-bound sign flips, zero-width intervals, sampling-rule differences, and a numerical Fundamental Theorem of Calculus check, all against fresh model instances that leave your current trial untouched.
A negative integral means the net signed accumulation over the interval is negative — the area below the x-axis outweighs the area above it, or the bounds are reversed. It does not mean the calculation failed; signed contributions are allowed to partially or fully cancel, and the simulator's positive and negative metrics show exactly how much of each contributed to that net total.
The definite integral is defined over a directed interval. Reversing a and b reverses the direction every sampled strip is measured in, which flips the sign of every contribution and therefore the sign of the total — this is why the "reverse the interval" experiment shows the quadratic's integral flip from −2/3 to +2/3 when the same two bounds are swapped.
Left endpoint, right endpoint, midpoint and trapezoid rules each sample the function at a different point (or combination of points) within each subinterval, so they each make a different approximation to the true area under the curve. Near a corner like |x| at zero, or with few subintervals, these rules can disagree noticeably; increasing the partition count n generally makes all of them converge toward the same exact value for a well-behaved function.
This is an exact-function teaching model covering signed integration and numerical quadrature for four continuous functions with known analytic antiderivatives. The extruded strips in the 3D view depict planar area, not physical volume, and the positive/negative readouts reflect the signed contributions of the currently selected approximation method, not an exact geometric area measurement.