The goal of finding the area under a curve is illustrated with this applet.
This applet shows the sum of rectangle areas as the number of rectangles is increased. Different values of the function can be used to set the height of the rectangles. This sum should approximate the area between the function and the x axis. The options for choosing the height of the rectangles are:

The upper sum is the sum of rectangles using the maximum value of the curve within the rectangle range.

The left sum uses the value of the function on the left side of the rectangle.

The midpoint sum uses the value of the function in the middle of the rectangles range.

The right sum uses the value of the function on the right side of the rectangle.

The lower sum is the sum of rectangles using the minimum value of the curve within the rectangle range.

The number of rectangles can be changed with the slider or animated with the play button.
Left,midpoint and right sums can be turned on or off.
The right graph shows how the area varies as the number of rectangles is increased. The trace can be cleared with ctrl-F.
The bounds of the sum can be adjusted by moving points A and B.
The function can be changed by moving the small points on the function.
The true area under the curve will be between the upper sum and lower sum.

What happens as the number of rectangles is increased?
Are the other sums always between the upper and lower sums?
How many rectangles are required to obtain an exact value?
What do you think the thin dashed line on the right graph represents?
Which sum uses the fewest rectangles to obtain a good approximation of the area?
If the number of rectangles approached infinity would any of the sums give different values?