Download presentation
Presentation is loading. Please wait.
Published byNeal Snow Modified over 9 years ago
1
CSE 330 : Numerical Methods Lecture 15: Numerical Integration - Trapezoidal Rule Dr. S. M. Lutful Kabir Visiting Professor, BRAC University & Professor (on leave) IICT, BUET
2
What is Integration? Integration: Prof. S. M. Lutful Kabir, BRAC University 2 The process of measuring the area under a function plotted on a graph. Where: f(x) is the integrand a= lower limit of integration b= upper limit of integration
3
Basis of Trapezoidal Rule Trapezoidal Rule is based on the Newton-Cotes Formula that states if one can approximate the integrand as an n th order polynomial… Prof. S. M. Lutful Kabir, BRAC University 3 where and Then the integral of that function is approximated by the integral of that n th order polynomial. Trapezoidal Rule assumes n=1, that is, the area under the linear polynomial,
4
Method Derived From Geometry Prof. S. M. Lutful Kabir, BRAC University 4 The area under the curve is a trapezoid. The integral
5
Example 1 The vertical distance covered by a rocket from t=8 to t=30 seconds is given by: Prof. S. M. Lutful Kabir, BRAC University 5 a)Use single segment Trapezoidal rule to find the distance covered. b)Find the true error, for part (a). c)Find the absolute relative true error, for part (a).
6
Integration of Velocity of Rocket Prof. S. M. Lutful Kabir, BRAC University 6 a)
7
Solution (cont) Prof. S. M. Lutful Kabir, BRAC University 7 a) b) The exact value of the above integral is
8
Solution (cont) Prof. S. M. Lutful Kabir, BRAC University 8 b) c) The absolute relative true error,, would be
9
Multiple Segment Trapezoidal Rule Prof. S. M. Lutful Kabir, BRAC University 9 In previous example, the true error using 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.
10
Multiple Segment Trapezoidal Rule Prof. S. M. Lutful Kabir, BRAC University 10 With Hence: The true error now is reduced from -807 m to -205 m.
11
Multiple Segment Trapezoidal Rule Prof. S. M. Lutful Kabir, BRAC University 11 Figure 4: Multiple (n=4) Segment Trapezoidal Rule Divide into equal segments as shown in Figure 4. Then the width of each segment is: The integral I is:
12
Multiple Segment Trapezoidal Rule Prof. S. M. Lutful Kabir, BRAC University 12 The integral I can be broken into n integrals as: Applying Trapezoidal rule on each segment gives:
13
Example 2 Prof. S. M. Lutful Kabir, BRAC University 13 The vertical distance covered by a rocket from t=8 to t=30 seconds is given by: a) Use n-segment Trapezoidal rule to find the distance covered (n=1 to 8). b) Find the true error, for part (a). c) Find the absolute relative true error, for part (a).
14
Solution Prof. S. M. Lutful Kabir, BRAC University 14 Table 1 gives the values obtained using multiple segment Trapezoidal rule for: nValueEtEt 111868-8077.296--- 211266-2051.8535.343 311153-91.40.82651.019 411113-51.50.46550.3594 511094-33.00.29810.1669 611084-22.90.20700.09082 711078-16.80.15210.05482 811074-12.90.11650.03560 Table 1: Multiple Segment Trapezoidal Rule Values
15
Thanks 15 Prof. S. M. Lutful Kabir, BRAC University
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.