This interactive figure illustrates the approximation of the area under a curve using the [color=#1e84cc][b]right endpoints[/b][/color], [color=#ff7700][b]left endpoints[/b][/color], and [color=#9900ff][b]midpoints [/b][/color]when computed using [math]n[/math] rectangles. [br][br]This interactive figure also illustrates an approximate value for the [color=#0000ff]average value[/color] of a continuous function over the interval [math][a,b][/math]. If a single, large rectangle is constructed on the [math]x[/math]-axis with width [math]b-a[/math] and with area equal to the area of the [math]n[/math] rectangles, then the height of that rectangle is the average value of the heights of the [math]n[/math] rectangles. As [math]n[/math] increases to infinity, the height of the single large rectangle becomes a good approximation for the average value of the continuous function on the interval [math][a,b][/math].