Difference between revisions of "Riemann Sums"
Line 9: | Line 9: | ||
the area that lies between the lines <math style="vertical-align: 0px">x=0</math>  and <math style="vertical-align: -4px">x=1, </math>  the <math style="vertical-align: 0px">x </math>-axis <math style="vertical-align: -5px">(y=0) </math>  | the area that lies between the lines <math style="vertical-align: 0px">x=0</math>  and <math style="vertical-align: -4px">x=1, </math>  the <math style="vertical-align: 0px">x </math>-axis <math style="vertical-align: -5px">(y=0) </math>  | ||
and the curve <math style="vertical-align: -4px">y=x^{2}. </math>  In order to find this area, we can begin | and the curve <math style="vertical-align: -4px">y=x^{2}. </math>  In order to find this area, we can begin | ||
− | with a familiar geometric object | + | with a familiar geometric object: the rectangle. In this case, we |
− | wish to find an area above the interval from 0 to 1. In order to approximate | + | wish to find an area above the interval from <math style="vertical-align: 0px">0</math> to <math style="vertical-align: -1px">1</math>. In order to approximate |
− | this, we can divide the interval into, say 4 shorter intervals of | + | this, we can divide the interval into, say <math style="vertical-align: 0px">4</math> shorter intervals of |
equal length. Let's call this length <math style="vertical-align: 0px">\Delta x </math>, and since they are | equal length. Let's call this length <math style="vertical-align: 0px">\Delta x </math>, and since they are | ||
− | all the same length, we know that the length of each will be <math style="vertical-align: | + | all the same length, we know that the length of each will be <math style="vertical-align: -5px">1/4. </math> |
However, in order to define an area, our rectangles require a height | However, in order to define an area, our rectangles require a height | ||
as well as a width. Most often, calculus teachers will use the function's | as well as a width. Most often, calculus teachers will use the function's | ||
value at the left or right endpoint for the height of each rectangle, | value at the left or right endpoint for the height of each rectangle, | ||
− | although we could also choose the minimum or maximum value of <math style="vertical-align: | + | although we could also choose the minimum or maximum value of <math style="vertical-align: -4px">f(x) </math> |
on each interval, or perhaps the value at the midpoint of each interval. | on each interval, or perhaps the value at the midpoint of each interval. | ||
Let's approximate this area first using left endpoints. Notice that | Let's approximate this area first using left endpoints. Notice that | ||
− | our leftmost interval is <math style="vertical-align: | + | our leftmost interval is <math style="vertical-align: -5px">[0,1/4], </math> so the height at the left endpoint |
− | is <math style="vertical-align: | + | is <math style="vertical-align: -5px">f(0)=0. </math> This means the area of our leftmost rectangle is |
:: <math style="vertical-align: 0px">f(0)\cdot\Delta x\,=\,0\cdot\left({\displaystyle \frac{1}{4}}\right)\,=\,0. </math> | :: <math style="vertical-align: 0px">f(0)\cdot\Delta x\,=\,0\cdot\left({\displaystyle \frac{1}{4}}\right)\,=\,0. </math> | ||
− | Continuing, the adjacent interval is <math style="vertical-align: | + | Continuing, the adjacent interval is <math style="vertical-align: -5px">[1/4,1/2]. </math> Now, our left endpoint |
− | is <math style="vertical-align: | + | is <math style="vertical-align: -5px">1/4 </math>, and our area is |
:: <math style="vertical-align: 0px">{\displaystyle f\left(\frac{1}{4}\right)\cdot\Delta x\,=\,\frac{1}{16}\cdot\frac{1}{4}\,=\,\frac{1}{64}}. </math> | :: <math style="vertical-align: 0px">{\displaystyle f\left(\frac{1}{4}\right)\cdot\Delta x\,=\,\frac{1}{16}\cdot\frac{1}{4}\,=\,\frac{1}{64}}. </math> | ||
− | The next interval to the right is <math style="vertical-align: | + | The next interval to the right is <math style="vertical-align: -5px">[1/2,3/4], </math> and as such the left |
− | endpoint is <math style="vertical-align: | + | endpoint is <math style="vertical-align: -5px">1/2, </math> so the area is |
:: <math style="vertical-align: 0px">{\displaystyle f\left(\frac{1}{2}\right)\cdot\Delta x\,=\,\frac{1}{4}\cdot\frac{1}{4}\,=\,\frac{1}{16}.} </math> | :: <math style="vertical-align: 0px">{\displaystyle f\left(\frac{1}{2}\right)\cdot\Delta x\,=\,\frac{1}{4}\cdot\frac{1}{4}\,=\,\frac{1}{16}.} </math> | ||
− | Finally, we have the rightmost rectangle, whose base is the interval <math style="vertical-align: | + | Finally, we have the rightmost rectangle, whose base is the interval <math style="vertical-align: -5px">[3/4,1]. </math> This has <math style="vertical-align: -5px">3/4 </math> as its left endpoint, so its area is |
:: <math style="vertical-align: 0px">{\displaystyle f\left(\frac{3}{4}\right)\cdot\Delta x\,=\,\frac{9}{16}\cdot\frac{1}{4}\,=\,\frac{9}{64}.} </math> | :: <math style="vertical-align: 0px">{\displaystyle f\left(\frac{3}{4}\right)\cdot\Delta x\,=\,\frac{9}{16}\cdot\frac{1}{4}\,=\,\frac{9}{64}.} </math> | ||
− | Adding these four rectangles up with sigma <math style="vertical-align: | + | Adding these four rectangles up with sigma <math style="vertical-align: -5px">(\Sigma) </math> notation, we |
can approximate the area under the curve as | can approximate the area under the curve as | ||
Line 55: | Line 55: | ||
Of course, we could also use right endpoints. In this case, we would | Of course, we could also use right endpoints. In this case, we would | ||
− | use the endpoints <math style="vertical-align: | + | use the endpoints <math style="vertical-align: -5px">1/4,\,1/2,\,3/4 </math> and 1 for each interval from |
left to right to find | left to right to find | ||
Revision as of 15:25, 20 September 2015
Approximating Area Under a Curve
Graphically, we can consider a definite integral, such as
to be the area "under the curve", which might be better said as the area that lies between the lines and the -axis and the curve In order to find this area, we can begin with a familiar geometric object: the rectangle. In this case, we wish to find an area above the interval from to . In order to approximate this, we can divide the interval into, say shorter intervals of equal length. Let's call this length , and since they are all the same length, we know that the length of each will be
However, in order to define an area, our rectangles require a height as well as a width. Most often, calculus teachers will use the function's value at the left or right endpoint for the height of each rectangle, although we could also choose the minimum or maximum value of on each interval, or perhaps the value at the midpoint of each interval.
Let's approximate this area first using left endpoints. Notice that our leftmost interval is so the height at the left endpoint is This means the area of our leftmost rectangle is
Continuing, the adjacent interval is Now, our left endpoint is , and our area is
The next interval to the right is and as such the left endpoint is so the area is
Finally, we have the rightmost rectangle, whose base is the interval This has as its left endpoint, so its area is
Adding these four rectangles up with sigma notation, we can approximate the area under the curve as
Of course, we could also use right endpoints. In this case, we would use the endpoints and 1 for each interval from left to right to find
Note that in this case, one is an overestimate and one is an underestimate.
Additional Examples with Fixed Numbers of Rectangles
Example 1. Approximate the area under the curve of from -1 to 3 using rectangles and left endpoints.
Solution. Note that our -values range from to , so our length is actually Thus each rectangle will have a base of
This is our first step. This means our intervals from left to right are and Choosing left endpoints, we have
Here is where the idea of ``area under the curve becomes clearer. We actually have a signed area, where area below the -axis is negative, while area above the -axis is positive.
Example 2. Approximate the area under the curve of from to using rectangles and midpoints.
Solution. Here, our -values range from to so
As a result, our intervals from left to right are and More importantly, our midpoints occur at and respectively; this is where we will evaluate the height of each rectangle. Thus
Here is where the idea of ``area under the curve becomes clearer. We actually have a signed area, where area below the -axis is negative, while area above the -axis is positive.
Defining the Integral as a Limit
Although associating the area under the curve with four rectangles gives us a really rough approximation, there's no reason we can't continue to divide (partition) the interval into smaller pieces, and then get closer to the actual area. The graphic on the right shows precisely the idea. We can keep making the base of each rectangle, or smaller and smaller, and we'll get a better approximation. More importantly, we can continue this idea as a limit, leading to the following definition.
Definition. We define the Definite Integral of on written
to be
For an introductory course, we usually have so each rectangle has exactly the same base.
Using the Definition to Evaluate a Definite Integral
Frequently, students will be asked questions such as: Using the definition of the definite integral, find the area under the curve of the function on the interval using right endpoints.
Rather than using ``easier rules, such as the power rule and the Fundamental Theorem of Calculus, this requires us to use the the definition just listed. The first step is to set up our sum. We have and is just an arbitrary natural (or counting) number. This tells us that
For a given , our leftmost interval would start at and be of length This describes the interval On the other hand, our next interval would start where the leftmost stopped, or , and it's length would also be This is the interval
If we call the leftmost interval then we would have Similarly, our second interval would be If we were to continue this rule, we would have that for any we could write This allows us to determine where to choose our height for each interval. Since we are asked to use right endpoints, we would want for for and finally for
This allows us to build the sum. For an arbitrary we would have
Using this result, we now have
Now, we have several important sums explained on another page. These are the sum of the first numbers, the sum of the first squares, and the sum of the first cubes:
Moreover, we have some basic rules for summation. These rules that make sense in simpler notation, such as
- or
work the same way in Sigma notation, meaning
and
Before worrying about the limit as , when we write both and the in the denominator are just constants, like the in As a result we have
where we applied the rule for the first squares. Finally, we can look at this as being approximately for large so the limit as is Thus
A Left Point of View
What would change if we approached the above integral through left endpoints, instead of right? We would only be changing our value for For example, the leftmost interval is so our left endpoint is On the other hand, our second interval is so our left endpoint is For the interval our left endpoint is Let's apply the same process to this value. We have
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{array}{rcl} {\displaystyle \int_{0}^{3}x^{2}\, dx} & = & {\displaystyle \lim_{n\rightarrow\infty}\,\sum_{i=1}^{n}f(x_{i})\cdot\Delta x_{i}}\\ \\ & = & {\displaystyle \lim_{n\rightarrow\infty}\,\sum_{i=1}^{n}\left(\frac{3(i-1)}{n}\right)^{2}\cdot\frac{3}{n}}\\ \\ & = & {\displaystyle \lim_{n\rightarrow\infty}\,\sum_{i=1}^{n}\frac{9(i-1)}{n^{2}}^{2}\cdot\frac{3}{n}}\\ \\ & = & {\displaystyle \lim_{n\rightarrow\infty}\,\sum_{i=1}^{n}\frac{27(i-1)}{n^{3}}^{2}}\\ \\ & = & {\displaystyle \lim_{n\rightarrow\infty}\,\frac{27}{n^{3}}\sum_{i=1}^{n}(i^{2}-2i+1).} \end{array} }
From here, we use the special sums again. This means that
Thus our choice of endpoints makes no difference in the resulting value.
A More Advanced Example
For most Riemann Sum problems in an integral calculus class, will always be the same width, and we will need to use the special sums to evaluate the limit. However, what can we do if we wish to determine the value of
Using rectangles of the same width as shown in the earlier animation would result in a very messy sum which contains a lot of square roots! This makes finding the limit nearly impossible. Instead, we could consider the inverse function to the square root, which is squaring. Instead of choosing let's consider and let
For example, while In particular, since we indexed the leftmost point as this means that
Each will be a different width, but either endpoint would be a square, so taking will not leave a square root in our sum.
Now we have all the pieces. Let's use right endpoints for the height of each rectangle, so Then
You will NEVER see something like this in a first year calculus class, but it is just a reminder that the definition includes the indexed for a reason!