Approximating an Integral
The rectangle method
The simplest method is exactly the Riemann sum: we replace the area under the curve by a sum of rectangles. We split into pieces of width , and on each one we draw a rectangle.
here using the values at the left endpoint of each piece. Each rectangle's height is the value of at one endpoint of the piece.
The flaw is obvious: the flat top of the rectangle fits the curve poorly. There are gaps or overhanging corners, especially where the curve is steep. The error can be significant.
How can we improve it? By increasing : the thinner the rectangles, the smaller the error. But convergence is slow — the error is roughly proportional to , so to halve it you need about twice as many rectangles.
The idea for doing better, without multiplying the number of points, is to replace the flat top of the rectangle with something that follows the curve: a slanted segment, which gives trapezoids, then a small arc of a parabola, which gives Simpson's rule. That is the subject of the next chapter: fitting the curve better, not just cutting it more finely.

