Riemann Integral
Text A Riemann sum is constructed by dividing a rectangular domain R into subrectangles R_{ij} and multiplying their area by a height funtion f. This is commonly denoted
\[ S_n = \sum_{i,j=0}^{n1} f(c_{ij}) (x_{i+1}x_i) (y_{j+1}y_j), \]
where x_{i}, x_{i+1}, y_{j}, y_{j+1} are the vertices of R_{ij} and c_{ij} is a point chosen inside of R_{ij}.
The method for summing the volume under a function graph described in the previous section used a height function which took the lowest point on the function graph above the subrectangle, called a lower sum. Similarly, an upper sum can be used by using a height function which takes the highest point on the function graph above the subrectangle.
A Riemann integral is obtained by letting the number of divisions in a Riemann sum go to infinity:
\[ \int_R \int f(x,y) dx dy = \lim_{n \to \infty} S_n.\]
Demos
Upper Rectangular Prisms
 
This demo shows the Upper Sum for the function graph of f(x,y)=x^{2}  0.1y^{2} + .2, whose Upper Sum was already shown in part section 2.4.1.

Difference of Rectangular Prisms
 
This last demo effectively summarizes the connection between Upper and Lower Sums. The Upper Sum gives an upper bound on the value for the volume under the function graph, and the Lower Sum gives a lower bound. Increasing the "res" variable, you can see that the difference between the Upper and Lower Sum grows smaller and smaller. This demonstrates that the Upper and Lower Prisms converge to the same volume, and thus the Riemann integral of the volume under a function graph is defined.

Exercises 1. In single variable calculus, midpoint Riemann integrals are offered as an alternative to lower and upper sums. Is there a similar alternative to lower and upper sums for integrals over two variables?
2. Another alternative to lower and upper sums in single variable calculus is the trapezoidal approximation. Find an analogous alternative to the rectangular prisms used in this lab and in lab 2.4.1, and describe this alternative explicitly.
3. What other alternatives to lower and upper sums can you come up with?
