Numerical Integration with the Trapezoidal Rule
The trapezoidal rule uses trapezoids instead of rectangles to approximate the definite interval over a closed bounded interval. By using points on the graph of the function determined by a uniform width partition of the interval the upper boundary of the trapezoid is formed. Recall that the area of a trapezoid is one half the width times the sum of the two heights; and by using this formula we can add up the areas to approximate the definite integral. Of course the more subintervals, (or said another way: the more trapezoids) the more accuracy of the estimation.
Consider
on
and say we want to find the area. We could use rectangles as in a Riemann sum; however from inspection of the following diagram it might seem more reasonable to use trapezoids:
![numerical integration with the trapezoidal rule _gr_3.gif]](pages/numerical-integration-with-the-trapezoidal-rule/Images/numerical-integration-with-the-trapezoidal-rule_gr_3.gif)
The area is underestimated but not as much as using rectangles would (with the same partition).
Definition (Trapezoidal Rule) The trapezoidal rule estimates the definite integral of
over
using the formula,
![]()
where
and
The trapezoidal rule formula can be simplied as follows,
![]()
![numerical integration with the trapezoidal rule _gr_10.gif]](pages/numerical-integration-with-the-trapezoidal-rule/Images/numerical-integration-with-the-trapezoidal-rule_gr_10.gif)
![numerical integration with the trapezoidal rule _gr_11.gif]](pages/numerical-integration-with-the-trapezoidal-rule/Images/numerical-integration-with-the-trapezoidal-rule_gr_11.gif)
![numerical integration with the trapezoidal rule _gr_12.gif]](pages/numerical-integration-with-the-trapezoidal-rule/Images/numerical-integration-with-the-trapezoidal-rule_gr_12.gif)
which is particularly nice if you want to program or pass a limit.
Example (Trapezoidal Rule) Consider
on
and let
be a partition of the interval
(so
).
![numerical integration with the trapezoidal rule _gr_18.gif]](pages/numerical-integration-with-the-trapezoidal-rule/Images/numerical-integration-with-the-trapezoidal-rule_gr_18.gif)
![numerical integration with the trapezoidal rule _gr_19.gif]](pages/numerical-integration-with-the-trapezoidal-rule/Images/numerical-integration-with-the-trapezoidal-rule_gr_19.gif)
which is a much better estimation than using rectangles with the same partition.
Definition (Error in the Trapezoidal Rule) If
has a continuous second derivative on
then the error
in approximating
by the trapezoidal rule satisfies:
![]()
where
is the maximum value of
on
Numerical Integration With The Trapezoidal Rule
Published by Library of Math -- Online math organized by subject into topics.
Written by Smith, David A.
http://www.libraryofmath.com/numerical-integration-with-the-trapezoidal-rule.html


