Riemann Sum & Integration Explorer
Type a function, set an interval, and drag the slider to add rectangles. Watch how the Riemann sum converges toward the exact integral as you increase the number of subdivisions.
Graph
Parameters
Supports: x^n, sin, cos, tan, sqrt, abs, ln, e^x, pi, +, -, *, /
Results
Step-by-Step Calculation
1. Width of Each Rectangle
2. Sample Points (left endpoint)
3. Riemann Sum
4. Exact Integral
5. Error
Reference Guide
Riemann Sums
A Riemann sum approximates the area under a curve by dividing the interval into n subintervals and summing the areas of rectangles.
As n increases, the sum gets closer to the true area. The limit as n goes to infinity is the definite integral.
Methods Compared
Left uses the left endpoint of each subinterval. Right uses the right endpoint. Midpoint uses the center of each subinterval and is generally more accurate.
Trapezoidal connects the two endpoints with a straight line, forming a trapezoid instead of a rectangle. It averages the left and right sums.
The Definite Integral
The definite integral is the exact area under the curve, defined as the limit of Riemann sums.
Error Estimates
For the midpoint and trapezoidal rules, the error decreases proportionally to . Doubling the number of subintervals cuts the error roughly by a factor of four.
Left and right sums converge more slowly, with error proportional to .