seminar file

advertisement
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
I k , j ο€½ I k ο€­1, j 1  k ο€­1, j k1ο€­1 k ο€­1, j , k ο‚³ 2
(36)
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 ο€½ I 1, 2 
ο€½ 11266 
I 1, 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., February 9, 2016, http://numericalmethods.eng.usf.edu.
Ralston, A. and P. Rabinowitz, 1978, First course in numerical analysis, Dover publishers.
40
Download