Download presentation
Presentation is loading. Please wait.
1
Composite Numerical Integration
Sec:4.4 Composite Numerical Integration
2
Sec:4.4 Composite Numerical Integration
Example Simpson’s Rule 𝒂 𝒃 𝒇 𝒙 𝒅𝒙 = 𝒉 𝟑 𝒇 𝒙 𝟎 +𝟒𝒇 𝒙 𝟏 +𝒇( 𝒙 𝟐 ) − 𝒉 𝟓 𝟗𝟎 𝒇 𝟒 𝝃 ∗ Use Simpson’s rule to approximate 𝟎 𝟒 𝒆 𝒙 𝒅𝒙 𝟎 𝟒 𝒆 𝒙 𝒅𝒙 Apply Simpson’s rule on [0, 4] Absolute Error 𝟎 𝟒 Apply Simpson’s rule on [0, 2] and [2, 4] 𝟎 𝟐 𝒆 𝒙 𝒅𝒙 𝟐 𝟒 𝒆 𝒙 𝒅𝒙 𝟎 𝟐 𝟒 Apply Simpson’s rule on [0, 1], [1, 2], [2, 3] and [3, 4] 𝟎 𝟏 𝒆 𝒙 𝒅𝒙 𝟏 𝟐 𝒆 𝒙 𝒅𝒙 𝟐 𝟑 𝒆 𝒙 𝒅𝒙 𝟑 𝟒 𝒆 𝒙 𝒅𝒙 𝟎 𝟏 𝟐 𝟑 𝟒 Remark: The error has been reduced
3
Sec:4.4 Composite Numerical Integration
To generalize this procedure Simpson’s Rule 1) choose an even integer n 𝒂 𝒃 𝒇 𝒙 𝒅𝒙 = 𝒉 𝟑 𝒇 𝒙 𝟎 +𝟒𝒇 𝒙 𝟏 +𝒇( 𝒙 𝟐 ) − 𝒉 𝟓 𝟗𝟎 𝒇 𝟒 𝝃 ∗ 𝒉= 𝒃−𝒂 𝒏 2) Subdivide the interval [a, b] into n subintervals 𝒙 𝒋 =𝒂+𝒋𝒉 𝒋=𝟏, 𝟐, ⋯,𝒏 3) apply Simpson’s rule on each consecutive pair of subintervals [𝑥 0 , 𝑥 2 ] [𝑥 2 , 𝑥 4 ] [𝑥 𝑛−2 , 𝑥 𝑛 ] We will apply Simpson’s rule 𝑛 2 times 𝑥 0 𝑥 1 𝑥 2 𝑥 3 𝑥 4 𝑥 𝑛−2 𝑥 𝑛−1 𝑥 𝑛 𝒂 𝒃 𝒇 𝒙 𝒅𝒙 = 𝒉 𝟑 𝒇 𝒙 𝟎 +𝟒𝒇 𝒙 𝟏 +𝒇( 𝒙 𝟐 ) 𝒉 𝟑 𝒇 𝒙 𝟐 +𝟒𝒇 𝒙 𝟑 +𝒇( 𝒙 𝟒 ) 𝒉 𝟑 𝒇 𝒙 𝒏−𝟐 +𝟒𝒇 𝒙 𝒏−𝟏 +𝒇( 𝒙 𝒏 ) − 𝒉 𝟓 𝟗𝟎 𝒇 𝟒 𝝃 𝟏 − 𝒉 𝟓 𝟗𝟎 𝒇 𝟒 𝝃 𝟐 − 𝒉 𝟓 𝟗𝟎 𝒇 𝟒 𝝃 𝒏 𝟐 𝒂 𝒃 𝒇 𝒙 𝒅𝒙 = 𝒋=𝟏 𝒏/𝟐 𝒙 𝟐𝒋−𝟐 𝒙 𝟐𝒋 𝒇 𝒙 𝒅𝒙 = 𝒋=𝟏 𝒏/𝟐 𝒉 𝟑 𝒇 𝒙 𝟐𝒋−𝟐 +𝟒𝒇 𝒙 𝟐𝒋−𝟏 +𝒇 𝒙 𝟐𝒋 − 𝒋=𝟏 𝒏/𝟐 𝒉 𝟓 𝟗𝟎 𝒇 𝟒 𝝃 𝒋 𝒇 𝒙 𝟐𝒋 Appearing twice = 𝒉 𝟑 𝒇 𝒂 +𝟐 𝒋=𝟏 𝒏/𝟐 −𝟏 𝒇 𝒙 𝟐𝒋 +𝟒 𝒋=𝟏 𝒏/𝟐 𝒇 𝒙 𝟐𝒋−𝟏 +𝒇(𝒃) − 𝒋=𝟏 𝒏/𝟐 𝒉 𝟓 𝟗𝟎 𝒇 𝟒 𝝃 𝒋
4
Sec:4.4 Composite Numerical Integration
𝒂 𝒃 𝒇 𝒙 𝒅𝒙 = 𝒋=𝟏 𝒏/𝟐 𝒙 𝟐𝒋−𝟐 𝒙 𝟐𝒋 𝒇 𝒙 𝒅𝒙 = 𝒋=𝟏 𝒏/𝟐 𝒉 𝟑 𝒇 𝒙 𝟐𝒋−𝟐 +𝟒𝒇 𝒙 𝟐𝒋−𝟏 +𝒇 𝒙 𝟐𝒋 − 𝒋=𝟏 𝒏/𝟐 𝒉 𝟓 𝟗𝟎 𝒇 𝟒 𝝃 𝒋 𝒇 𝒙 𝟐𝒋 Appearing twice = 𝒉 𝟑 𝒇 𝒂 +𝟐 𝒋=𝟏 𝒏/𝟐 −𝟏 𝒇 𝒙 𝟐𝒋 +𝟒 𝒋=𝟏 𝒏/𝟐 𝒇 𝒙 𝟐𝒋−𝟏 +𝒇(𝒃) − 𝒋=𝟏 𝒏/𝟐 𝒉 𝟓 𝟗𝟎 𝒇 𝟒 𝝃 𝒋 𝑬 𝒇 =− 𝒋=𝟏 𝒏/𝟐 𝒉 𝟓 𝟗𝟎 𝒇 𝟒 𝝃 𝒋 Extreme value theorem and Intermediate value theorem give 𝑬 𝒇 =− 𝒃−𝒂 𝟏𝟖𝟎 𝒉 𝟒 𝒇 𝟒 (𝝁) Theorem Notice that the error term for the Composite Simpson’s rule is O(h4), whereas it was O(h5) for the standard Simpson’s rule. However, these rates are not comparable because of different values of h. Simpson’s Rule 𝒂 𝒃 𝒇 𝒙 𝒅𝒙 = 𝒉 𝟑 𝒇 𝒙 𝟎 +𝟒𝒇 𝒙 𝟏 +𝒇( 𝒙 𝟐 ) − 𝒉 𝟓 𝟗𝟎 𝒇 𝟒 𝝃 ∗
5
Sec:4.4 Composite Numerical Integration
The subdivision approach can be applied to any of the Newton-Cotes formulas. Such as the Trapezoidal and Midpoint rules The Trapezoidal rule requires only one interval for each application, so the integer n can be either odd or even. The Trapezoidal Rule 𝑎 𝑏 𝑓 𝑥 𝑑𝑥 = 𝒉 𝟐 𝒇 𝒙 𝟎 +𝒇 𝒙 𝟏 − 𝒉 𝟑 𝟏𝟐 𝒇 ′′ 𝝃 Theorem Theorem The midpoint Rule 𝑎 𝑏 𝑓 𝑥 𝑑𝑥 =𝟐𝒉𝒇 𝒙 𝟎 + 𝒉 𝟑 𝟑 𝒇 ′′ 𝝃
6
Sec:4.4 Composite Numerical Integration
Composite Simpson’s rule Composite Trapezoidal rule Example (a) 360 (*) Composite Trapezoidal with n=18 requires 19 function evaluations (b) n=18 with 19 function evaluations 1+17+1 accurate only to about 5e-3 accurate to within about 1e-5
7
Sec:4.4 Composite Numerical Integration
Remarks: 1) The Newton-Cotes formulas are generally unsuitable for use over large integration intervals. High-degree formulas would be required 2) The values of the coefficients in these formulas are difficult to obtain. 3) The Newton-Cotes formulas are based on interpolatory polynomials that use equally-spaced nodes, a procedure that is inaccurate over large intervals because of the oscillatory nature of high-degree polynomials.
8
Sec:4.4 Composite Numerical Integration
9
Sec:4.4 Composite Numerical Integration
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.