🟦 Riemann Sum Lab β€” Area Under Any Curve

Type any function, drag the number of rectangles, and watch the classic left/right/middle/trapezoid sums close in on the true integral. Live shaded plot, error against a high-precision reference, and a convergence table that proves why doubling n quarters the trapezoid error.

β€”estimate (signed area)
β€”reference value
β€”error
β€”relative error
Reference: adaptive-Simpson computed to ~10 digits. β€œSigned” means parts below the axis count negative β€” that's why xΒ³βˆ’3x on βˆ’2β†’2 is 0.

How fast the error shrinks

Γ— Γ· and implicit products go left-to-right: 1/2x means (1/2)Β·x. Allowed: + βˆ’ * / ^, parentheses, sin cos tan exp ln log sqrt abs, constants pi and e.