What is a Riemann sum?
To find the area under f(x) from a to b, split the interval into n equal pieces of width Δx. On each piece, build a rectangle whose height is f at a sample point: the left endpoint, right endpoint or midpoint. The trapezoidal rule uses trapezoids instead of rectangles.
The formulas
Worked example
Estimate the area under f(x) = x² from 0 to 2 with n = 4. Δx = 0.5. Left endpoints: 0, 0.5, 1, 1.5, so the sum is 0.5 × (0 + 0.25 + 1 + 2.25) = 1.75. Right endpoints give 3.75, midpoints give 2.625 and the trapezoidal rule gives 2.75. The exact area is 8/3 ≈ 2.6667.
Frequently asked questions
What is a Riemann sum?
A Riemann sum estimates the area under a curve by splitting it into n rectangles of width Δx and adding their areas. As n grows, the sum approaches the definite integral.
Which method is most accurate?
For smooth functions the midpoint and trapezoidal rules are usually much more accurate than left or right sums with the same n. The midpoint rule is often slightly better than the trapezoidal rule.
Do left sums overestimate or underestimate?
For an increasing function, left sums underestimate and right sums overestimate. For a decreasing function it is the reverse.
