ERROR ANALYSIS OF TRAPEZOID RULE, SIMPSON’S RULE, AND ROMBERG METHOD M.Sc. Graduate Seminar By Kumama Regassa August 2012 Haramaya University ERROR ANALYSIS OF TRAPEZOID RULE, SIMPSON’S RULE, AND ROMBERG METHOD A Graduate seminar Submitted to the College of Natural and Computational Sciences, Department of Mathematics, School of Graduate Studies HARAMAYA UNIVERSITY In partial Fulfillment of the Requirement for the Degree of MASTER OF SCIENCE IN MATHEMATICS (NUMERICAL ANALYSIS) By Kumama Regassa Advisor Getinet Alemayehu(PhD) August 2012 Haramaya ii SCHOOL OF GRADUATE STUDIES HARAMAYA UNIVERSITY As member of the Examination Board of the Final M.Sc. Open Defense, we certify that we have read and evaluated this Graduate Seminar prepared by Kumama Regassa Entitled:’’ERROR ANALYSIS OF TRAPEZOID RULE, SIMPSON’S RULE AND ROMBERG METHOD’’ and recommended that it be accepted as fulfilling the Graduate Seminar requirement for the Degree of Master of Science in Mathematics (Numerical Analysis) _________________ _____________ Name of chairman Signature ______________________ _____________ External examiner Signature ___________________ _____________ Internal examiner Signature _____________ Date ____________ Date ____________ Date Final approval and acceptance of the Graduate Seminar is contingent upon the submission of the final copy of the Graduate Seminar to the Council of Graduate Studies (CGS) through the Department Graduate Committee (DGC) of the candidate’s department. I hereby certify that I have read this Graduate Seminar prepared under my direction and recommend that it be accepted as fulfilling the Graduate Seminar requirement. Getinet Alemayehu (PhD) _____________ ___________ Name of Advisor Signature Date iii PREFACE The purpose of this seminar is to discuss errors on trapezoid rule, Simpson’s rule, and Romberg method during approximating definite integral using numerical approximations. The seminar has two parts. The first part has the introduction which introduces the concept of numerical integration and some necessary topics that are essential in the main body The second part is the main body of the seminar, which deals with trapezoid rule, Simpson’s rule, and Romberg method. In this part error and bounds of the error during approximations are presented. iv AKNOWLEDGEMENT First of all I would like to thank the almighty GOD for changing my dream to true as the first chapter of my life. I extend my heartfelt gratitude to my advisor Dr.Getinet Alemeyehu for his positive, valuable professional guidance, constructive comments, suggestions, and encouragements from the beginning up to the end of the study. Zemach Gudeto and kadir Abdella for their cooperativeness in borrowing me lap top. Last but not the least; I would like to thank my wife Fenet Deferew, my brother Getu Regassa my brother Bizuneh Regassa, my grandmother Damile Dadi, my friend Abiyot Nano, Milisha Cheneke, and my staff for their encouragement and support, both morally and financial. v TABLE OF CONTENTS PREFACE iv AKNOWLEDGEMENT v TABLE OF CONTENTS vi 1. INTRODUCTION AND PRELIMINARY CONCEPTS 2 1.1. Introduction 2 1.2. Objective 3 1.3. Methodology 3 1.4. Preliminary concepts 3 2. TRAPEZOID RULE, SIMPSON RULE, AND ROMBERG METHOD Error! Bookmark not defined. 2.1. Trapezoidal rule 8 2.2. Simpson`s rule 13 2.2.1. Simpson`s one-third rule 13 2.3. Simpson’s 3/8 rule 21 2.4. Romberg method 27 2.4.1. Romberg method for the trapezium rule 28 2.4.2. Romberg method for the Simpson’s 1/3 rule 30 3. SUMMARY 37 4. REFERENCE 39 vi 1. INTRODUCTION AND PRELIMINARY CONCEPTS 1.1. Introduction The process of finding the function 𝑓(𝑥) if its derivative is given is called antiderivative. 𝑏 The fundamental theorem of calculus gives us an exact formula for computing ∫𝑎 𝑓(𝑥)𝑑𝑥, provided we can find an antiderivative for f. This method of evaluating definite integral is called the analytic method. However, there are times when this is difficult or impossible. In these cases it is usually good enough to find an approximate or numerical solution. Trapezoid rule, Simpson’s rule, and Romberg method are used for approximating a definite integral provided that the integrand is integrable. The integral is approximated by linear combinations of the values of 𝑓(𝑥) at the tabulated points as 𝑏 𝐼 = ∫𝑎 𝑓(𝑥)𝑑𝑥 ≈ ∑𝑛𝑘=0 𝜆𝑘 𝑓(𝑥𝑘 ) = 𝜆0 𝑓(𝑥0 ) + 𝜆1 𝑓(𝑥1 ) + 𝜆2 𝑓(𝑥2 ) + ⋯ + 𝜆𝑛 𝑓(𝑥𝑛 ) Where the tabulated points 𝑥𝑘 ′𝑠 are called abscissas, 𝑓(𝑥𝑘 )′ 𝑠 are called the ordinates 𝜆𝑘 ′𝑠 are called the weights of integration. We define the error of the approximation for the given method as 𝑛 𝑏 𝐸𝑛 (𝑓) = ∫ 𝑓(𝑥)𝑑𝑥 − ∑ 𝜆𝑘 𝑓(𝑥𝑘 ) 𝑎 𝑘=0 Since we cannot always calculate exactly what the error is, we look instead for the bound on the error. There are several reasons for carrying out numerical integration. The integrand 𝑓(𝑥) may be known only at certain points such as obtained by sampling or a formula for the integrand may be known, but it may be difficult or impossible to find an anti derivative which is elementary functions or it may be possible to find an antiderivative symbolically but it may be the case if the antiderivatives is given as an infinite series or product, or if its evaluation requires a special function which is not available. Numerical integration methods can generally be described as combing evaluations of the integrand to get an approximation to the integral. 2 1.2. Objective This seminar intends to explore the following specific objectives: To present trapezoid rule, Simpson’s rule and Romberg method To present general formula for the error term To present proof of error in trapezoid rule and Simpson’s rule To present approximation of definite integral using trapezoid rule, Simpson’s rule and Romberg method 1.3. Methodology The seminar would be involved collecting facts in some books available in libraries and searched in the internet regularly. The necessary information obtained would be recorded. 1. A detail study of trapezoid rule, Simpson’s, and Romberg method considered. 2. Notes of concepts and facts made to find out possible relationships of some numerical methods and the corresponding errors. 3. The investigator collected books, and prepared reports then made a frequent contact with the advisor from the beginning to the end of the seminar work. 4. The necessary concepts added and the unnecessary concepts reduced by the recommendation of advisor. 1.4. Preliminary concepts Fundamental theorem of calculus Let 𝑓(𝑥) be continuous on [𝑎, 𝑏]. If 𝐹(𝑥) is any antiderivatives of 𝑓(𝑥), then 𝑏 ∫ 𝑓(𝑥)𝑑𝑥 = 𝐹(𝑏) − 𝐹(𝑎) 𝑎 Mean value theorem for the integral I𝑓 𝑓 ∈ 𝐶[𝑎, 𝑏], 𝑔 is integrable on [𝑎, 𝑏] and 𝑔(𝑥) does not change sign on [𝑎, 𝑏], then there exists a number c in (𝑎, 𝑏) with 𝑏 𝑏 ∫ 𝑓(𝑥)𝑔(𝑥)𝑑𝑥 = 𝑓(𝑐) ∫ 𝑔(𝑥)𝑑𝑥 𝑎 𝑎 3 Intermediate value theorem If 𝑓 ∈ 𝐶[𝑎, 𝑏] and 𝑘 is any real number between 𝑓(𝑎) and𝑓(𝑏), then there exists a number c in (𝑎, 𝑏) for which 𝑓(𝑐) = 𝑘 Forward difference operator ∆ The nth forward difference of 𝑓(𝑥𝑖 ) is defined as 𝑛! ∆𝑛 𝑓(𝑥𝑖 ) = ∑𝑛𝑘=0(−1)𝑘 𝑘!(𝑛−𝑘)! 𝑓𝑖+𝑛−𝑘 Newton’s forward interpolation formula Let the function 𝑦 = 𝑓(𝑥) take the values𝑦0 , 𝑦1 , 𝑦2 , 𝑦3 , …, 𝑦𝑛 corresponding to the values 𝑥0 , 𝑥1 , 𝑥2 , …, 𝑥𝑛 of x. let these values of x be equally spaced such that 𝑥𝑖 = 𝑥0 + 𝑖ℎ (𝑖 = 0,1, … ) Assuming 𝑦(𝑥) to be polynomial of nth degree in x and p is real number, then the formula 𝑦(𝑥) = 𝑦(𝑥0 + 𝑝ℎ) = 𝑦𝑝 = 𝑦0 + 𝑝∆𝑦0 + 𝑝(𝑝−1)…(𝑝−𝑛+1) 𝑛! 𝑝(𝑝−1) 2! ∆2 𝑦0 + 𝑝(𝑝−1)(𝑝−2) 3! ∆3 𝑦0 + ⋯ + ∆𝑛 𝑦0 is called Newton’s forward interpolation formula. Lagrange polynomial error formula Let 𝑓: [𝑎, 𝑏] → ℝ be (n+1) times continuously differentiable, then the remainder 𝐸𝑛 (𝑓) = 𝑓 − 𝑃𝑛 (𝑓) For polynomial interpolation with n+1 distinct points 𝑥0 , 𝑥1, 𝑥2 … 𝑥𝑛 ∈ [𝑎, 𝑏] can be represented in the form (𝐸𝑛 𝑓)(𝑥) = 𝑓 𝑛+1 (𝜉) (𝑛+1)! ∏𝑛𝑗=0( 𝑥 − 𝑥𝑗 ), 𝑥 ∈ [𝑎, 𝑏] for some 𝜉 ∈ [𝑎, 𝑏] depending on 𝑥 Order of a method An integration method is said to be of order p if it produces exact results, that is 𝐸𝑛 (𝑓) = 0, for all polynomials of degree less than or equal to p but not for p+1. That is, it produces exact results for 𝑓(𝑥) = 1, 𝑥, 𝑥 2 , …, 𝑥 𝑝 𝑏 This implies that 𝐸(𝑥 𝑚 ) = ∫𝑎 𝑥 𝑚 𝑑𝑥 − ∑𝑛𝑘=0 ∧𝑘 𝑥𝑘𝑚 = 0 for m = 0, 1, 2… p The error term is obtained for 𝑓(𝑥) = 𝑥 𝑝+1 𝑏 𝑐 𝐸𝑛 (𝑓) = ∫𝑎 𝑓(𝑥)𝑑𝑥 − ∑𝑛𝑘=0 ∧𝑘 𝑓(𝑥𝑘 ) = (𝑝+1)! 𝑓 𝑝+1 (𝜉) a<𝜉<b 𝑏 We define c = ∫𝑎 𝑥 𝑝+1 𝑑𝑥 − ∑𝑛𝑘=0 ∧𝑘 𝑥𝑘𝑝+1 Where c is called error constant, and ∧𝑘 be weight of integration. 4 Errors In any numerical computation we come across the following types of error: 1. Inherent errors: Errors which are already present in the statement of the problem before its solution. 2. Rounding errors: errors that arise from the process of rounding off the numbers during computation. 3. Truncation errors are caused by using approximate results or on replacing an infinite process by finite one. 4. Absolute, Relative and Percentage errors. If 𝑥 is the true value of a quantity and 𝑥′ is its approximate value, then | 𝑥 − 𝑥 ′ | is called the absolute error ( 𝐸𝑎 ).The relative error(𝐸𝑟 ) is defined by 𝑥−𝑥 ′ 𝐸𝑟 = | 𝑥 | And the percentage error(𝐸𝑝 ) is defined by 5 𝑥−𝑥 ′ 𝐸𝑝 = 100𝐸𝑟 = 100 | 𝑥 | 2. TRAPEZOID RULE, SIMPSON RULE, AND ROMBERG METHOD 2.1. Newton – cotes formula Let 𝑓(𝑥) be continuous on the interval [𝑎, 𝑏] and its antiderivative 𝐹(𝑥) is known then the definite integral of 𝑓(𝑥) from a to b may be evaluated using Newton – Leibnitz formula. 𝑏 ∫𝑎 𝑓(𝑥)𝑑𝑥 = 𝐹(𝑏) − 𝐹(𝑎) (1) Where 𝐹′(𝑥) = 𝑓(𝑥) However, computation of the definite integral by (1) becomes difficult or practically impossible when, the anti derivative 𝐹(𝑥) cannot be found by elementary means or is too involved or, the integrand 𝑓(𝑥) is specified in tabular form. Thus, the basic integration rule is to replace 𝑓(𝑥) by a simple polynomial 𝑝(𝑥) , say Newton interpolation polynomial in [𝑎, 𝑏] 𝑏 𝑏 ∫𝑎 𝑓(𝑥)𝑑𝑥 ≈ ∫𝑎 𝑝(𝑥)𝑑𝑥 Therefore (2) We define the error of approximation for a given method as 𝑏 𝑏 𝐸𝑛 (𝑓) = ∫𝑎 𝑓(𝑥)𝑑𝑥 − ∫𝑎 𝑝(𝑥)𝑑𝑥 (3) Where 𝑝(𝑥) is polynomial representing the function y = 𝑓(𝑥) in the interval[𝑎, 𝑏]. We have also 𝑏 ∫𝑎 𝑝(𝑥)𝑑𝑥 = ∑𝑛𝑘=0 𝜆𝑘 𝑓(𝑥𝑘 ) = 𝜆0 𝑓(𝑥0 ) + 𝜆1 𝑓(𝑥1 ) + 𝜆2 𝑓(𝑥2 ) + …+ 𝜆𝑛 𝑓(𝑥𝑛 ) Where the tabulated points 𝑥𝑘 ′s are called abscissas,𝑓(𝑥𝑘 )’s are called the ordinates and 𝜆𝑘 ’s are called the weights of the integration. Hence we can define error of approximation for the given method as 𝑏 𝐸𝑛 (𝑓) = ∫𝑎 𝑓(𝑥)𝑑𝑥 − ∑𝑛𝑘=0 𝜆𝑘 𝑓(𝑥𝑘 ) 6 (4) Since we cannot always calculate exactly what the error is, we look instead for the bound on the error, The bound for the error term is given by |𝑐| |𝐸𝑛 (𝑓)| ≤ (𝑝+1)! max | 𝑓 𝑝+1 (𝑥)| (7) 𝑎≤𝑥≤𝑏 Before discussing Trapezoid rule and Simpson’s rule let derive a general formula from which these rules are obtained which is called Newton–Cote’s quadrature formula 𝑏 I = ∫𝑎 𝑓(𝑥)𝑑𝑥 Let Where 𝑓(𝑥) takes the value𝑦0 , 𝑦1 , 𝑦2 ,…𝑦𝑛 for 𝑥 = 𝑥0 , 𝑥1 , 𝑥2 …𝑥𝑛 Observe figure below 𝑦 = 𝑓(𝑥) 𝑦0 𝑦1 𝑦2 𝑦𝑛−1 𝑥0 𝑥1 𝑥2 𝑦𝑛 𝑥𝑛−1 𝑥𝑛 Figure 1 As shown in figure 1 above Let us divide the interval [𝑎, 𝑏] into n sub – intervals of width ℎ so that 𝑎 = 𝑥0 , 𝑥1 = 𝑥0 + ℎ, 𝑥2 = 𝑥0 + 2ℎ, … , 𝑥𝑛 = 𝑥0 + 𝑛ℎ = 𝑏. Then 𝑥 +𝑛ℎ 𝐼 = ∫𝑥 0 0 𝑓(𝑥)𝑑𝑥 𝑛 = ℎ ∫0 𝑓(𝑥0 + 𝑝ℎ)𝑑𝑝 (8) (By putting𝑥 = 𝑥0 + 𝑝ℎ, 𝑑𝑥 = ℎ𝑑𝑝 were 𝑝 is any real number) Now by Newton forward interpolation formula we have: 𝑓(𝑥0 + 𝑝ℎ)= 𝑦0 + 𝑝∆𝑦0 + 𝑝(𝑝−1)(𝑝−2)(𝑝−3) 4! ∆4 𝑦0 +…+ 𝑝(𝑝−1) 2! ∆2 𝑦0 + 𝑝(𝑝−1)(𝑝−2) 3! 𝑝(𝑝−1)(𝑝−2)(𝑝−3)…(𝑝−𝑛−1) 𝑛! ∆3 𝑦0 + ∆𝑛 𝑦0 (9) Now substituting (9) in (8) we have 𝑛 𝑛 𝐼 = ℎ ∫0 𝑓(𝑥0 + 𝑝ℎ)𝑑𝑝 = ℎ ∫0 [𝑦0 + 𝑝∆𝑦0 + 𝑝(𝑝−1)(𝑝−2)(𝑝−3) 4! 𝑛 = ℎ ∫0 [𝑦0 + 𝑝∆𝑦0 + ∆4 𝑦0 + ⋯ + 𝑝2 −𝑝 2! ∆2 𝑦0 + 𝑝(𝑝−1) 2! ∆2 𝑦0 + 𝑝(𝑝−1)(𝑝−2)(𝑝−3)…(𝑝−𝑛−1) 𝑛! 𝑝3 −3𝑝2 +2𝑝 3! 7 ∆3 𝑦0 + 𝑝(𝑝−1)(𝑝−2) 3! ∆3 𝑦0 + ∆𝑛 𝑦0 + ⋯ ] 𝑑𝑝 𝑝4 −6𝑝3 +11𝑝2 −6𝑝 4! ∆4 𝑦0 + ⋯ ] 𝑑𝑝 𝑛 𝑛 = ℎ [∫0 𝑦0 𝑑𝑝 + ∆𝑦0 ∫0 𝑝𝑑𝑝 + ∆2 𝑦0 2! 𝑛 ∫0 (𝑝2 − 𝑝 )𝑑𝑝 + ∆3 𝑦0 3! 𝑛 ∫0 (𝑝3 −3𝑝2 + 2𝑝)𝑑𝑝 + ∆4 𝑦0 4! 𝑛 ∫0 (𝑝4 − 6𝑝3 +11𝑝2 − 6𝑝)𝑑𝑝 + ⋯] = ℎ [𝑛𝑦0 + 𝑛2 2 ∆𝑦0 + 𝑛 = 𝑛ℎ [𝑦0 + 2 ∆𝑦0 + 𝑛2 (2𝑛−3) 12 𝑛(2𝑛−3) 12 𝑛2 (𝑛−2)2 ∆2 𝑦0 + ∆2 𝑦0 + 𝑛5 24 𝑛(𝑛−2)2 24 3𝑛4 ∆3 𝑦0 + ( 5 − 𝑛4 ∆3 𝑦0 + ( 5 − 3𝑛3 2 + 2 + 11𝑛2 3 11𝑛3 3 − 3𝑛2 ) − 3𝑛) ∆4 𝑦0 4! ∆4 𝑦0 4! +⋯] +⋯] (10) The last formula refers to us Newton–Cotes quadrature formula. From this formula we can deduce a general formula for 1) Trapezoidal rule 2) Simpson one-third rule 3) Simpson three-eight rule 2.1.1. Trapezoidal rule Putting 𝑛 = 1 in (10) and taking the curve through (𝑥𝑖 , 𝑦𝑖 ) and (𝑥𝑖+1 , 𝑦𝑖+1 ), 𝑓𝑜𝑟 𝑖 = 0,1,2,3 … as a straight line as shown in figure 2 below that is a polynomial of first order so that differences of order higher than first become zero, we get 𝑓 y 𝑎 = 𝑥0 𝑥1 𝑥2 𝑥𝑛 = 𝑏 x Figure 2 𝑥 1 ℎ ℎ ℎ 1 ∫𝑥 𝑓(𝑥)𝑑𝑥 = ℎ (𝑦0 + 2 ∆𝑦0 ) = 2 (2𝑦0 + 𝑦1 − 𝑦0 ) = 2 (𝑦0 + 𝑦1 ) = 2 (𝑓(𝑎) + 𝑓(𝑏)) 0 Thus the value of the integral on [𝑎, 𝑏] is given by 𝑏 ∫𝑎 𝑓(𝑥)𝑑𝑥 = 𝑏−𝑎 2 (𝑓(𝑎) + 𝑓(𝑏)) (11) This is called trapezoidal rule for approximating the value of integral on the single sub-interval. Thus for 𝑛 sub-intervals with nodes 𝑎 = 𝑥0 , 𝑥1 , 𝑥2 ,..., 𝑥𝑛 = 𝑏 we have approximation of the integral similar to (11) as 𝑥 ℎ 1 ∫𝑥 𝑓(𝑥)𝑑𝑥 = 2 (𝑦0 + 𝑦1 ) 0 𝑥2 ∫𝑥 𝑓(𝑥)𝑑𝑥 1 ℎ = 2 (𝑦1 + 𝑦2 ) 𝑥 ℎ 3 ∫𝑥 𝑓(𝑥)𝑑𝑥 = 2 (𝑦2 + 𝑦3 ) 2 . . . . . . 8 𝑥𝑛−1 ∫𝑥 𝑛−2 ℎ 𝑓(𝑥)𝑑𝑥 = 2 (𝑦𝑛−2 + 𝑦𝑛−1 ) 𝑥𝑛 ∫𝑥 ℎ 𝑛−1 𝑓(𝑥)𝑑𝑥 = 2 (𝑦𝑛−1 + 𝑦𝑛 ) Adding the integrals on the left side and formulas on the right down ward we have 𝑥 𝑥 𝑥 𝑥 𝑥 1 2 3 𝑛−1 𝑓(𝑥)𝑑𝑥 + ∫𝑥 𝑛 𝑓(𝑥)𝑑𝑥 ∫𝑥 𝑓(𝑥)𝑑𝑥 + ∫𝑥 𝑓(𝑥)𝑑𝑥 + ∫𝑥 𝑓(𝑥)𝑑𝑥 + …+ ∫𝑥 0 1 ℎ 2 ℎ 𝑛−2 ℎ 𝑛−1 ℎ ℎ = 2 (𝑦0 + 𝑦1 ) + 2 (𝑦1 + 𝑦2 ) + 2 (𝑦2 + 𝑦3 ) + …+ 2 (𝑦𝑛−2 + 𝑦𝑛−1 ) + 2 (𝑦𝑛−1 + 𝑦𝑛 ) ℎ ℎ ℎ ℎ ℎ ℎ ℎ ℎ = 2 𝑦0 + 2 𝑦1 + 2 𝑦1 + 2 𝑦2 + 2 𝑦2 + 2 𝑦3 + … + 2 𝑦𝑛−2 + 2 𝑦𝑛−1 + ℎ ℎ 2 2 ℎ ℎ 𝑦 + 2 𝑦𝑛 2 𝑛−1 = 𝑦0 + ℎ𝑦1 + ℎ𝑦2 + ℎ𝑦3 + …+ ℎ𝑦𝑦0 𝑛−2 + ℎ𝑦𝑛−1 + 𝑦𝑛 ℎ = 2 [𝑦0 + 2(𝑦1 + 𝑦2 + 𝑦3 + ⋯ + 𝑦𝑛−2 + 𝑦𝑛−1 ) + 𝑦𝑛 ] Using the properties of definite integral on bounded continuous functions we get 𝑥 ℎ 0 2 𝑛 ∫𝑥 𝑓(𝑥)𝑑𝑥 = [𝑦0 + 2(𝑦1 + 𝑦2 + 𝑦3 + ⋯ + 𝑦𝑛−2 + 𝑦𝑛−1 ) + 𝑦𝑛 ]( say) (12) This last equation refers to us a general formula for composite trapezoidal rule Theorem 1 (Error of trapezoidal rule for single sub-interval) Let 𝑓: 𝐶[𝑎, 𝑏] → ℝ be twice continuously differentiable. Then the error for the trapezoidal rule can be represented in the form 𝑏 ∫𝑎 𝑓(𝑥)𝑑𝑥 − 𝑏−𝑎 2 [𝑓(𝑎) + 𝑓(𝑏)] = − ℎ3 12 𝑓 ′′ (𝜉), with some 𝜉 ∈ [𝑎, 𝑏] and ℎ = 𝑏 − 𝑎 Proof: let 𝐿1 𝑓 denote the linear interpolation of 𝑓 at the interpolation points 𝑥0 = 𝑎 and 𝑥1 = 𝑏. By construction of the trapezoidal rule we have that the error 𝑏 𝐸1 (𝑓) = ∫𝑎 𝑓(𝑥)𝑑𝑥 − 𝑏−𝑎 2 [𝑓(𝑎) + 𝑓(𝑏)] 𝑏 𝑏 (13) Is given by 𝐸1 (𝑓) = ∫𝑎 [𝑓(𝑥) − (𝐿1 𝑓)(𝑥)] = ∫𝑎 (𝑥 2 − 𝑎𝑥 − 𝑏𝑥 + 𝑎𝑏) 𝑓(𝑥)−(𝐿1 𝑓)(𝑥) 𝑑𝑥 (𝑥−𝑎)(𝑥−𝑏) Since the first factor of the integrand is non-positive on [𝑎, 𝑏]and since by L’Hopital`s rule the second factor is continuous, from the mean value theorem for the integrals we obtain that 𝐸1 (𝑓) = 𝑓(𝑧)−(𝐿1 𝑓)(𝑧) 𝑏 ∫ (𝑥 (𝑧−𝑎)(𝑧−𝑏) 𝑎 𝑏 Now ∫𝑎 (𝑥 − 𝑎)(𝑥 − 𝑏)𝑑𝑥 = − − 𝑎)(𝑥 − 𝑏)𝑑𝑥 For some 𝑧 ∈ [𝑎, 𝑏] ℎ3 6 (15) With aid of Lagrange polynomial error formula for linear interpolation we have 𝑓 ′′ (𝜉) 2 = 𝑓(𝑧)−(𝐿1 𝑓)(𝑧) (𝑧−𝑎)(𝑧−𝑏) (16) 9 (14) Substituting (16) and (15) in (14) we have ℎ3 𝐸1 (𝑓) = − 12 𝑓 ′′ (𝜉) 𝑏 𝑏−𝑎 Now from (13) we have 𝐸1 (𝑓, 𝑥) = ∫𝑎 𝑓(𝑥)𝑑𝑥 − [𝑓(𝑎) + 𝑓(𝑏)] = − 2 ℎ3 12 𝑓 ′′ (𝜉) ∎ Corollary The bound for the error is given by |𝐸1 (𝑓)| ≤ (𝑏−𝑎)3 12 𝑀2 , where 𝑀2 = max |𝑓 ′′ (𝑥)| 𝑎≤𝑥≤𝑏 Theorem 2 (error of composite trapezoidal rule) Let 𝑓: 𝐶[𝑎, 𝑏] → ℝ be twice continuously differentiable. Then the error for the composite trapezoidal rule is given by 𝑏 𝐸1 = ∫𝑎 𝑓(𝑥)𝑑𝑥 − 𝑇ℎ (𝑓) = − (𝑏−𝑎) 12 ℎ2 𝑓′′(𝜉), for some 𝜉 ∈ [𝑎. 𝑏] Proof: Consider 𝑏 𝑥 𝑥 𝑥 1 2 1 2 3 ∫𝑎 𝑓(𝑥)𝑑𝑥 − 𝑇ℎ (𝑓) = ∫𝑎=𝑥 𝑓(𝑥)𝑑𝑥 + ∫𝑥 𝑓(𝑥)𝑑𝑥 + ∫𝑥 𝑓(𝑥)𝑑𝑥 + 0 𝑥 ℎ …+ ∫𝑥 𝑛 𝑓(𝑥)𝑑𝑥 − 2 𝑛−1 𝑥 1 = ∫𝑎=𝑥 𝑓(𝑥)𝑑𝑥 − 0 ℎ 2 [𝑦0 + 2(𝑦1 + 𝑦2 + 𝑦3 + ⋯ + 𝑦𝑛−2 + 𝑦𝑛−1 ) + 𝑦𝑛 ] 𝑥 ℎ 1 2 [𝑦0 + 𝑦1 ] + ∫𝑥 2 𝑓(𝑥)𝑑𝑥 − 𝑥 …+ ∫𝑥 𝑛 𝑓(𝑥)𝑑𝑥 − 𝑛−1 ℎ3 ℎ3 𝑥 ℎ 2 2 [𝑦1 + 𝑦2 ] + ∫𝑥 3 𝑓(𝑥)𝑑𝑥 − ℎ 2 [𝑦2 + 𝑦3 ] + [𝑦𝑛−1 + 𝑦𝑛 ] ℎ3 ℎ3 = (− 12 𝑓′′(𝜉1 )) + (− 12 𝑓′′(𝜉2 )) + (− 12 𝑓′′(𝜉3 )) + …+ (− 12 𝑓′′(𝜉𝑛 )) By theorem 1 Were 𝑎 ≤ 𝜉1 ≤ 𝜉2 ≤ 𝜉3 ≤ …≤ 𝜉𝑛 ≤ 𝑏 ℎ3 = − 12 [∑𝑘=𝑛 𝑘=1 𝑓′′(𝜉𝑘 )] (17) From n(min 𝑓′′( 𝑥)) ≤ ∑𝑘=𝑛 𝑘=1 𝑓′′(𝜉𝑘 ) ≤ 𝑛 (max 𝑓′′(𝑥)) and the 𝑥∈[𝑎,𝑏] 𝑥∈[𝑎,𝑏] continuity of 𝑓′′ we conclude that there exists 𝜉 ∈ [𝑎, 𝑏] such that 𝑓′′( 𝜉) = ′′ ∑𝑘=𝑛 𝑘=1 𝑓 (𝜉𝑘 ) 𝑛 ⇒ 𝑛 𝑓′′( 𝜉) = ∑𝑘=𝑛 𝑘=1 𝑓(𝜉𝑘 ) (18) Substituting (18) in (17) we have 𝑏 ∫𝑎 𝑓(𝑥)𝑑𝑥 − 𝑇ℎ (𝑓) = ℎ3 − 12 [∑𝑘=𝑛 𝑘=1 𝑓′′(𝜉𝑘 )] =− 𝑏 Therefore ∫𝑎 𝑓(𝑥)𝑑𝑥 − 𝑇ℎ (𝑓) = − ℎ3 ′′ = − 12 𝑛 𝑓 (𝜉) = − ( 𝑏−𝑎 3 ) 𝑛 12 𝑛 𝑓′′(𝜉) = − (𝑏−𝑎)3 12𝑛2 𝑓′′(𝜉) (𝑏 − 𝑎) 2 ℎ 𝑓′′(𝜉) 12 (𝑏−𝑎) 12 ℎ2 𝑓′′(𝜉) for some 𝜉 ∈ [𝑎, 𝑏] 10 ∎ 1 Example1 evaluate ∫0 𝑒 𝑥 2 𝑑𝑥, using the trapezoid rule with2, 4, 8, and 16 equal subintervals. Solution: with 𝑁 = 2, 4 and 8, we have the following step lengths and nodal points 𝑁 = 2: 𝑁 = 4: 𝑁 = 8: ℎ= 𝑏−𝑎 𝑁 ℎ= ℎ= 𝑏−𝑎 𝑁 𝑏−𝑎 𝑁 1 = 2. The nodes are 0, 0.5, and 1.0. 1 = 4.The nodes are 0, 0.25, 0.5, 0.75, and 1.0. 1 = 8.The nodes are 0, 0.125, 0.25, 0.375, 0.5, 0.675, 0.75, 0.875, and 1.0. We have the following tables of values. Table1.1 𝑁=2 𝑥 0 0.5 1 𝑥2 0 0.25 1 𝑓(𝑥) 1 1.284 2.718282 = 𝑒𝑥2 025 Table 1.2 𝑁=4 𝑥 0 0.25 0.5 0.75 1 𝑥2 0 0.0625 .25 0.5625 1 𝑓(𝑥) 1 1.064494 1.284025 1.755055 2.718282 = 𝑒𝑥2 Table 1.3 𝑁 𝑥 0 =8 0.12 0.25 0.375 0.5 0.625 0.75 0.875 1 0.0625 0.1406 0.25 0.3906 0.562 0.7656 1 25 5 25 5 𝑥2 0 0.01 5625 𝑓(𝑥) = 𝑒𝑥2 1 25 1.01 1.06449 1.1509 1.2840 1.4779 1.755 2.1503 2.71 5748 4 93 25 04 055 38 Table 1.4 11 8282 𝑁 = 16 𝑥 0 0.0625 0.125 0.187 0.25 5 𝑥2 0 0.312 0.3 0.4 5 75 375 0.5 0.5625 0.00390 0.0156 0.035 0.06 0.097 0.1 0.1 0.2 0.3164 6 25 156 25 656 40 914 5 06 62 06 5 𝑓(𝑥) 1 = 𝑒𝑥2 1.00391 1.0157 1.035 1.06 1.102 1.1 1.2 1.2 1.3721 4 48 781 4494 583 50 109 84 87 99 50 02 2 𝑥 0.62 0.6875 0.75 5 𝑥2 0.5625 0.812 0.87 0.937 5 5 5 0.660 0.76 0.878 156 5625 906 5 1 0.39 0.47265 1 0625 6 𝑓(𝑥) 1.47 1.60424 1.7550 1.935 2.15 2.408 2.7 = 𝑒𝑥2 7904 9 55 094 0338 264 18 28 2 Now we compute the value of the integral. ℎ For 𝑁 = 2: 𝐼𝑇 = 2 [𝑓(0) + 2𝑓(0.5) + 𝑓(1)] = 0.25[1 + 2(1.284025) + 2.718282] = 1.571583 ℎ For 𝑁 = 4: 𝐼𝑇 = 2 [𝑓(0) + 2(𝑓(0.25) + 𝑓(0.5) + 𝑓(0.75)) + 𝑓(1)] = 0.125[1 + 2(1.064494 + 1.284025 + 1.755055) + 2.718282] = 1.490679For 𝑁 = 8: ℎ 𝐼𝑇 = 2 [𝑓(0) + 2(𝑓(0.125) + 𝑓(0.25) + 𝑓(0.375) + 𝑓(0.5)𝑓(0.675) + 𝑓(0.75)) + 𝑓(1)] ℎ = 2 [1 + 2(1.015748 + 1.064494 + 1.150993 + 1.284025 + 1.477904 + 1.755055 + 2.150338) + 2.718282] = 1.469712 12 ℎ For 𝑁 = 16: 𝐼𝑇 = 2 [𝑓(0) + 2(𝑓(0.0625) + 𝑓(0.125) + 𝑓(0.1875) + 𝑓(0.25) + 𝑓(0.3125) + 𝑓(0.375) + 𝑓(0.4375) + 𝑓(0.5) + 𝑓(0.5625) + 𝑓(0.625) + 𝑓(0.6875) + ℎ 𝑓(0.75) + 𝑓(0.8125) + 𝑓(0.875) + 𝑓(0.9375)) + 𝑓(1)] = 2 [1 + 2(1.003914 + 1.015748 + 1.035781 + 1.064494 + 1.102583 + 1.150993 + 1.210951 + 1.284025 + 1.372187 + 1.477904 + 1.604249 + 1.755055 + 1.935094 + 2.150338 + 2.408264) + 2.718282] = 1.464422 Remark1 Trapezoidal Rule is the simplest quadrature formula. The formula is applicable to both even and odd numbers of subintervals Geometrical interpretation of trapezoid rule is the area under the curve 𝑦 = 𝑓(𝑥) is replaced by the area of a trapezium. And hence the total area under the curve from 𝑥0 to 𝑥𝑛 is replaced by the sum of the area of n trapeziums. The method is order one. 2.1.2. Simpson`s rule 2.1.2.1. Simpson`s one-third rule Putting 𝑛 = 2 in Newton-Cote`s quadrature formula (10) and taking the curve through (𝑥0 , 𝑦0) , (𝑥1 , 𝑦1) and (𝑥2 , 𝑦2) as a parabola that is a polynomial of second order so that differences of order higher than second vanish, we get 𝑥 2 2 ∫𝑥 𝑓(𝑥)𝑑𝑥 = 2ℎ [𝑦0 + 2 ∆𝑦0 + 2(2(2)−3) 12 0 𝑏 𝑥 1 ℎ ∆2 𝑦0 ] = 2ℎ [𝑦0 + ∆𝑦0 + 6 ∆2 𝑦0 ] = 3 [𝑦0 + 4𝑦1 + 𝑦2 ] ℎ ℎ Thus ∫𝑎 𝑓(𝑥)𝑑𝑥 = ∫𝑥 2 𝑓(𝑥)𝑑𝑥 = 3 [𝑦0 + 4𝑦1 + 𝑦2 ] = 3 [𝑓(𝑎) + 4𝑓( 0 𝑎+𝑏 2 ) + 𝑓(𝑏) ] (19) This formula is called Simpson`s one-third rule To derive a formula for composite Simpson’s one third rule let divide the interval [𝑎, 𝑏] as the following sub-intervals [𝑎 = 𝑥0 , 𝑥2 ] ,[𝑥2 , 𝑥4 ] ,[𝑥4 , 𝑥6 ] ,…,[𝑥𝑛−2 , 𝑥𝑛 ] assuming the curve passing through each sub-interval be polynomial function of degree two which assumes the same value as a function at the end points of the sub-intervals and middle points as shown in figure below 13 𝑦0 𝑦1 𝑦2 𝑎 = 𝑥0 𝑥1 𝑥2 𝑦3 𝑦4 𝑥3 𝑥4 𝑥5 𝑥6 𝑥𝑛 Figure 3 𝑥 ℎ Now ∫𝑥 2 𝑓(𝑥)𝑑𝑥 = 3 [𝑦0 + 4𝑦1 + 𝑦2 ] by Simpson’s one-third 0 rule 𝑥4 ∫ 𝑓(𝑥)𝑑𝑥 = 𝑥2 𝑥 ℎ [𝑦 + 4𝑦3 + 𝑦4 ] 3 2 ℎ 6 ∫𝑥 𝑓(𝑥)𝑑𝑥 = 3 [𝑦4 + 4𝑦5 + 𝑦6 ] . 4 𝑥𝑛 ∫𝑥 . . . . . . ℎ 𝑛−2 𝑓(𝑥)𝑑𝑥 = 3 [𝑦𝑛−2 + 4𝑦𝑛−1 + 𝑦𝑛 ] 𝑛 Being even Adding all integrals on the left side and adding all formulas on the right side we have 𝑥 𝑥 𝑥 𝑥 2 4 6 𝑛 ∫𝑥 𝑓(𝑥)𝑑𝑥 + ∫𝑥 𝑓(𝑥)𝑑𝑥 + ∫𝑥 𝑓(𝑥)𝑑𝑥 + …+ ∫𝑥 𝑓(𝑥)𝑑𝑥 0 ℎ 2 ℎ = 3 [𝑦0 + 4𝑦1 + 𝑦2 ] + 3 [𝑦2 + 4𝑦3 + 𝑦4 ] + 4 ℎ 3 𝑛−2 ℎ [𝑦4 + 4𝑦5 + 𝑦6 ] + ⋯ + [𝑦𝑛−2 + 4𝑦𝑛−1 + 3 𝑦𝑛 ] ℎ = 3 [𝑦0 + 4𝑦1 + 𝑦2 + 𝑦2 + 4𝑦3 + 𝑦4 + 𝑦4 + 4𝑦5 + 𝑦6 + ⋯ + 𝑦𝑛−2 + 4𝑦𝑛−1 + 𝑦𝑛 ] ℎ = 3 [𝑦0 + 4𝑦1 + 2𝑦2 + 4𝑦3 + 2𝑦4 + 4𝑦5 + 𝑦6 + ⋯ + 𝑦𝑛−2 + 4𝑦𝑛−1 + 𝑦𝑛 ] ℎ = 3 [𝑦0 + 4(𝑦1 + 𝑦3 + 𝑦5 + ⋯ + 𝑦𝑛−1 ) + 2(𝑦2 + 𝑦4 + 𝑦6 + ⋯ + 𝑦𝑛−2 ) + 𝑦𝑛 ] Now using the properties of definite on continuous and bounded function 𝑓 we have 𝑥 ℎ 𝑛 ∫𝑥 𝑓(𝑥)𝑑𝑥 = 3 [𝑦0 + 4(𝑦1 + 𝑦3 + 𝑦5 + ⋯ + 𝑦𝑛−1 ) + 2(𝑦2 + 𝑦4 + 𝑦6 + ⋯ + 𝑦𝑛−2 ) + 𝑦𝑛 ] 0 = 𝑆ℎ (𝑓) (say) (20) This formula is known as composite Simpson’s rule for Simpson’s one third rule. 14 Theorem 3 Let 𝑓: 𝐶[𝑎, 𝑏] → ℝ be four times continuously differentiable. Then the error for Simpson’s one third rule can represented in the form 𝑏 ℎ 𝐸2 (𝑓, 𝑥) = ∫𝑎 𝑓(𝑥)𝑑𝑥 − 3 [𝑓(𝑎) + 4𝑓( 𝑎+𝑏 2 ℎ5 ) + 𝑓(𝑏) ] = − 90 𝑓 4 ( 𝜉) 𝑏−𝑎 For some 𝜉 ∈ [𝑎, 𝑏] and ℎ = 2 Proof: using definition of the error given in (4) and taking 𝑓(𝑥) = 1, 𝑥, 𝑥 2 , 𝑥 3 , 𝑥 4 we have For: 𝑏 𝑏−𝑎 𝑓(𝑥) = 1 : 𝐸2 (𝑓, 𝑥) = ∫𝑎 𝑑𝑥 − 6 =𝑏−𝑎– [𝑓(𝑎) + 4𝑓( 𝑏−𝑎 6 𝑏 1 = 2 𝑏−𝑎 (b2 − a2 ) − = 1 2 6 𝑏−𝑎 6 ) + 𝑓(𝑏) ] 𝑎+𝑏 [𝑓(𝑎) + 4𝑓 ( 𝑎+𝑏 [𝑎 + 4 ( (b2 − a2 ) − 2 (1 + 4 + 1) = 𝑏 − 𝑎 − (𝑏 − 𝑎) = 0 𝑓(𝑥) = 𝑥 : 𝐸2 (𝑓, 𝑥) = ∫𝑎 𝑥𝑑𝑥 − For: 𝑎+𝑏 2 2 ) + 𝑓(𝑏)] ) + 𝑏] (𝑏−𝑎)[3𝑎+3𝑏] 6 = 3b2 − 3a2 − 3ab − 3b2 + 3a2 + 3ab = 0 𝑏 𝑓(𝑥) = 𝑥 2 : 𝐸2 (𝑓, 𝑥) = ∫𝑎 𝑥 2 𝑑𝑥 − For: 1 (b3 − a3 ) − 3 = = = 𝑏3 3 − 𝑏−𝑎 (b3 − a3 ) − 𝑎3 3 − 𝑎𝑏 2 3 − 6 𝑏𝑎2 3 = 1 4 1 (b4 − a4 ) − 4 − (b4 − a4 ) − = 𝑏−𝑎 6 𝑏−𝑎 6 [𝑓(𝑎) + 4𝑓( 𝑎+𝑏 2 ) + 𝑓(𝑏) ] 𝑎+𝑏 2 ) + b2 ] 2 [2a2 + 2𝑎𝑏 + 2b2 ] 𝑏3 3 + 𝑎3 𝑏 = For: 2 6 6 [a2 + 4 ( 𝑓(𝑥) = 𝑥 3 : 𝐸2 (𝑓, 𝑥) = ∫𝑎 𝑥 3 𝑑𝑥 − For: = 1 𝑏−𝑎 𝑏−𝑎 3 + 𝑏−𝑎 6 𝑏𝑎2 3 + 𝑎𝑏 2 3 =0 [𝑓(𝑎) + 4𝑓( 𝑎+𝑏 2 ) + 𝑓(𝑏) ] 𝑎+𝑏 3 [a3 + 4 ( 2 ) + b3 ] 1 [a3 + 2 (a3 + (a3 + 3𝑎𝑏 2 + 3𝑏𝑎2 +b3 ) + b3 ] 1 4 𝑏−𝑎 3 (a + 𝑎𝑏 2 + 𝑏𝑎2 +b3 ) (b − a4 ) − 4 4 𝑏 4 𝑎4 𝑏𝑎3 𝑏 2 𝑎2 𝑎𝑏 3 𝑏 4 𝑎4 𝑏𝑎3 𝑏 2 𝑎2 𝑎𝑏 3 − − − − − + + + + =0 4 4 4 4 4 4 4 4 4 4 𝑏 𝑓(𝑥) = 𝑥 4 : 𝐸2 (𝑓, 𝑥) = ∫𝑎 𝑥 4 𝑑𝑥 − = 1 (b5 − a5 ) − 5 𝑏−𝑎 6 𝑏−𝑎 6 𝑎+𝑏 4 [a4 + 4 ( 15 [𝑓(𝑎) + 4𝑓( 2 ) + b4 ] 𝑎+𝑏 2 ) + 𝑓(𝑏) ] = = 1 (b5 − a5 ) – 5 1 (b5 − a5 ) − 5 = 𝑏5 5 − = 𝑎5 5 + 𝑏−𝑎 𝑏−𝑎 24 6 𝑏−𝑎 6 [a4 + [a4 + (𝑎+𝑏)4 4 + b4 ] a4 +4𝑎3 𝑏+6𝑎2 𝑏2 +4ab3 +b4 4 + b4 ] (5a4 +4𝑎3 𝑏 + 6𝑎2 𝑏 2 +4ab3 + 5b4 ) 24(𝑏 5 −𝑎5 )−5(𝑏−𝑎)[5a4 +4𝑎3 𝑏+6𝑎2 𝑏2 +4ab3 +5b4 ] 120 𝑏−𝑎 [−24(a4 +𝑎3 𝑏 + 𝑎2 𝑏 2 +ab3 + b4 ) + 25a4 +20𝑎3 𝑏 + 30𝑎2 𝑏 2 +20ab3 + 25b4 ] 120 𝑏−𝑎 [−24a4 −24𝑎3 𝑏 − 24𝑎2 𝑏 2 −24ab3 − 24b4 + 25a4 +20𝑎3 𝑏 + 30𝑎2 𝑏 2 +20ab3 =− 120 =− + 25b4 ] 𝑏−𝑎 = − 120 [𝑎4 − 4𝑎3 𝑏 + 𝑏𝑎2 𝑏 2 − 4𝑎3 𝑏 + 𝑏𝑎2 𝑏 2 − 4𝑎𝑏 3 + 𝑏 4 ] =− =− 𝑏−𝑎 (𝑏 − 𝑎)4 120 (𝑏−𝑎)5 120 ≠0 (21) Hence, the Simpson’s one-third rule integrates exactly polynomial of degree less than or equal to three. Therefore, the method is of order 3. Now the error is obtained for (𝑥) = 𝑥 4 , using error formula (6) we have 𝑏 𝑐 𝐸2 (𝑓, 𝑥) = 4! 𝑓 4 (𝜉), Where 𝑐 = ∫𝑎 𝑥 4 𝑑𝑥 − 𝑏−𝑎 6 𝑎+𝑏 [𝑓(𝑎) + 4𝑓 ( As given in (21) above, 𝑐 = − 𝑐 Therefore 𝐸2 (𝑓, 𝑥) = 4! 𝑓 4 (𝜉) = − =− =− 𝑏 ℎ5 90 𝑓 4 (𝜉) 2 ) + 𝑓(𝑏)] (𝑏−𝑎)5 120 (𝑏−𝑎)5 𝑓 4 (𝜉) 120 4! (2ℎ)5 𝑓 4 (𝜉) 120 24 By ℎ = ℎ Hence 𝐸2 (𝑓, 𝑥) = ∫𝑎 𝑓(𝑥)𝑑𝑥 − 3 [𝑓(𝑎) + 4𝑓( 𝑏−𝑎 2 𝑎+𝑏 2 and 𝑎 ≤ 𝜉 ≤ 𝑏 ℎ5 ) + 𝑓(𝑏) ] = − 90 𝑓 4 (𝜉) ∎ Note: the method is one order higher than expected, since we have approximated 𝑓(𝑥) by polynomial of degree 2 only. 16 Theorem 4 Let 𝑓: 𝐶[𝑎, 𝑏] → ℝ be four times continuously differentiable. Then the error for the composite Simpson’s one-third rule is given by 𝑏 𝑏−𝑎 𝐸2 (𝑓, 𝑥) = ∫𝑎 𝑓(𝑥)𝑑𝑥 − 𝑆ℎ (𝑓) = − 180 ℎ4 𝑓 4 (𝜉) For some 𝜉 ∈ [𝑎, 𝑏] Proof: 𝑏 𝑥 𝑥 𝑥 0 2 4 Consider ∫𝑎 𝑓(𝑥)𝑑𝑥 − 𝑆ℎ (𝑓) = ∫𝑥 2 𝑓(𝑥)𝑑𝑥 + ∫𝑥 4 𝑓(𝑥)𝑑𝑥 + ∫𝑥 6 𝑓(𝑥)𝑑𝑥 + …+ 𝑥𝑛 ∫𝑥 𝑓(𝑥)𝑑𝑥 𝑛−2 ℎ − 3 [𝑦0 + 4(𝑦1 + 𝑦3 + 𝑦5 + ⋯ + 𝑦𝑛−1 ) + 2(𝑦2 + 𝑦4 + 𝑦6 + ⋯ + 𝑦𝑛−2 ) + 𝑦𝑛 ] 𝑥 𝑥 𝑥 0 2 4 𝑥 ℎ = ∫𝑥 2 𝑓(𝑥)𝑑𝑥 + ∫𝑥 4 𝑓(𝑥)𝑑𝑥 + ∫𝑥 6 𝑓(𝑥)𝑑𝑥 + …+ ∫𝑥 𝑛 𝑓(𝑥)𝑑𝑥 − 3 [𝑦0 + 4𝑦1 + 2𝑦2 + 4𝑦3 + 𝑛−2 2𝑦4 + 4𝑦5 + 𝑦6 + ⋯ + 𝑦𝑛−2 + 4𝑦𝑛−1 + 𝑦𝑛 ] 𝑥 𝑥 ℎ 𝑥 ℎ = ∫𝑥 2 𝑓(𝑥)𝑑𝑥 − 3 [𝑦0 + 4𝑦1 + 𝑦2 ] + ∫𝑥 4 𝑓(𝑥)𝑑𝑥 − 3 [𝑦2 + 4𝑦3 + 𝑦4 ] + ∫𝑥 6 𝑓(𝑥)𝑑𝑥 − 0 2 ℎ 3 ℎ5 [𝑦4 + 4𝑦5 + 𝑦6 ] + ℎ5 4 𝑥 …+ ∫𝑥 𝑛 𝑓(𝑥)𝑑𝑥 𝑛−2 ℎ − 3 [𝑦𝑛−2 + 4𝑦𝑛−1 + 𝑦𝑛 ] ℎ5 ℎ5 = − 90 𝑓 4 (𝜉1 ) + (− 90 𝑓 4 (𝜉2 )) + (− 90 𝑓 4 (𝜉3 )) + ⋯ + (− 90 𝑓 4 (𝜉𝑁 )) By theorem 3 Where, 𝑎 = 𝑥0 ≤ 𝜉1 ≤ 𝑥2 ,𝑥2 ≤ 𝜉2 ≤ 𝑥4 ,…,𝑥𝑛−2 ≤ 𝜉𝑁 ≤ 𝑥𝑛 = 𝑏 ℎ5 = − 90 [𝑓 4 (𝜉1 ) + 𝑓 4 (𝜉2 ) + 𝑓 4 (𝜉3 ) + ⋯ + 𝑓 4 (𝜉𝑁 )] ℎ5 4 = − 90 ∑𝑁 𝑘=1 𝑓 (𝜉𝑘 ) (22) 4 4 From 𝑁 min 𝑓 4 (𝑥) ≤ ∑𝑁 𝑘=1 𝑓 (𝜉𝑘 ) ≤ 𝑁 max 𝑓 (𝑥) 𝑥∈[𝑎,𝑏] 𝑥∈[𝑎,𝑏] And the continuity of 𝑓 4 we conclude that there exists 𝜉 ∈ [𝑎, 𝑏] such that 𝑓 4 (𝜉) = 4 ∑𝑁 𝑘=1 𝑓 (𝜉𝑘 ) 𝑁 4 Implies N𝑓 4 (𝜉) = ∑𝑁 𝑘=1 𝑓 (𝜉𝑘 ) (23) Substituting (23) in (22) we get ℎ5 𝑏 ∫𝑎 𝑓(𝑥)𝑑𝑥 − 𝑆ℎ (𝑓) = − 90 N𝑓 4 (𝜉) 17 =− 𝑏−𝑎 5 ) 𝑛 ( 90 N𝑓 4 (𝜉) By ℎ = 𝑏−𝑎 𝑛 = 𝑏−𝑎 2𝑁 𝑏−𝑎 ( 2𝑁 )5 =− N𝑓 4 (𝜉) 90 =− 1 (𝑏 − 𝑎)5 N𝑓 4 (𝜉) 90 25 𝑁 5 =− =− 1 (𝑏 − 𝑎)5 4 𝑓 (𝜉) 90 25 𝑁 4 1 (𝑏 − 𝑎)(𝑏 − 𝑎)4 4 𝑓 (𝜉) 90 2(2𝑁)4 =− 𝑏 (𝑏 − 𝑎)ℎ4 4 𝑓 (𝜉) 180 Hence 𝐸2 (𝑓, 𝑥) = ∫𝑎 𝑓(𝑥)𝑑𝑥 − 𝑆ℎ (𝑓) = − (𝑏−𝑎)ℎ4 180 𝑓 4 (𝜉) ∎ The bound on the error is given by 𝐸2 (𝑓, 𝑥) ≤ (𝑏 − 𝑎)ℎ4 𝑀4 180 Or 𝐸2 (𝑓, 𝑥) ≤ (𝑏 − 𝑎)ℎ5 𝑀 2880𝑁 4 4 𝑀4 = max |𝑓 4 (𝑥) | and 𝑁ℎ = Where 𝑎≤𝑥≤𝑏 𝑏−𝑎 2 Remark: Simpson’s 1/3 rule and composite Simpson’s 1/3 rule are of order 3. The number of subintervals is even positive integer. As N increases, the error decrease. Geometrical interpretation of Simpson’s 1/3 rule is that the area under the curve is re𝑛 placed by 2 arcs of second degree polynomials, or parabolas with axes taken in the vertical direction. 18 Example 2 1 2 Find the approximate value of 𝐼 = ∫0 𝑒 𝑥 𝑑𝑥, using Simpson’s 1/3 rule with 4, 8, and 16 equal subintervals and find bounds of the errors. Solution: with 𝑛 = 2𝑁 = 4, 8, 𝑎𝑛𝑑 16 or 𝑁 = 2, 4, 8 we have the following step lengths and nodal points. 𝑁 = 2: 𝑁 = 4: ℎ= 𝑁 = 8: ℎ= 𝑏−𝑎 2𝑁 𝑏−𝑎 2𝑁 ℎ= 𝑏−𝑎 2𝑁 1 = 4.The nodes are 0, 0.25, 0.5, 0.75, and 1.0. 1 = 8.The nodes are 0, 0.125, 0.25, 0.375, 0.5, 0.675, 0.75, 0.875, and 1.0. 1 = 16.The nodes are 0, 0.0625, 0.125, 0.1875, 0.25, 0.3125, 0.375, 0.4375, 0.5, 0.5625, 0.625, 0.675, 0.6875, 0.75, 0.875, 0.9375 and 1.0. We have the following tables of values. Table 2.1 𝑁=4 𝑥 0 0.25 0.5 0.75 1 𝑥2 0 0.0625 .25 0.5625 1 𝑓(𝑥) 1 1.064494 1.284025 1.755055 2.718282 Table 2.2 𝑁 𝑥 0 0.125 0.25 0.375 0.5 0.675 0.75 0.875 1 =8 𝑥2 0 0.015625 0.0625 0.14062 0.25 0.45562 0.5625 0.76562 1 5 𝑓(𝑥) 1 1.015748 5 5 1.0644 1.15099 1.28402 1.47790 1.75505 2.15033 94 3 5 4 5 8 19 2.718282 Table2.3 𝑁 = 16 𝑥 0 And 0.06 0.1 0.1 0.2 0.3 25 25 875 5 12 𝑓(𝑥) = 𝑒𝑥 0.375 0.437 0.5 5 0.562 5 5 2 𝑥2 0 0.00 0.0 0.0 0.0 0.0 0.140 0.191 3906 156 351 625 97 625 406 25 56 0.25 0.316 406 65 6 𝑓(𝑥) 1 1.00 1.0 1.0 1.0 1.1 1.150 1.210 1.28 1.372 3914 157 357 644 02 993 951 402 188 48 81 94 58 5 3 𝑥 0.6 0.68 0.7 0.8 0.8 0.9 25 5 125 75 37 75 1 5 𝑥2 0.3 0.47 0.5 0.6 0.7 0.8 90 625 601 656 78 56 25 90 2656 62 5 𝑓(𝑥) 1 6 1.4 1.60 1.7 1.9 2.1 2.4 2.718 77 550 350 503 08 282 55 94 38 26 4249 90 4 4 Now, we compute value of the integral. 𝑛 = 2𝑁 = 4: = ℎ 𝐼1 = 3 [𝑓(0) + 4(𝑓(0.25) + 𝑓(0.75)) + 2𝑓(0.5) + 𝑓(1)] 0.25 [1 + 4(1.064494 + 1.755055) + 2(1.284025) + 2.718282] 3 = 1.463711 20 ℎ 𝑛 = 2𝑁 = 8: 𝐼2 = 3 [𝑓(0) + 4(𝑓(0.125) + 𝑓(0.375) + 𝑓(0.675) + 𝑓(0.875)+ = 2(𝑓(0.25) + 𝑓(0.5) + 𝑓(0.75)) + 𝑓(1)] = 0.125 [1 + 4(1.015748 + 1.150993 + 1.477904 + 2.150338) 3 + 2(1.064494 + 1.284025 + 1.755055) + 2.718282] = 1.462409 ℎ 𝑛 = 2𝑁 = 16: 𝐼2 = 3 [𝑓(0) + 4(𝑓(0.0625) + 𝑓(0.1875) + 𝑓(0.3125) + 𝑓(0.4375) + 𝑓(0.5625) + 𝑓(0.6875) + 𝑓(0.8125) + 𝑓(0.9375) + 2(𝑓(0.125) + 𝑓(0.25) + 𝑓(0.375)) + 𝑓(0.5) + 𝑓(0.625) + 𝑓(0.75) + 𝑓(0.875)) + 𝑓(1)] = 0.125 3 [1 + 4(1.003914 + 1.035781 + 1.102583 + 1.210951 + 1.372187 + 1.604249 + 1.935094 + 2.408264 + 2(1.015748 + 1.064494 + 1.150993 + 1.284025 + 1.477904 + 1.755055 + 2.150338) + 2.718282] = 1.462656 2.1.2.2. Simpson’s 3/8 rule Putting 𝑛 = 3 in Newton-Cotes formula and taking the curve through (𝑥𝑖 , 𝑦𝑖 ): 𝑖 = 0,1,2,3 as polynomial of third order so that differences above the third order vanish, we get 𝑏 𝑥 3 3 1 3 3 ∫𝑎 𝑓(𝑥)𝑑𝑥 = ∫𝑥 𝑓(𝑥)𝑑𝑥 = 3ℎ(𝑦0 + 2 ∆𝑦0 + 2 ∆2 𝑦0 + 8 ∆3 𝑦0 ) = 8 ℎ(𝑦0 + 3𝑦1 + 3𝑦2 + 𝑦3 ) 0 𝑏 3 Thus ∫𝑎 𝑓(𝑥)𝑑𝑥 = 8 ℎ(𝑦0 + 3𝑦1 + 3𝑦2 + 𝑦3 ) (24) This is called Simpson’s 3/8 rule. Similarly we can derive composite Simpsons 3/8 rule. 𝑥3 3 ∫ 𝑓(𝑥)𝑑𝑥 = ℎ(𝑦0 + 3𝑦1 + 3𝑦2 + 𝑦3 ) 8 𝑥0 𝑥6 3 ∫ 𝑓(𝑥)𝑑𝑥 = ℎ(𝑦3 + 3𝑦4 + 3𝑦5 + 𝑦6 ) 8 𝑥3 𝑥9 3 ∫ 𝑓(𝑥)𝑑𝑥 = ℎ(𝑦6 + 3𝑦7 + 3𝑦8 + 𝑦9 ) 8 𝑥6 𝑥𝑛 ∫𝑥 𝑛−3 . . . . . . 3 𝑓(𝑥)𝑑𝑥 = 8 ℎ(𝑦𝑛−3 + 3𝑦𝑛−2 + 3𝑦𝑛−1 + 𝑦𝑛 ) 21 Adding the right and left expressions we get 𝑥 𝑥 0 3 𝑥 𝑥 3 3 6 9 𝑛 ∫𝑥 𝑓(𝑥)𝑑𝑥 + ∫𝑥 𝑓(𝑥)𝑑𝑥 + ∫𝑥 𝑓(𝑥)𝑑𝑥 + ⋯ + ∫𝑥 𝑓(𝑥)𝑑𝑥 = 8 ℎ(𝑦0 + 3𝑦1 + 3𝑦2 + 𝑦3 ) + 6 3 𝑛−3 3 3 ℎ(𝑦3 + 3𝑦4 + 3𝑦5 + 𝑦6 ) + 8 ℎ(𝑦6 + 3𝑦7 + 3𝑦8 + 𝑦9 ) + ⋯ + 8 ℎ(𝑦𝑛−3 + 3𝑦𝑛−2 + 3𝑦𝑛−1 + 8 𝑦𝑛 ) = (𝑦0 + 3𝑦1 + 3𝑦2 + 𝑦3 ) + (𝑦3 + 3𝑦4 + 3𝑦5 + 𝑦6 ) + (𝑦6 + 3𝑦7 + 3𝑦8 + 𝑦9 ) + ⋯ + (𝑦𝑛−3 + 3𝑦𝑛−2 + 3𝑦𝑛−1 + 𝑦𝑛 ) = 3 ℎ(𝑦0 + 3(𝑦1 + 𝑦2 + 𝑦4 + 𝑦5 + ⋯ + 𝑦𝑛−1 ) + 2(𝑦3 + 𝑦6 +𝑦9 + ⋯ + 𝑦𝑛−3 ) + 𝑦𝑛 ) 8 Since 𝑓(𝑥) is continuous we have 𝑥 3 𝑛 ∫𝑥 𝑓(𝑥)𝑑𝑥 = 8 ℎ(𝑦0 + 3(𝑦1 + 𝑦2 + 𝑦4 + 𝑦5 + ⋯ + 𝑦𝑛−1 ) + 2(𝑦3 + 𝑦6 +𝑦9 + ⋯ + 𝑦𝑛−3 ) + 𝑦𝑛 ) 0 This is called composite Simpson’s 3/8 rule. Theorem 5 Let 𝑓: ℂ[𝑎, 𝑏] → ℝ be four times continuously differentiable then the error for Simpson’s rule can be represented in the form 𝑏 𝐸3 (𝑓, 𝑥) = ∫𝑎 𝑓(𝑥)𝑑𝑥 − For some 𝜉 ∈ [𝑎, 𝑏] and ℎ = 3ℎ 8 [𝑓(𝑎) + 3𝑓 ( 2𝑎+𝑏 3 𝑎+2𝑏 ) + 3𝑓 ( 3 ) + 𝑓(𝑏) ] = − 3ℎ5 80 𝑓 4 (𝜉) 𝑏−𝑎 3 Proof: Consider the error expression 𝑏 𝐸3 (𝑓, 𝑥) = ∫𝑎 𝑓(𝑥)𝑑𝑥 − 3ℎ 8 2𝑎+𝑏 [𝑓(𝑎) + 3𝑓 ( 3 𝑎+2𝑏 ) + 3𝑓 ( 3 ) + 𝑓(𝑏) ] For 𝑓(𝑥) = 1, 𝑥, 𝑥 2 , 𝑥 3 , 𝑥 4 , evaluate 𝐸3 (𝑓, 𝑥). 𝑏 Now for 𝑓(𝑥) = 1 : 𝐸3 (𝑓, 𝑥) = ∫𝑎 1𝑑𝑥 − 3ℎ 8 2𝑎+𝑏 [𝑓(𝑎) + 3𝑓 ( 3 𝑎+2𝑏 ) + 3𝑓 ( 3 ) + 𝑓(𝑏) ] 𝑏−𝑎 3( 3 ) 𝑏−𝑎 [1 + 3(1) + 3(1) + 1] = 𝑏 − 𝑎 − = (𝑏 − 𝑎) − 8=0 8 8 𝑏 For:𝑓(𝑥) = 𝑥: 𝐸3 (𝑓, 𝑥) = ∫𝑎 𝑥𝑑𝑥 − = = 𝑏 2 −𝑎2 2 − 𝑏−𝑎 8 3ℎ 8 2𝑎+𝑏 [𝑓(𝑎) + 3𝑓 ( 3 ) + 3𝑓 ( 𝑎+2𝑏 3 ) + 𝑓(𝑏) ] 𝑏 2 − 𝑎2 𝑏 − 𝑎 2𝑎 + 𝑏 𝑎 + 2𝑏 − [𝑎 + 3 ( ) + 3( ) + 𝑏] 2 8 3 3 [𝑎 + 2𝑎 + 𝑏 + 𝑎 + 2𝑏 + 𝑏] = = 22 𝑏 2 −𝑎2 2 − 𝑏−𝑎 8 [4𝑎 + 4𝑏] = 𝑏 2 −𝑎2 2 − 𝑏 2 −𝑎2 2 =0 𝑏 For: 𝑓(𝑥) = 𝑥 2 : 𝐸3 (𝑓, 𝑥) = ∫𝑎 𝑥 2 𝑑𝑥 − 3ℎ 8 2𝑎+𝑏 [𝑓(𝑎) + 3𝑓 ( 3 ) + 3𝑓 ( 𝑎+2𝑏 3 ) + 𝑓(𝑏) ] 𝑏 3 − 𝑎3 3( 𝑏 − 𝑎 2𝑎 + 𝑏 2 𝑎 + 2𝑏 2 2 = − ) [𝑎 + 3( ) + 3( ) + 𝑏2 ] 3 8 3 3 3 = 𝑏 3 − 𝑎3 𝑏 − 𝑎 2 4𝑎2 + 4𝑎𝑏 + 𝑏 2 𝑎2 + 4𝑎𝑏 + 4𝑏 2 − [𝑎 + + + 𝑏2] 3 8 3 3 = 𝑏 3 −𝑎3 3 − 𝑏−𝑎 3𝑎2 +4𝑎2 +4𝑎𝑏+𝑏 2 +𝑎2 +4𝑎𝑏+4𝑏2 +3𝑏2 [ 8 𝑏 3 −𝑎3 = = 3 𝑏 3 −𝑎3 3 = 3 − 3 𝑎2 +𝑎𝑏+𝑏 2 3 ] ) 𝑏 3 − 𝑎3 𝑏 3 − 𝑎3 − =0 3 3 𝑏 3ℎ 8 [𝑓(𝑎) + 3𝑓 ( 2𝑎+𝑏 3 𝑎+2𝑏 ) + 3𝑓 ( 3 ) + 𝑓(𝑏) ] 𝑏 4 − 𝑎4 3( 𝑏 − 𝑎) 3 2𝑎 + 𝑏 3 𝑎 + 2𝑏 3 − [𝑎 + 3 ( ) + 3( ) + 𝑏3 ] 4 8 3 3 3 = = [ 8 −(𝑏 − 𝑎)( For 𝑓(𝑥) = 𝑥 3 : 𝐸3 (𝑓, 𝑥) = ∫𝑎 𝑥 3 𝑑𝑥 − = 𝑏−𝑎 8𝑎2 +8𝑎𝑏+8𝑏 2 ] 𝑏 4 − 𝑎4 (𝑏 − 𝑎) 3 (2𝑎 + 𝑏)3 (𝑎 + 2𝑏)3 − [𝑎 + + + 𝑏3] 4 8 9 9 𝑏 4 − 𝑎4 (𝑏 − 𝑎) 9𝑎3 + 8𝑎3 + 12𝑎2 𝑏 + 6𝑎𝑏 2 + 𝑏 3 + 𝑎3 + 6𝑎2 𝑏 + 12𝑎𝑏 2 + 8𝑏 3 + 9𝑏 3 − [ ] 4 8 9 𝑏 4 − 𝑎4 (𝑏 − 𝑎) 18𝑎3 + 18𝑎2 𝑏 + 18𝑎𝑏 2 + 18𝑏 3 = − [ ] 4 8 9 𝑏 4 − 𝑎4 (𝑏 − 𝑎) [2𝑎3 + 2𝑎2 𝑏 + 2𝑎𝑏 2 + 2𝑏 3 ] = − 4 8 = 𝑏 4 − 𝑎4 (𝑏 − 𝑎) 3 [𝑎 + 𝑎2 𝑏 + 𝑎𝑏 2 + 𝑏 3 ] − 4 4 = 𝑏 4 − 𝑎4 𝑏 4 − 𝑎4 − =0 4 4 𝑏 For 𝑓(𝑥) = 𝑥 4 : 𝐸3 (𝑓, 𝑥) = ∫𝑎 𝑥 4 𝑑𝑥 − = 𝑏5 5 = − 𝑎5 5 − 3ℎ 8 [𝑓(𝑎) + 3𝑓 ( 2𝑎+𝑏 3 𝑎+2𝑏 ) + 3𝑓 ( 3 ) + 𝑓(𝑏) ] (𝑏−𝑎) 27𝑎4 +16𝑎4 +32𝑎3 𝑏+24𝑎2 𝑏 2 +8𝑎𝑏 3 +𝑏 4 +𝑎4 +8𝑎3 𝑏+24𝑎2 𝑏2 +32𝑎𝑏 3 +16𝑏4 +27𝑏 4 [ 8 (𝑏−𝑎)(𝑏 4 +𝑏3 𝑎+𝑏 2 𝑎2 +𝑏𝑎3 +𝑎4 ) 5 27 − (𝑏−𝑎) 216 [44𝑎4 + 40𝑎3 𝑏 + 48𝑎2 𝑏 2 + 40𝑎𝑏 3 + 44𝑏 4 ] 23 ] =− (𝑏 − 𝑎) (−216𝑏 4 − 216𝑏 3 𝑎 − 216𝑏 2 𝑎2 − 216𝑏𝑎3 − 216𝑎4 + 220𝑎4 + 200𝑎3 𝑏 1080 + 240𝑎2 𝑏 2 + 200𝑎𝑏 3 + 220𝑏 4 ) (𝑏 − 𝑎) (4𝑎4 − 16𝑎3 𝑏 + 24𝑎2 𝑏 2 − 16𝑎𝑏 3 + 4𝑏 4 ) 1080 (𝑏 − 𝑎) 4 (𝑎 − 4𝑎3 𝑏 + 6𝑎2 𝑏 2 − 4𝑎𝑏 3 + 𝑏 4 ) =− 270 =− =− (𝑏−𝑎) 270 (𝑏 − 𝑎)4 = − (𝑏−𝑎)5 270 =− (3ℎ)5 270 =− 35 ℎ5 270 9 = − 10 ℎ5 ≠ 0 9 Now by definition of error constant 𝑐 = − 10 ℎ5 Now the error term for the expression is, 𝑐 9 3 𝐸3 (𝑓, 𝑥) = 4! 𝑓 4 (𝜉) = − 10×4×3×2×1 ℎ5 𝑓 4 (𝜉) = − 80 𝑓 4 (𝜉) 𝑏 Thus 𝐸3 (𝑓, 𝑥) = ∫𝑎 𝑓(𝑥)𝑑𝑥 − 3ℎ 8 [𝑓(𝑎) + 3𝑓 ( 2𝑎+𝑏 3 𝑎+2𝑏 ) + 3𝑓 ( 3 ) + 𝑓(𝑏) ] = − 3ℎ5 80 𝑓 4 (𝜉) ∎ The bound for the error term is given by, |𝐸3 (𝑓, 𝑥)| ≤ − 3ℎ5 80 M4 Where 𝑀4 = max | 𝑓 4 (𝜉)| 𝑎≤𝑥≤𝑏 Remark: The number of sub-intervals must be divisible by three. Its error constant c is larger than the Simpson 1/3 rule. The number of nodal points must be odd. Geometrical interpretation of Simpson’s 3/8 rule is the area under the curve in which the 𝑛 curve is replaced by 3 arcs of third degree polynomial. 24 Theorem 6(error of composite 3/8 rule) Let𝑓: [𝑎, 𝑏] → ℝ be four times continuously differentiable. Then the error for the composite Simpson’s rule is given by 𝑏 ∫𝑎 𝑓(𝑥)𝑑𝑥 − 𝑆ℎ (𝑓) = − (𝑏−𝑎)ℎ4 80 𝑓 4 (𝜉) For some 𝜉 ∈ [𝑎, 𝑏] and ℎ = 𝑏−𝑎 𝑛 = 𝑏−𝑎 3𝑁 Proof: 𝑏 𝑥 𝑥 𝑥 0 3 6 𝑥 Consider ∫𝑎 𝑓(𝑥)𝑑𝑥 − 𝑆ℎ (𝑓) = ∫𝑥 3 𝑓(𝑥)𝑑𝑥 + ∫𝑥 6 𝑓(𝑥)𝑑𝑥 + ∫𝑥 9 𝑓(𝑥)𝑑𝑥 + ⋯ + ∫𝑥 𝑛 𝑓(𝑥)𝑑𝑥 − 𝑛−3 3 ℎ(𝑦0 + 3(𝑦1 + 𝑦2 + 𝑦4 + 𝑦5 + ⋯ + 𝑦𝑛−1 ) + 2(𝑦3 + 𝑦6 +𝑦9 + ⋯ + 𝑦𝑛−3 ) + 𝑦𝑛 ) 8 𝑥 𝑥 𝑥 0 3 6 𝑥 3 = ∫𝑥 3 𝑓(𝑥)𝑑𝑥 + ∫𝑥 6 𝑓(𝑥)𝑑𝑥 + ∫𝑥 9 𝑓(𝑥)𝑑𝑥 + ⋯ + ∫𝑥 𝑛 𝑓(𝑥)𝑑𝑥 − 8 ℎ [(𝑦0 + 3𝑦1 + 3𝑦2 + 𝑦3 ) + 𝑛−3 (𝑦3 + 3𝑦4 + 3𝑦5 + 𝑦6 ) + (𝑦6 + 3𝑦7 + 3𝑦8 + 𝑦9 ) + ⋯ + (𝑦𝑛−3 + 3𝑦𝑛−2 + 3𝑦𝑛−1 + 𝑦𝑛 )] 𝑥 𝑥 3 3 = ∫𝑥 3 𝑓(𝑥)𝑑𝑥 − 8 ℎ (𝑦0 + 3𝑦1 + 3𝑦2 + 𝑦3 ) + ∫𝑥 6 𝑓(𝑥)𝑑𝑥 − 8 ℎ (𝑦3 + 3𝑦4 + 3𝑦5 + 𝑦6 ) + 0 3 𝑥9 ∫𝑥 𝑓(𝑥)𝑑𝑥 6 3 − 8 ℎ (𝑦6 + 3𝑦7 + 3𝑦8 + 𝑦9 ) + ⋯ + 𝑥𝑛 ∫𝑥 𝑓(𝑥)𝑑𝑥 𝑛−3 3 − 8 ℎ (𝑦𝑛−3 + 3𝑦𝑛−2 + 3𝑦𝑛−1 + 𝑦𝑛 ) = (− 3 80 ℎ5 𝑓 4 (𝜉1 )) + (− 3 80 3 ℎ5 𝑓 4 (𝜉2 )) + (− 80 ℎ5 𝑓 4 (𝜉3 )) + ⋯ + (− 3 80 ℎ5 𝑓 4 (𝜉𝑁 )) Where, 𝑎 = 𝑥0 ≤ 𝜉1 ≤ 𝑥3 ,𝑥3 ≤ 𝜉2 ≤ 𝑥6 , 𝑥6 ≤ 𝜉2 ≤ 𝑥9, …,𝑥𝑛−2 ≤ 𝜉𝑁 ≤ 𝑥𝑛 = 𝑏 =− =− 3 80 3 80 ℎ5 [𝑓 4 (𝜉1 ) + 𝑓 4 (𝜉2 ) + 𝑓 4 (𝜉3 ) + ⋯ + 𝑓 4 (𝜉𝑁 )] 4 ℎ 5 ∑𝑁 𝑘=1 𝑓 ( 𝜉𝑘 ) ( 25) 4 4 4 From 𝑁 min 𝑓 4 (𝑥) ≤ ∑𝑁 𝑘=1 𝑓 ( 𝜉𝑘 ) ≤ 𝑁 max 𝑓 (𝑥) and the continuity of 𝑓 𝑥∈[𝑎,𝑏] 𝑥∈[𝑎,𝑏] We conclude that there exists 𝜉 ∈ [𝑎, 𝑏] such that 𝑓 4 (𝜉) = 4 ∑𝑁 𝑘=1 𝑓 (𝜉𝑘 ) 𝑁 4 𝑁𝑓 4 (𝜉) = ∑𝑁 𝑘=1 𝑓 ( 𝜉𝑘 ) Implies Substituting (26) in (25) we get, 𝑏 ∫𝑎 𝑓(𝑥)𝑑𝑥 − 𝑆ℎ (𝑓) = − 3 3 80 ℎ5 (𝑁𝑓 4 (𝜉)) 𝑏−𝑎 5 = − 80 ( 3𝑁 ) 𝑁𝑓 4 (𝜉) 3 (𝑏−𝑎)5 = − 80 35 𝑁 5 1 (𝑏−𝑎)5 𝑁𝑓 4 (𝜉) = − 80 34 𝑁 4 𝑓 4 (𝜉) = − 25 (𝑏−𝑎) (𝑏−𝑎)4 80 34 𝑁 4 𝑓 4 (𝜉) = − (𝑏−𝑎) 80 𝑏−𝑎 4 ( 3𝑁 ) 𝑓 4 (𝜉) =− (𝑏 − 𝑎) 4 4 ℎ 𝑓 (𝜉) 80 𝑏 Therefore ∫𝑎 𝑓(𝑥)𝑑𝑥 − 𝑆ℎ (𝑓) = − 1 (𝑏−𝑎) 80 ℎ4 𝑓 4 (𝜉) ∎ 2 Example 2 Find the approximate value of 𝐼 = ∫0 𝑒 𝑥 𝑑𝑥, using Simpson’s 3/8 rule with 6, and 12 equal subintervals and find bounds of the errors. Solution: with 𝑛 = 3𝑁 = 6 𝑎𝑛𝑑 12 or 𝑁 =2 and 4 we have the following step lengths and nodal points. 𝑁 = 2, ℎ = 𝑁 = 4: ℎ= 𝑏−𝑎 3𝑁 𝑏−𝑎 3𝑁 1 = 6.The nodes are 0, 0.1667, 0.3333, 0.5001, 0.6668, 0.8334, and 1.0. 1 = 12.The nodes are 0, 0.0833, 0.1666, 0.2499, 0.3332, 0.4165, 0.4998, 0.5831, 0.6664, 0.7497, 0.8330, 0.9163, and 1.0. We have the following tables of values. Table 3.1 𝑁=6 𝑥 0 0.1667 0.3333 0.5001 0.6668 0.8334 1 𝑥2 0 0.0278 0.1111 0.2501 0.4446 0.6946 1 𝑓(𝑥) 1 1.0282 1.1175 1.2842 1.5599 2.0029 2.7183 And 𝑓(𝑥) = 𝑒 𝑥2 Table 3.2 𝑁 = 12 𝑥 0 0.833 0.1666 0.2499 And 𝑓(𝑥) 𝑥2 0 0.0069 0.0278 0.0624 = 𝑒𝑥2 𝑓(𝑥) 𝑥 1 0.749 1.0069 1.0282 1.0644 08330 0.9163 1 0.6944 0.8396 1 2.0025 2.3154 2.7183 7 𝑥2 0.562 0 𝑓(𝑥) 1.754 2 26 0.3 0.416 0.499 0.58 332 5 8 31 0.1 0.173 0.249 0.34 110 4 8 00 1.1 1.189 1.283 1.40 174 3 8 49 0.6664 0.4441 1.5591 Now, we compute value of the integral. 𝑛 = 3𝑁 = 6: 𝐼1 = 3ℎ 8 [𝑓(0) + 3(𝑓(0.1667) + 𝑓(0.3333) + 𝑓(0.6668) + 𝑓(0.8334)) + 2𝑓(0.5001) + 𝑓(1)] = 0.5 [1 + 3(1.0282 + 1.1175 + 1.5599 + 2.0029) + 2(1.2842) + 2.718282] = 8 =1.463554 𝑛 = 3𝑁 = 12: 𝐼2 = 3ℎ 8 [𝑓(0) + 3(𝑓(0.0833) + 𝑓(0.1666) + 𝑓(0.3332) + 𝑓(0.4165) + 𝑓(0.5831) + 𝑓(0.6664) + 𝑓(0.8330) + 𝑓(0.9163) + 2(𝑓(0.2499) + 𝑓(0.4998) + 𝑓(0.7497)) + 𝑓(1)] = 0.25 [1 + 3(1.0069 + 1.0282 + 1.1174 + 1.1893 + 1.4049 + 1.5591 + 2.0025 + 2.3154) 8 + 2(1.0644 + 1.2838 + 1.7542) + 2.718282] = 1.462318 |𝐸3 | ≤ (𝑏 − 𝑎) 4 ℎ max |𝑓 4 (𝑥)| 𝑎≤𝑥≤𝑏 80 1 For n = 6, 𝐸3 ≤ 80𝑥64 76e=0.001993 1 For n=12, 𝐸3 ≤ 80𝑥124 76e=0.000124 2.2. Romberg method While computing the value of the integral with a particular step length, the values of the integral with a particular step length, the values of the integral obtained earlier by using larger step length were not used. Further, convergence may be slow. Romberg method is a powerful tool which uses the method of extrapolation. We compute the value of the integral with a number of step lengths using the same method. Usually, we start with a course step length, then reduce the step lengths and compute the value of the integral again. The sequence of these values converges to the exact value of the integral. Romberg method uses these values of the integral obtained with various step lengths, to refine the solution such that the new values are of higher order. That is, as if the results are obtained using a higher order method than the order of the method used. The extrapolation method is derived by studying the error of the method that is being used. Let us derive the Romberg method for the trapezium and Simpson’s rules. 27 2.2.1. Romberg method for the trapezium rule Let the integral 𝑏 𝐼 = ∫ 𝑓(𝑥)𝑑𝑥 𝑎 be computed by the composite trapezium rule. Let 𝐼 denote the exact value of the integral and 𝐼𝑇 denote the value obtained by the composite trapezium rule. The error, 𝐼 − 𝐼𝑇 , in the composite trapezium rule in computing the integral is given by 𝐼 − 𝐼𝑇 = 𝑐1 ℎ2 + 𝑐2 ℎ4 + 𝑐3 ℎ6 + ⋯ Or 𝐼 = 𝐼𝑇 + 𝑐1 ℎ2 + 𝑐2 ℎ4 + 𝑐3 ℎ6 + ⋯ Where, 𝑐1 , 𝑐2 , 𝑐3 , … are independent of ℎ to illustrate the extrapolation procedure, first consider two error terms 𝐼 = 𝐼𝑇 + 𝑐1 ℎ2 + 𝑐2 ℎ4 Let 𝐼 be evaluated using two step lengths ℎ and 𝑞ℎ, 0 < 𝑞 < 1 Let these values be denoted by 𝐼𝑇 (ℎ) and𝐼𝑇 (𝑞ℎ). The error equations become 𝐼 = 𝐼𝑇 (ℎ) + 𝑐1 (ℎ2 ) + 𝑐2 (ℎ4 ) (26) 𝐼 = 𝐼𝑇 (𝑞ℎ) + 𝑐1 𝑞 2 ℎ2 + 𝑐2 𝑞 4 ℎ4 (27) From (26) we obtain 𝐼 − 𝐼𝑇 (ℎ) = 𝑐1 (ℎ2 ) + 𝑐2 (ℎ4 ) (28) From (27), we obtain 𝐼 − 𝐼𝑇 (𝑞ℎ) = 𝑐1 𝑞 2 ℎ2 + 𝑐2 𝑞 4 ℎ4 (29) Multiply (28) by 𝑞 2 to obtain 𝑞 2 (𝐼 − 𝐼𝑇 (ℎ)) = 𝑐1 𝑞 2 ℎ2 + 𝑐2 𝑞 2 ℎ4 (30) Eliminating 𝑐1 𝑞 2 ℎ2 from (29) and (30), we obtain (1 − 𝑞 2 )𝐼 − 𝐼𝑇 (𝑞ℎ) + 𝑞 2 𝐼𝑇 (ℎ) = 𝑐2 𝑞 2 ℎ4 (𝑞 2 − 1) Solving for 𝐼, we obtain 𝐼= 𝐼𝑇 (𝑞ℎ)−𝑞 2 𝐼𝑇 (ℎ) (1−𝑞 2 ) − 𝑐2 𝑞 2 ℎ4 Note that the error term on the right hand side is now of order 𝑂(ℎ4 ). Neglecting the 𝑂(ℎ4 ) error term, we obtain the new approximation to the value of the integral as 𝐼 = 𝐼1 (ℎ) = 𝐼𝑇 (𝑞ℎ)−𝑞2 𝐼𝑇 (ℎ) (31) (1−𝑞 2 ) We note that this value is obtained by suitably using the values of the integral obtained with step lengths ℎ and 𝑞ℎ, 0 < 𝑞 < 1 this computed result is of order, 𝑂(ℎ4 ), which is higher than the 28 1 order of the trapezium rule, which is of 𝑂(ℎ2 ). For 𝑞 = 2, that is, computations are done with ℎ step lengths ℎ and 2, the formula (31) simplifies to 𝐼𝑇 (1) (ℎ) = ℎ 2 1 4 1 1− 4 𝐼𝑇 ( )− 𝐼𝑇 (ℎ) ℎ 2 4𝐼𝑇 ( )−𝐼𝑇 (ℎ) = (32) 3 ℎ ℎ ℎ In practical applications, we normally use the sequence of step lengths ℎ, 2, 22 , 23 ,... ℎ ℎ Suppose, the integral is computed using the step lengths ℎ, 2, 22 . Using the results obtained with ℎ ℎ the step lengths 2, 22 , we get ℎ 𝐼𝑇 (1) (2) ℎ = 1 ℎ 𝐼𝑇 ( )− 𝐼𝑇 ( ) 4 4 2 1 1− ℎ ℎ 4𝐼𝑇 ( )−𝐼𝑇 ( ) 4 2 3 = 4 (33) ℎ Both the results 𝐼𝑇 (1) (ℎ) and 𝐼𝑇 (1) (2) are of order, 𝑂(ℎ4 ). Now, we can eliminate the 𝑂(ℎ4 ) terms of these two results to obtain a result of next higher order 𝑂(ℎ6 ). 1 1 The multiplicative factor is now (2)4 = 16. The formula becomes 𝐼𝑇 (2) (ℎ) ≈ ℎ 2 1 16 1 1− 16 𝐼𝑇 (1) ( )− 𝐼𝑇 (1) (ℎ) = ℎ 2 16𝐼𝑇 (1) ( )−𝐼𝑇 (1) (ℎ) 15 (34) Therefore, we obtain the Romberg extrapolation procedure for the composite trapezoid rule as 𝐼𝑇 (𝑚) (ℎ) ≈ ℎ 2 4𝑚 −1 4𝑚 𝐼𝑇 (𝑚−1) ( )−𝐼𝑇 (𝑚−1) (ℎ) , 𝑚 = 1,2,3, … (35) where 𝐼𝑇 (0) (ℎ) = 𝐼𝑇 (ℎ) The computed result is of order 𝑂(ℎ2𝑚+2 ). A general expression for Romberg integration can also be written as I I (36) I k , j I k 1, j 1 k 1, j k11 k 1, j , k 2 4 1 The index k represents the order of extrapolation. For example, k 1 represents the values obtained from the regular trapezoidal rule, k 2 represents the values obtained using the true error estimate as O h 2 , etc. The index j represents the more and less accurate estimate of the integral. The value of an integral with a j 1 index is more accurate than the value of the integral with a j index. ℎ ℎ The extrapolations using three step lengths, ℎ, 2, 22 are given in the table below 29 Table 2.2.1 Step lengths ℎ Value of 𝐼 Value of 𝐼 Value of 𝐼 𝑂(ℎ2 ) 𝑂(ℎ4 ) 𝑂(ℎ6 ) 𝐼𝑇 (ℎ) 𝐼𝑇 ℎ 2 ℎ 𝐼𝑇 ( ) 2 ℎ 4 𝐼𝑇 (4) (1) (ℎ) = ℎ 4𝐼𝑇 (2) − 𝐼𝑇 (ℎ) 3 ℎ 4𝐼𝑇 ( ) − 𝐼𝑇 (ℎ) (1) ℎ 2 𝐼𝑇 ( ) = 2 3 𝐼𝑇 (2) (ℎ) = ℎ 16𝐼𝑇 (1) (2) − 𝐼𝑇 (1) (ℎ) 15 ℎ Note that the most accurate values are the values at the end of each column 2.2.2. Romberg method for the Simpson’s 1/3 rule We can apply the same procedure as in trapezium rule to obtain the Romberg’s extrapolation procedure for the Simpson’s 1/3 rule. Let 𝐼 denote the exact value of the integral and 𝐼𝑆 denote the value obtained by the composite Simpson’s 1/3 rule. The error, 𝐼 − 𝐼𝑆 , in the composite Simpson’s 1/3 rule in computing the integral is given by 𝐼 − 𝐼𝑆 = 𝑐1 ℎ4 + 𝑐2 ℎ6 + 𝑐3 ℎ8 + ⋯ Or 𝐼 = 𝐼𝑆 + 𝑐1 ℎ4 + 𝑐2 ℎ6 + 𝑐3 ℎ8 + ⋯ (36) As in trapezium rule, to illustrate the extrapolation procedure first consider two error terms 𝐼 = 𝐼𝑆 + 𝑐1 ℎ4 + 𝑐2 ℎ6 (37) Let 𝐼 be evaluated using two step lengths ℎ and 𝑞ℎ, 0< 𝑞 < 1 Let these values be denoted by 𝐼𝑆 (ℎ) and 𝐼𝑆 (𝑞ℎ). The error equation become 𝐼 = 𝐼𝑆 (ℎ) + 𝑐1 ℎ4 + 𝑐2 ℎ6 (38) 𝐼 = 𝐼𝑆 (𝑞ℎ) + 𝑐1 𝑞 4 ℎ4 + 𝑐2 𝑞 6 ℎ6 (39 30 From (38), we obtain 𝐼 − 𝐼𝑆 (ℎ) = 𝑐1 ℎ4 + 𝑐2 ℎ6 (40) From (39), we obtain 𝐼 − 𝐼𝑆 (𝑞ℎ) = 𝑐1 𝑞 4 ℎ4 + 𝑐2 𝑞 6 ℎ6 (41) Multiply (40) by 𝑞 4 to obtain 𝑞 4 (𝐼 − 𝐼𝑆 (ℎ)) = 𝑐1 𝑞 4 ℎ4 + 𝑐2 𝑞 4 ℎ6 (42) Eliminating 𝑐1 𝑞 4 ℎ4 from (41) and (42), we obtain (1 − 𝑞 4 )𝐼 − 𝐼𝑆 (𝑞ℎ) + 𝑞 4 𝐼𝑆 (ℎ) = 𝑐2 𝑞 4 ℎ6 (𝑞 2 − 1) Note that the error term on the right hand side is now of order 𝑂(ℎ6 ). Solving for 𝐼, we obtain 𝐼𝑆 (𝑞ℎ) − 𝑞 4 𝐼𝑆 (ℎ) 𝑐2 𝑞 4 6 𝐼= − ℎ (1 − 𝑞 4 ) 1 + 𝑞2 Neglecting the 𝑂(ℎ6 ) error term, we obtain the new approximation to the value of the integral as 𝐼 ≈ 𝐼𝑆 (1) (ℎ) = 𝐼𝑆 (𝑞ℎ)−𝑞4 𝐼𝑆 (ℎ) (43) (1−𝑞 4 ) Again we note that this value is obtained by suitably using the values of the integral obtained with step lengths ℎ an 𝑞ℎ, 0 < 𝑞 < 1. this computed result is of order, 𝑂(ℎ6 ), which is higher than the order of the Simpson’s 1/3 rule, which is of 𝑂(ℎ4 ). 1 ℎ For 𝑞 = 2, that is, computations are done with step lengths ℎ and 2, the formula (43) simplifies to 𝐼𝑆 (1) (ℎ) ≈ ℎ 1 𝐼𝑆 ( )−( )4 𝐼𝑆 (ℎ) 2 2 1 (1−( )4 2 = ℎ 2 16𝐼𝑆 ( )−𝐼𝑆 (ℎ) 16−1 = ℎ 2 16𝐼𝑆 ( )−𝐼𝑆 (ℎ) (44) 15 ℎ ℎ ℎ In practical applications, we normal use the sequence of step lengths ℎ , 2, 22 , 23 , … ℎ ℎ Suppose, the integral is computed using the step lengths ℎ , 2, 22 . Using the results obtained with ℎ ℎ step lengths 2, 22 , we get 𝐼𝑆 (1) ℎ 1 ℎ ℎ ℎ ℎ ℎ 𝐼𝑆 ( ) − ( )4 𝐼𝑆 ( ) 16𝐼𝑆 ( ) − 𝐼𝑆 ( ) 16𝐼𝑆 ( ) − 𝐼𝑆 ( ) ℎ 4 2 2 4 2 4 2 ( )≈ = = 1 4 2 16 − 1 15 (1 − (2) Both the results ℎ 𝐼𝑆 (1) (ℎ) and 𝐼𝑆 (1) ( ) are of order 𝑂(ℎ6 ). Now, we can eliminate 𝑂(ℎ6 ) terms of these two re2 1 sults to obtain a result of next higher order 𝑂(ℎ8 ). The multiplicative factor is now 0(2)6. The formula becomes 31 𝐼𝑆 (2) (ℎ) ≈ ℎ 1 𝐼𝑆 (1) (2) − (2)6 𝐼𝑆 (1) (ℎ) 1 (1 − (2)6 = ℎ 64𝐼𝑆 (1) (2) − 𝐼𝑆 (1) (ℎ) 64 − 1 = ℎ 64𝐼𝑆 (1) (2) − 𝐼𝑆 (1) (ℎ) 63 Therefore, we obtain the Romberg extrapolation procedure for the composite Simpson’s 1/3 rule as 𝐼𝑆 (𝑚) (ℎ) ≈ 4𝑚+1 𝐼𝑆 (𝑚−1) ℎ ( )−𝐼𝑆 (𝑚−1) (ℎ) 2 4𝑚+1 −1 , 𝑚 = 1,2, … Where𝐼𝑆 (0) (ℎ) = 𝐼𝑆 (ℎ). The computed result is of order 𝑂(ℎ2𝑚+4 ) ℎ The extrapolations using three step lengths ℎ, 2, Step ℎ 22 , are given below. Table 2.2.2 Value of 𝐼 Value of Value of 𝐼 𝑂(ℎ6 ) 𝐼 𝑂(ℎ8 ) 𝑂(ℎ4 ) Length ℎ 𝐼𝑆 (ℎ) ℎ 2 ℎ 𝐼𝑆 ( ) 2 ℎ 4 ℎ 𝐼𝑆 ( ) 4 𝐼𝑆 (1) (ℎ) = ℎ 16𝐼𝑆 (2) − 𝐼𝑆 (ℎ) 15 𝐼𝑆 𝐼𝑆 (1) (2) (ℎ) = ℎ ℎ 16𝐼𝑆 (4) − 𝐼𝑆 (2) ℎ ( )= 2 15 Remark: The computation continued till values are close to each other The most accurate values are at the end of each column. 1 2 Example 4 evaluate I = ∫0 ex dx with 4, 8 and 16 subintervals using i. Trapezoid rule ii. Simpson’s rule iii. Romberg method as improvement of trapezoid rule and Simpson’s rule iv. Error bound Solution: i. Done in example 1 ii. Done in example 2 32 ℎ 64𝐼𝑆 (1) (2) − 𝐼𝑆 (1) (ℎ) 63 iii. The approximation using the trapezium rule to the integral with various values of the step lengths were obtained 1 1 h = 4 , N = 4: I = 1.490679; h = 8 , N = 8 : I = 1.469712; 1 h = 16 , = 16 : I = 1.46442 Using Romberg method for the trapezium rule we have 1 I (1) (4) = 1 I (1) (8) = 1 I (2) ( ) 4 = 1 8 1 4 4I( )-I( ) 1 16 4(1.469712)-1.490679 = 3 1 8 4I( )-I( ) 4(1.46442)-1.469712 = 3 1 8 3 1 4 16I(1) ( )-I(1) ( ) 15 3 = = 1.462723 = 1.462656 16(1.462656)-1.462723 15 = 1.462652 The approximation using the Simpson’s 1/3 rule to the integral with various values of the step size were obtained in example 2 as follows 1 1 h = 4 , n = 2N = 4 : I = 1.463711; h = 8 , n = 2N = 8: I = 1.462409 1 h = 16 , n = 2N = 16 : I = 1.462656 Now using Romberg methods for Simpson’s 1/3 rule we have 1 8 1 4 I (1) (4) = 16I( )-I( ) 1 I (1) (8) 16I( )-I( ) 1 1 = I (2) (4) = 1 16 16(1.462409)-1.463711 = 15 1 8 15 1 8 = 1 4 64I(1) ( )-I(1) ( ) 63 15 16(1.462656)-1.462409 15 = = 1.462322 = 1.462672 64(1.462672)-1.462322 63 = 1.462678 To find error bound 2 2 f(x) = ex Implies f '' (x) = (2 + 4x 2 )ex ; f 4 (x) = (12 + 48x 2 + 16x 4 )ex 2 max |f '' (x)| = max (12 + 48x 2 + 16x 4 )ex = 76e a≤x≤b 0≤x≤1 Now using error bound on the trapezium rule 2 max |f '' (x)| = max (2 + 4x 2 )ex = 6e 0≤x≤1 0≤x≤1 Therefore |E1 (f, x)| ≤ 1 |E1 (f, x)| ≤ 12N2 |E1 (f, x)| ≤ 12N2 1 (b-a) 3 12N2 M2 where M2 = max |f '' (x)| a≤x≤b 6e = 0.084946 for N = 4 6e = 0.021236 for N = 8 33 2 1 |E1 (f, x)| ≤ 12N2 6e = 0.005309 for N = 16 Error bound for the Simpson’s 1/3 rule is given by |E2 (f, x)| ≤ (b-a) 5 2880N4 M4 where M4 = max |f 4 (x)| and Nh = a≤x≤b 1 Now |E2 (f, x)| ≤ 2880(24 ) 76e = 0.004483 |E2 (f, x)| ≤ |E2 (f, x)| ≤ 1 2880(84 ) 2 for n = 2N = 4 76e = 0.000280 for n = 2N = 8 76e = 0.0000175 for n = 2N = 16 2880(44 ) 1 b-a Table 4.3 Romberg method for trapezium rule Step length 1 4 1 8 Value of I O(h2 ) Value of I O(h4 ) Value of I O(h6 ) 1.490679 1.462723 1.469712 1.462656 1.462672 1 16 1.46442 Table 4.4 Romberg method for Simpson’s rule Value of I O(h4 ) Step length 1 4 1 8 Value of I O(h6 ) 1.463711 1.462322 1.462409 1.462672 1 16 Value of I O(h8 ) 1.462656 34 1.462678 Example 5 The vertical distance in meters covered by a rocket from t 8 to t 30 seconds is given by 140000 x 2000 ln 9.8t dt 140000 2100t 8 30 Use the trapezoidal rule and Romberg’s rule to find the distance covered. Use the 1, 2, 4, and 8 sub intervals (segments) Solution Table 4.5 n From Table 2.6, the needed rule are I 1,1 11868 1 2 4 8 Trapezoidal Rule 11868 11266 11113 11074 values from the trapezoidal I 1, 2 11266 I 1,3 11113 I 1, 4 11074 where the above four values correspond to using 1, 2, 4 and 8 segment trapezoidal rule, respectively. To get the first order extrapolation values, I 2,1 I1, 2 11266 I1, 2 I 1,1 3 11266 11868 3 11065 Similarly I 2, 2 I 1,3 35 I 1,3 I 1, 2 3 11113 11113 11266 3 11062 I 2,3 I1, 4 11074 I1, 4 I1,3 3 11074 11113 3 11061 For the second order extrapolation values, I 3,1 I 2, 2 11062 I 2, 2 I 2,1 15 11062 11065 15 11062 Similarly I 3, 2 I 2,3 11061 I 2,3 I 2, 2 15 11061 11062 15 11061 For the third order extrapolation values, I 4,1 I 3, 2 11061 I 3, 2 I 3,1 63 11061 11062 11061m 63 36 Table 2.2.3 shows these increasingly correct values in a tree graph. Table 3 Improved estimates of the value of an integral using Romberg integration. First Order 1-segment 2-segment 4-segment 8-segment Second Order Third Order 11868 11266 11065 68 11113 11062 68 11074 11061 868 11062 868 11061 868 37 11061 868 3. SUMMARY 𝑏 Numerical integration approximate a definite integral ∫𝑎 𝑓(𝑥)𝑑𝑥 with different methods, The approximation of the integral by trapezoid rule gives error, 𝑛 𝐸1 = − 12 ℎ3 𝑓 ′′ (𝜉) = − (𝑏−𝑎) 12 ℎ2 𝑓 ′′ (𝜉) Where 𝑛 is number of subintervals. And 𝑛ℎ = 𝑏 − 𝑎 , 𝑎 < 𝜉 < 𝑏, 𝑓 ′′ (𝜉) is the largest value of the second order derivative of the function on [𝑎, 𝑏]. Error bound of trapezoid is given by: |𝐸1 | ≤ 𝑏−𝑎 12 ℎ2 |𝑓 ′′ (𝜉)| 𝑏 Error of Simpson’s 1/3 rule in approximating ∫𝑎 𝑓(𝑥)𝑑𝑥 is given by: 𝑏−𝑎 𝐸2 = − 180 ℎ4 𝑓 4 (𝜉), where, 𝑛ℎ = 𝑏 − 𝑎 and 𝑛 multiple of two, 𝑎 < 𝜉 < 𝑏 and 𝑓 4 (𝜉) is the largest value of the fourth order derivative of the function on [𝑎, 𝑏]. Error bound of Simpson’s 1/3 is given by: |𝐸2 | ≤ 𝑏−𝑎 180 ℎ4 |𝑓 4 (𝜉)| 𝑏 Error of Simpson’s 3/8 rule in approximating ∫𝑎 𝑓(𝑥)𝑑𝑥 is given by: 𝑛 𝐸2 = − 80 ℎ5 𝑓 4 (𝜉), where, 𝑛ℎ = 𝑏 − 𝑎 and 𝑛 multiple of three, 𝑎 < 𝜉 < 𝑏 and 𝑓 4 (𝜉) is the largest value of the fourth order derivative of the function on [𝑎, 𝑏]. The bound on the error of Simpson’s 3/8 rule is given by: |𝐸2 | ≤ 𝑛 80 ℎ5 |𝑓 4 (𝜉)| 1 The Romberg extrapolation procedure for the composite trapezoid rules for 𝑞 = 2 is given by: ℎ 𝐼𝑇 (𝑚) (ℎ) ≈ 4𝑚 𝐼𝑇 (𝑚−1) ( )−𝐼𝑇 (𝑚−1) (ℎ) 2 4𝑚 −1 , 𝑚 = 1,2,3, … where 𝐼𝑇 (0) (ℎ) = 𝐼𝑇 (ℎ) 38 (35) 1 The Romberg extrapolation procedure for the composite Simpson’s 1/3 rule for 𝑞 = 2 is given by: 𝐼𝑆 (𝑚) (ℎ) ≈ 4𝑚+1 𝐼𝑆 (𝑚−1) ℎ ( )−𝐼𝑆 (𝑚−1) (ℎ) 2 4𝑚+1 −1 , 𝑚 = 1,2, … where 𝐼𝑆 (0) (ℎ) = 𝐼𝑆 (ℎ). The error of Romberg method is the modification of the other errors hence with high accuracy than others. On the successive application of Romberg method on trapezoid rule and Simpson’s rule primitive errors are modified by order two that is, error order has the form, ℎ(2𝑚+2) .From this seminar we get that analytical non-integrable, or impossible functions can be approximated using numerical methods. From these approximation formulas Romberg method is better than trapezoid rule and Simpson’s rule in general. Simpson method is better than trapezoid rule in most cases but for periodic functions trapezoid rule is better than Simpson’s rule. 39 4. REFERENCE Atkinson, L.V., P.J., Harley, and J.D., Hudson, 1988. Numerical methods with fortran 77, Addison-wesley publishing company. Chapra, S.C., and R.P. Canale, 1988, numerical methods for engineers, McGraw.Hill companies. De, P.K., 2006, Computer based numerical methods and statistical techniques, Cbs publishers and distributors. Faires, J.D and R.L. Burden, 2002. Numerical methods volume I, Brooks Cole Grewal, B.S., 1991. Numerical methods in engineering and science, Khan Publishers. Kress, R., 1997. Graduate Texts in mathematics, Springer- Verlag, New York publishers. Iyengar, S.R.K., and R.K., 2009, Numerical methods, New age international publishers. Kaw, A., July 29, 2017, http://numericalmethods.eng.usf.edu. Ralston, A. and P. Rabinowitz, 1978, First course in numerical analysis, Dover publishers. 40
© Copyright 2025 Paperzz