|
TRAPEZOIDAL RULE OF INTEGRATION AN INTERACTIVE EBOOK
|
|
|
On non Internet Explorer
browsers, the equations may not show up. As an alternative or if you
prefer, you can see the pdf version of the ebook instead |
|
Title |
An interactive e-book for illustrating the Trapezoidal Rule for numerical integration. |
|
Creator |
Autar K Kaw |
|
Subject and Keywords |
Trapezoidal Rule, Numerical Integration, Mathcad, Maple, Mathematica, Matlab, Simulations. |
|
Description |
This is an interactive E-book for illustrating Trapezoidal rule. It includes links to simulations in Mathcad, Maple, Mathematica and Matlab for the algorithm, multiple choice quizzes, problem set, and a PowerPoint presentation. |
|
Publisher |
Holistic Numerical Methods Institute, College of Engineering, University of South Florida, Tampa, FL 33620-5350. |
|
Contributors |
Autar Kaw, Michael Keteltas |
|
Format |
Text/HTML |
|
Last Revised |
June 14, 2004 |
|
Identifier |
http://numericalmethods.eng.usf.edu/ebooks/trapezoidal_07int_ebook.pdf |
|
Language |
English |
|
Rights |
|
|
Single-segment Trapezoidal Rule Multiple-segment Trapezoidal Rule Error in Multiple-segment Trapezoidal Rule Method 1: Derived from Calculus Method 2: Also derived from Calculus Method 3: Derived from Geometry Method 4: Derived from Method of Coefficients Method 5: Another approach on the Methods of Coefficients Examples Example 1: Single segment Trapezoidal Rule Example 2: 2-segment Trapezoidal Rule Example 3: Multiple-segment Trapezoidal Rule Example 4: Multiple-segment Trapezoidal Rule Simulations Method [MAPLE] [MATHCAD] [MATHEMATICA] [MATLAB] Convergence [MAPLE] [MATHCAD] [MATHEMATICA] [MATLAB]
Problem Sets Multiple choice question examination |
|
This is an example of how an instructor of a Numerical Methods course can develop an E-book on a single topic by using resources that are only available at the Holistic Numerical Methods Institute (HNMI) Website. Although one of the primary advantages of a web-based resource is that one can use documents outside of its own domain, we are particularly using this example as a way to illustrate the holistic nature of the resources available at HNMI. You are welcome to modify and edit this e-book to suit your purpose. Using the textbook document written in MS Word 2000 as a foundation, it was made interactive within MS Word 2000 by putting bookmarks and hyperlinks to background information, PowerPoint presentations, Mathcad simulations, historical anecdotes, multiple choice tests, problem sets, etc. Then the MS Word 2000 file was saved as a webpage and that is what you are about to read here. Back to TOC |
|
Integration is the process of measuring the area under a function plotted on a graph. Why would we want to do so? Among the most common examples are finding the velocity of a body from acceleration functions, and displacement of a body from velocity data. Throughout the engineering fields, there are (what sometimes seems like) countless applications for integral calculus. Sometimes, the evaluation of expressions involving these integrals can become daunting, if not indeterminate. For this reason, a wide variety of numerical methods have been developed to find the integral. Here, we will discuss the trapezoidal rule of approximating integrals of the form
Trapezoidal rule is based on the Newton-Cotes formula that if one approximates the integrand by an nth order polynomial, then the integral of the function is approximated by the integral of that nth order polynomial. Integrating polynomials is simple and is based on the calculus formula.
So if we want to approximate the integral
to find the value of the above integral, one assumes
where
where
Back to TOCDEREVATION OF THE TRAPEZOIDAL RULE:
Method 1: Derived from CalculusHence
But what is a0 and a1?
Now if one chooses,
Solving the above two equations
for
Hence from Equation (5),
Back to TOCMethod 2: Also derived from Calculus
Hence
This gives the same result as Equation (10) because they are just different forms of writing the same polynomial.
Back to TOCMethod 3: Derived from Geometry
Figure 2: Geometric Representation Back to TOCMethod 4: Derived from Method of CoefficientsTrapezoidal rule can also be derived by the method of coefficients. The formula
where
The interpretation is that
Assume
Let the right hand side be an
exact expression for integrals of
Solving the above two equations gives
Hence
Method 5: Another approach on the Method of Coefficients Trapezoidal rule can also be derived by the method of coefficients by another approach
Assume
Let the right hand side be exact for integrals of the form
So
But we want
to give the same result as
Equation (20) for
Hence from Equations (20) and (22),
Since
Again, solving the above two equations (23) gives
Therefore
The vertical distance covered
by a rocket from a) Use single segment Trapezoidal rule to find the distance covered. b) Find the true error, Et for part (a). c) Find the absolute relative true error for part (a).
Solutiona)
b) The exact value of the above integral is
so the true error is
c) The absolute relative true
error,
Multiple-segment Trapezoidal Rule: In Example 1, the true error using a single segment trapezoidal rule was large. We can divide the interval [8, 30] into [8, 19] and [19, 30] intervals and apply Trapezoidal rule over each segment.
Hence
The true error,
The true error now is reduced
from 807 m to 205 m. Extending this procedure to dividing
The integral I can be broken into h integrals as
Applying Trapezoidal rule Equation (27) on each segment gives
Simulations Method [MAPLE] [MATHCAD] [MATHEMATICA] [MATLAB] Convergence [MAPLE] [MATHCAD] [MATHEMATICA] [MATLAB] Example 2 The vertical distance covered
by a rocket from a) Use two-segment Trapezoidal rule to find the distance covered. b) Find the true error, Et for part (a). c) Find the absolute relative true error for part (a). Solution: a) The solution using 2-segment Trapezoidal rule is
b) The exact value of the above integral is
so the true error is
c) The absolute relative true
error,
Table 1:
Values obtained using multiple-segment Trapezoidal rule for
Use Multiple-segment Trapezoidal Rule to find the area under the curve
from SolutionUsing two segments, we get
So what is the true value of this integral?
Making the absolute relative true error
Why is the true value so far away from the approximate values? Just take a look at Figure 5. As you can see, the area under the “trapezoids” (yeah, they really look like triangles now) covers a small the area under the curve. As we add more segments, the approximated value quickly approaches the true value.
Figure 5: 2-Segment Approx. of an Exp. Function
Table
2: Values obtained using Multiple-segment Trapezoidal Rule for
Use multiple-segment Trapezoidal Rule to find
SolutionWe cannot use Trapezoidal Rule
for this integral, as the value of the integrand at
Function f(x) If x = 0 Then f = 0 If x <> 0 Then f = x ^ (-0.5) End Function
Basically, we are just
assigning the function a value of zero at Using two segments, we get
So what is the true value of this integral?
Thus making the absolute relative true error
Table 3: Values
obtained using Multiple-segment Trapezoidal Rule for
|