You are about to erase your work on this activity. Are you sure you want to do this?
Updated Version Available
There is an updated version of this activity. If you update to the most recent version of this activity, then your current progress on this activity will be erased. Regardless, your record of completion will remain. How would you like to proceed?
Mathematical Expression Editor
We introduce the basic idea of using rectangles to approximate the area under a
curve.
1 Rectangles and areas
We can calculate the areas of many different shapes: rectangles, triangles, trapezoids,
circles, ... etc. What about the area of something like the region under the graph of a
function?
We want to compute the area between the curve \(y=f(x)\) and the horizontal axis on the interval \([a,b]\):
One way to do this would be to approximate the area with
rectangles. With one rectangle we get a rough approximation:
Two rectangles might make a better approximation:
With even more, we get a closer, and closer, approximation:
If we are approximating the area between a curve and the \(x\)-axis on \([a,b]\) with \(n\) rectangles of width \(\Delta x\), then
\[ \Delta x = \frac {b-a}{n}. \]
Suppose we wanted to approximate area between the curve \(y=x^2+1\) and the \(x\)-axis on the
interval \([-1,1]\), with \(8\) rectangles. What is \(\Delta x\)?
\[ \Delta x = \answer [given]{1/4} \]
As we add rectangles, we are more closely approximating the area we are interested in:
We could find the area exactly if we could compute the limit as the width of the
rectangles goes to zero and the number of rectangles goes to infinity.
Let’s setup some notation to help with these calculations:
When approximating an area with \(n\) rectangles, the grid points
\[ x_0,x_1,x_2,\dots ,x_n \]
are the \(x\)-coordinates that
determine the edges of the rectangles. In the graph below, we’ve numbered the rectangles
to help you see the relation between the indices of the grid points and the \(k\)th rectangle.
Note, if we are approximating the area between a curve and the horizontal axis on \([a,b]\)
with \(n\) rectangles, then it is always the case that
\[ x_0=a\qquad \text {and}\qquad x_n = b. \]
If we are approximating the area between a curve and the horizontal axis with \(11\)
rectangles, how many grid points will we have?
You can draw it!
We’ll have \(\answer [given]{12}\)
grid points.
2 But which set of rectangles?
When we use \(n\) rectangles to compute the area under a curve, the width of each
rectangle is \(\Delta x=\frac {b-a}{n}\). It is clear that \(\Delta x=x_k-x_{k-1}\), for \(k=1,\dots , n\).
This means:
\begin{align*} x_0 &= a\\ x_1 &= a + \Delta x\\ x_2 &= a + 2\Delta x\\ x_3 &= a + 3 \Delta x\\ ... & ...\\ x_n &= a + n\Delta x = b \end{align*}
This gives us a formula for the \(k^{th}\) grid point
\[ x_k = a + k\Delta x. \]
That tells us about the sides of the rectangles, but how do we determine the height of
the rectangle?
We choose a sample point\(x_k^*\) in \([x_{k-1}, x_k]\) and evaluate the function at
that point. The value \(f(x_k^*)\) determines the height of a rectangle.
When approximating an area with rectangles, a sample point is the \(x\)-coordinate
that determines the height of \(k^{th}\) rectangle. For \(k=1,\dots , n\), we denote a sample point as:
\[ x_k^* \]
which lies in the subinterval \([x_{k-1}, x_k]\) and the value
\[ f( x_k^*) \]
is the height of the \(k^{th}\) rectangle.
There are two different types of points whose notation look very similar.
The grid points: \(x_0, x_1, \dots , x_n\) and the sample points \(x^*_1, x^*_2, \dots , x^*_n\). Grid points tell us the left and
right sides of the rectangles that we’re building. Sample points get plugged
into the function to find the heights of the rectangles. We have a formula
for the grid points \(x_k = a + k \Delta x\), but we do not always have a formula for the sample
points.
What is the area of the \(k^{th}\) rectangle shown in the figure above?
\(A=\Delta x \)\(A=f(x)\Delta x \)\(A= f( x_k^*)x_k^*\)\(A= f( x_k^*)\Delta x\)\(A=f(x)x\)\(A=k\Delta k\)\(A= f( x_k^*)(x_k-x_{k-1})\)
The sample points \(x_k^*\) can be any point in the subinterval \([x_{k-1}, x_k]\), but there are a few standard
choices we can make to help our calculations. Here are three options for sample
points that we frequently consider:
2.1 Rectangles defined by left-endpoints
We can set the rectangles up so that the sample point is the left-endpoint,
\(x_k^* = x_{k-1}\).
In the graph above, the \(k^{th}\) rectangle’s left-endpoint determines the height of the
rectangle.
2.2 Rectangles defined by right-endpoints
We can set the rectangles up so that the right-endpoint determines the height,
\(x_k^* = x_{k}\).
In the graph above, the \(k^{th}\) rectangle’s right-endpoint of the base determines the
height.
2.3 Rectangles defined by midpoints
We can set the rectangles up so that the midpoint of the base determines the height,
\(x_k^* = \dfrac {x_{k-1}+x_k}{2}\).
In the graph above, the midpoint of the base of the \(k^{th}\) rectangle determines the
height.
3 Riemann sums and approximating area
Once we know how to identify our rectangles, we can compute approximations of
some areas. If we are approximating area with \(n\) rectangles, then
\begin{align*} \text {Area} &\approx \sum _{k=1}^n (\text {height of $k^{th}$ rectangle})\times (\text {width of $k^{th}$ rectangle}) \\ &=\sum _{k=1}^n f(x_k^*)\Delta x \\ &= f(x_1^*)\Delta x + f(x_2^*)\Delta x + f(x_3^*)\Delta x + \dots + f(x_n^*)\Delta x. \end{align*}
A sum of the form:
\[ \sum _{k=1}^n f(x_k^*)\Delta x = f(x_1^*)\Delta x + f(x_2^*)\Delta x + \dots + f(x_n^*)\Delta x \]
is called a Riemann sum, pronounced “ree-mahn” sum.
A Riemann sum computes an approximation of the area between a curve and the
\(x\)-axis on the interval \([a,b]\). It can be defined in several different ways. In our
class, it will be defined via left-endpoints, right-endpoints, or midpoints.
Here we see the explicit connection between a Riemann sum defined by
left-endpoints and the area between a curve and the \(x\)-axis on the interval \([a,b]\):
and here is the associated Riemann sum
\[ \sum _{k=1}^5 f(x_k^*)\Delta x = f(x_1^*)\Delta x + f(x_2^*)\Delta x + f(x_3^*)\Delta x + f(x_4^*)\Delta x + f(x_5^*)\Delta x. \]
3.1 Left Riemann sums
Consider \(f(x) = x^3/8-x+2\). Approximate the area between the curve \(y=f(x)\) and the \(x\)-axis on the interval \([-1,3]\)
using a left-endpoint Riemann sum with \(n=5\) rectangles.
First note that the width of each rectangle is
\[ \Delta x = \frac {3-(-1)}{5} = \answer [given]{4/5}. \]
The grid
points define the edges of the rectangle and are seen below:
On the other hand, the sample points identify which endpoints we use:
It is helpful to collect all of this data into a table:
Consider \(f(x) = x^3/8-x+2\). Approximate the area between the graph of \(f\) and the \(x\)-axis on the interval \([-1,3]\)
using a right-endpoint Riemann sum with \(n=5\) rectangles.
First note that the width of each rectangle is
\[ \Delta x = \frac {3-(-1)}{5} = \answer [given]{4/5}. \]
The grid
points define the edges of the rectangle and are seen below:
On the other hand, the sample points identify which endpoints we use:
It is helpful to collect all of this data into a table:
Consider \(f(x) = x^3/8-x+2\). Approximate the area between the graph of \(f\) and the \(x\)-axis on the interval \([-1,3]\)
using a midpoint Riemann sum with \(n=5\) rectangles.
First note that the width of each rectangle is
\[ \Delta x = \frac {3-(-1)}{5} = \answer [given]{4/5}. \]
The grid
points define the edges of the rectangle and are seen below:
On the other hand, the sample points identify which endpoints we use:
It is helpful to collect all of this data into a table:
There is more area under the graph of the function that was not included in the
collection of rectangles. That means this approximation is an overestimateunderestimate.
Consider the function
\[ f(x) = 16 - x^2 \]
on the interval \([0,4]\). We will approximate the area between the
graph of \(f\) and the \(x\)-axis on the interval \([0,4]\) using a right Riemann sum with \(n\) rectangles.
First, determine the width of each rectangle.
In the first sum above, the constant \(16\)
is added \(n\) times, and we have a formula for the second sum. Recall: \(\sum _{k=1}^n k^2=\frac {n(n+1)(2n+1)}{6}\). Therefore,
This approximation is an overestimateunderestimate.
In our previous example we have computed a right Riemann sum for \(n=8\). Check
whether your result was correct by plugging in \(n=8\) in the formula above.
Now, we
can take the limit of Riemann sums as \(n\to \infty \) to find the exact value of the area
of the region under the curve \(y=f(x)\) on the interval \([0,4]\). Namely,
Riemann sums approximate the area between curves and the \(x\)-axis via rectangles.
When computing this area via rectangles, there are several things to know:
What interval are we on? In our discussion above we call this \([a,b]\).
How many rectangles will be used? In our discussion above we called this
\(n\).
What is the width of each individual rectangle? In our discussion above
we called this \(\Delta x\).
What points will determine the height of the rectangle? In our discussion
above we called these sample points, \(x_k^*\), and they can be left-endpoints,
right-endpoints, or midpoints.
What is the actual height of the rectangle? This will always be \(f(x_k^*)\).
We approximate the area \(A\) with a Riemann sum
\(A\approx \sum _{k=1}^n f(x_k^*)\Delta x\).
As \(n\) gets bigger and bigger, \(\Delta x\) gets smaller and smaller, and approximation
gets better and better. We compute the exact value of \(A\) by taking the limit
of Riemann sums