Next: Trapezoid Rule
Up: Area Under the Curve
Previous: Area Under the Curve
Figure 7.2:
The approximate area under the curve f(x), using rectangles whose
height is such that their left upper point lies on the curve f(x).
|
|
A first, very simple, scheme is to approximate the function f(x) on
each interval by a constant, and considering the area of the rectangle
of width
h = xi+1 - xi and height f(xi) for the ith
interval. It is then a simple matter to compute the sum of the areas
of all the rectangles from
to
.
The choice of
using rectangles whose height agrees with the function f(x) at their
left sides introduces a bias in the estimate of the integral. We would
be equally justified in choosing the height of each rectangle so that
the right upper corner lies on the curve f(x), or even such that the
mid-point of the top of each rectangle lies on the curve f(x).
If we choose a sufficiently small step-size, h, we can attain
sufficient accuracy in the value of the integral, but at the
cost of many evaluations of the integrand, f(x).
It is clear that not choosing a sufficiently small step-size can
lead to a systematic error. Consider the integral of the function,
f(x), shown in Figure 7.2, but now for x in the
interval from x1 to the value of x where the maximum of f(x)
occurs. Each of the rectangles in this restricted range of x lies
completely the curve f(x). The area of each rectangle is less than
the area under that segment of the curve f(x) by the area of what
is roughly a triangle of base length h and height
f(xi+1) - f(xi).
If we now consider the integral from the maximum of f(x) to xn+1,
a similar effect is apparent, but now the rectangles yield areas that
are in excess of the area under f(x) by the areas of roughly triangles
with similarly defined areas.
Next: Trapezoid Rule
Up: Area Under the Curve
Previous: Area Under the Curve
Charles Dyer
2002-04-24