A Riemann sum approximates the area under a curve with rectangles: cut into strips of width , pick a height in each strip, add the areas. Letting grow without bound gives the definite integral.
| Step | On with right endpoints | |
|---|---|---|
| 1 | Compute Δx. , the width of every strip. | |
| 2 | List the n sample points. Right: (the right edges). Left: . Midpoint: the centre of each strip. Exactly points. | right endpoints: |
| 3 | Evaluate f at each sample point. These are the rectangle heights. | |
| 4 | Add the heights and multiply by Δx. The common width comes out as a factor. | |
| 5 | Compare with the exact value if it is known. For an increasing function the right sum overestimates and the left sum underestimates; the exact value is F(b) − F(a). | exact ; overestimates |