In this demo, rectangular prisms are used to approximate the volume underneath a function graph. Here we show the so-called lower sum: The top faces of the prisms are all horizontal, and their height zij is given by the lowest value f attains on the corners of the prism. Note that unless the base of a particular prism contains a critical point, this is also the lowest value f attains over all of the base. Thus, the sum of the volumes of all the prisms is always less than the actual volume under the function graph, no matter what resolution you choose.

The domain is a rectangular domain of the form a ≤ x ≤ b, c ≤ y ≤ d. The initial values are set to a = c = 0, b = d = 1. You can change the domain into any rectangular domain by adjusting the values for domain and domainy.

The "res" and "step" variables are controlled by "tape deck" controllers. The "step" variable controls in increments of one sixth how much of the graph is filled in. The "res" variable controls the number of subdivisions in the approximation. You can increase the number of subdivisions to observe that the finer the subdivision, the closer the approximation gets to the actual value of the volume integral. Selecting a "res" value greater than 18 is not recommended on slower machines.

Note that this demo does not examine the case that the step/res values of x and y change separately. This feature is purposely left out until lab 2.4.4, which discusses the order of integration.