
Suppose that a function $f$ is continuous and nonnegative on an interval $[a,b]$. Let's compute the area of the region $R$ bounded above by the curve $y=f(x)$, below by the xaxis, and on the sides by the lines $x=a$ and $x=b$.
We will obtain this area as the limit of a sum of areas of rectangles as follows: First, we will divide the interval $[a,b]$ into $n$ subintervals \[ [x_0, x_1], [x_1, x_2], \ldots, [x_{n1}, x_n] \] where $a = x_0 < x_1 < \ldots < x_n = b$. (This is called a partition of the interval.) The intervals need not all be the same length, so call the lengths of the intervals $\Delta x_1$, $\Delta x_2$, \ldots, $\Delta x_n$, respectively. This partition divides the region $R$ into $n$ strips.
Next, let's approximate each strip by a rectangle with height equal to the height of the curve $y=f(x)$ at some arbitrary point in the subinterval. That is, for the first subinterval $[x_0, x_1]$, select some $x_1^\ast$ contained in that subinterval and use $f(x_1^\ast)$ as the height of the first rectangle. The area of that rectangle is then $f(x_1^\ast) \Delta x_1$.
Similarly, for each subinterval $[x_{i1}, x_i]$, we will choose some $x_i^\ast$ and calculate the area of the corresponding rectangle to be $f(x_i^\ast) \Delta x_i$. The approximate area of the region $R$ is then the sum $\sum_{i=1}^n f(x_i^\ast) \Delta x_i$ of these rectangles.
Depending on what points we select for the $x_i^\ast$, our estimate may be too large or too small. For example, if we choose each $x_i^\ast$ to be the point in its subinterval giving the maximum height, we will overestimate the area of $R$. (This is called a upper sum.)
If, on the other hand, we choose each $x_i^\ast$ to be the point in its subinterval giving the mimimum height, we will underestimate the area of $R$. (This is called a lower sum.)
When the points $x_i^\ast$ are chosen randomly, the sum $\sum_{i=1}^n f(x_i^\ast) \Delta x_i$ is called a Riemann Sum
and will give an approximation for the area of $R$ that is in between the lower and upper sums. The upper and lower sums may be considered specific Riemann sums. As we decrease the widths of the rectangles, we expect to be able to approximate the area of $R$ better. In fact, as max $\Delta x_i \rightarrow 0$, we get the exact area of $R$, which we denote by the definite integral $\int_a^b f(x)\,dx$. That is, \[\int_a^b f(x)\,dx = \lim_{max \Delta x_i\rightarrow 0} \left(\sum_{i=1}^n f(x_i^\ast)\Delta x_i\right).\]
The following Exploration allows you to approximate the area under various curves under the interval $[0, 5]$. You can create a partition of the interval and view an upper sum, a lower sum, or another Riemann sum using that partition. The Exploration will give you the exact area and calculate the area of your approximation. To create a partition, choose which type of sum you would like to see and click the mouse between the partition labels $x_0$ and $x_1$.
Key ConceptLet $f$ be defined on $[a, b]$ and let ${x_0, x_1, \ldots, x_n}$ be a partition of $[a, b]$. For each $[x_{i1}, x_i]$, let $x_i^\ast \in [x_{i1}, x_i]$. Then the definite integral of $f$ over $[a, b]$ as defined as \[\int_a^b f(x)\,dx = \lim_{max \Delta x_i\rightarrow 0} \left(\sum_{i=1}^n f(x_i^\ast)\Delta x_i\right).\] 