Next: About this document ...
The purpose of this lab is to acquaint you with some rectangular
approximations to integrals.
Integration, the second major theme of calculus, deals with areas,
volumes, masses, and averages such as centers of mass and gyration.
In lecture you have learned that the area under a curve between two
points and can be found as a limit of a sum of areas of
rectangles which approximate the area under the curve of interest.
Not all ``area finding'' problems can be solved using analytical
techniques. The Riemann sum definition of area under a curve gives
rise to several numerical methods which can approximate the area of
interest with great accuracy.
Suppose is a non-negative, continuous function defined on some
interval . Then by the area under the curve between
and we mean the area of the region bounded above by the
graph of , below by the -axis, on the left by the vertical
line , and on the right by the vertical line . All of the
numerical methods in this lab depend on subdividing the interval
into subintervals of uniform length.
In these simple rectangular approximation methods, the area above each
is approximated by the area of a rectangle, with the height of the
rectangle being chosen according to some rule. In particular, we will
consider the left, right and midpoint rules.
The Maple student package has commands for visualizing these
three rectangular area approximations. To use them, you first must
load the package via the with command. Then try the three commands
given below to help you understand the differences between the
three different rectangular approximations. Note that
the different rules choose rectangles which in
each case will either underestimate or overestimate the area.
There are also Maple commands leftsum, rightsum, and
middlesum to sum the areas of the rectangles, see the
examples below. Note the use of evalf to obtain the desired numerical
It should be clear from the graphs that adding up the areas of the
rectangles only approximates the area under the curve. However, by
increasing the number of subintervals the accuracy of the
approximation can be improved. One way to measure how good the
approximation is is the
absolute error, which is the difference between the actual answer and the
estimated answer. Later on in the course, you
will learn techniques for finding the exact answer. Approximations,
however, are important because exact answers cannot always be found.
All of the Maple commands described so far in this lab can include a third
argument to specify the number of subintervals. The default is 4
subintervals. The example below approximates the area under
from to using the rightsum command with 50,
100, 320 and 321 subintervals. As the number of subintervals
increases, the approximation gets closer and closer to the exact
answer. You can see this by assigning a label to the approximation,
assigning a label to the exact answer and taking their
difference. The closer you are to the actual answer, the smaller the
difference. The example below shows how we can use Maple to
approximate this area with an absolute error no greater than 0.1.
> exact := 4^3/3;
> estimate := evalf(rightsum(x^2,x=0..4,50));
> estimate := evalf(rightsum(x^2,x=0..4,100));
> estimate := evalf(rightsum(x^2,x=0..4,320));
> estimate := evalf(rightsum(x^2,x=0..4,321));
- For the function
over the interval , use the leftbox command to plot the rectangular approximation of the area above the -axis and under with 6 rectangles. Estimate the area under the curve with a Riemann Sum using the formula for the left-endpoint rule and show that you get the same answer when using the leftsum command. State whether your answer is an overestimate or underestimate and explain why.
- The exact value of the area under
over the interval
. Enter this value into Maple and label it exact. Use the command leftsum to estimate the area and find the minimum number of rectangles needed to approximate this area with absolute error no greater than 0.01.
- The equation represents a circle of radius . Enter the exact area in Maple and label it as exact.
- Solve the above equation for as a function of and use the positive function to represent the upper half of the circle whose area you are trying to approximate. Enter this function into Maple.
- Use the area approximations rightsum and middlesum (and symmetry) to determine the minimum number of rectangles required to estimate the area of the circle with error no greater than 0.01.
- Based on your results in parts 3, state which approximation method is better, right hand endpoint rule or the midpoint rule, and explain why.
Next: About this document ...
Dina J. Solitro-Rassias