Numerical Methods for Evaluating the Definite Integral
__________________________________
___________________________________________
Once the definite integral is defined, we need to find an efficient method for evaluating a given definite integral. The Riemann definition of the integral does not indicate how in practice we might calculate the area under a curve, and the method of antiderivatives will not work if no antiderivative exists. How then do we evaluate a definite integral if we cannot use antiderivatives? In this lab we will explore some of the simplest numerical methods that can be used to approximate a definite integral. These methods are referred to as Integration Rules.
The Left and Right Sum Rules
We begin by making a set of rectangles. One of the easiest ways to simplify the area calculations of the rectangles is to divide the interval [a, b] into subintervals of equal length. Thus, each of the rectangles will have the same width, denoted as Dx.
Furthermore, for starters, we might as well explore the rules created by using the left or right endpoints of the subdivisions to calculate the heights of the rectangles.
Example:
Let
be the given function,
and
be the left and right
|
The only purpose of the items in this box is to enable graphing of the bars.
You can ignore them.
endpoints of the interval respectively.
We select
for the number of subdivisions.
|
|
Define:
and
is the width of each rectangle
|
|
|_________________________________
Figure 1.
Figure 2.
We can use Mathcad to calculate the Riemann sums associated with Figures 1 and 2 by first setting the range variables with a step size of Dx as follows:
These are the x values where f is evaluated to find the height of the individual rectangles. Next, we add the areas of these rectangles together.
LeftSum
=
RightSum =
For we observe for all values of n:
Change the value for n in the yellow highlighted region above and find the numerical sums for different values of n. You might consider how quickly the sequence of sums converge to a particular value as n becomes large. This limit should be the exact area under the curve.
The Midpoint and Trapezoidal Rules
Two other methods to numerically calculate the value of a definite integral are the Midpoint Rule and the Trapezoidal Rule.
The Midpoint Rule uses the function value at the midpoint of each subinterval (rather than at the left or right endpoints) to determine the height of each rectangle.
The Trapezoidal Rule differs from the other rules in that each term in the sum is the area of a trapezoid, rather than a rectangle. However, as will be observed below, the Trapezoidal Rule is really just the average of the left and right Riemann sums. The following graphs illustrate both of these methods:
|
|
|
|
|
Midpoint
Trapeziodal
|
|
|
|_______________________________________
As before,
Note: For n values greater than 70, computer error becomes too large for accurate approximation!
Midpoint=
Trapezoidal =
Compare these with:
LeftSum =
Rightsum
=
Exact =
Assignment:
Problem 1: The Space Shuttle
Solutions
The Space Shuttle mission STS-72 has a velocity launch profile in feet per second, modeled by the cubic equation

.

The area under the curve over the time interval of [0, 126] (in seconds) is equal to the distance traveled during this time interval. Use the midpoint rule to find the distance traveled by the space shuttle in the first 126 seconds after liftoff.
Problem 2: The Golden Gate
The Golden Gate Bridge has a main span of 4,200 feet, that is, the distance between the two towers. The main suspension cables that support the road over this span each form a parabolic shape. The length of each cable is found by:
where each unit represents 100 feet. Use the trapezoidal rule to find the length of the cable between the two towers. (Hint: Use the integrand, the function inside of the integral for computation.)
Problem 3:
Compare the area approximations found for the curve over [0, 2] using the midpoint and right-sum rules. For each of these rules, determine the smallest number of partitions, the least value for n, such that the absolute error of your approximation, e < 0.01.
| ApproxArea - ExactArea| < 0.01
_________________________________________________________