In this demonstration, you may input a function f(x) in the
control panel. The number of rectangles in the partition is determined
by the variable "resolution". The partition is constructed so that the
rectangles have equal width (b - a)/n. Two sets of Riemann
sums can be displayed. The "LeftRectangles" option uses rectangles with
height f(xj) over the segment [xj,
xj+1] and the sum is written as Sleft(f)
= ∑j f(xj) (xj+1 - xj),
where j goes from 0 to n - 1. The
"RightRectangles" option uses rectangles with height f(xj+1)
over the segment [xj, xj+1] and the sum
is written as Sright(f) = ∑j f(xj+1)
(xj+1 - xj), where j goes from 0
to n - 1. If f(x)
is monotone increasing or decreasing over the given interval, then
these two sums can also be called upper and lower Riemann sums because
they would set upper and lower limits on the area A under the
function graph: Slower(f) < A < Supper(f).
As the number of partitions increases, the difference between the upper
and lower sums goes to zero if the function is Riemann integrable. The
limit that the upper and lower sums approach is called the Riemann
integral and expressed notationally as ∫ab
f(x) dx.