0% found this document useful (0 votes)
10 views27 pages

Numerical Integration

The document discusses Numerical Integration, a method used to approximate the area under a curve when analytical solutions are difficult or impossible. It explains the concept of definite integrals, quadrature formulas, and various numerical integration techniques, including the Trapezoidal Rule and Simpson's Rule. The document also provides examples and formulas for calculating integrals using these methods.

Uploaded by

yynnkl9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views27 pages

Numerical Integration

The document discusses Numerical Integration, a method used to approximate the area under a curve when analytical solutions are difficult or impossible. It explains the concept of definite integrals, quadrature formulas, and various numerical integration techniques, including the Trapezoidal Rule and Simpson's Rule. The document also provides examples and formulas for calculating integrals using these methods.

Uploaded by

yynnkl9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1

Numerical Integration

The area under curve is one of the common most application for
“Numerical Integration” because the “Analytical Methods” are
difficult solution or there’s no solution in this way.
It is known that a definite integral of the form
𝒃

∫ 𝒇(𝒙)𝒅𝒙
𝒂
Represents the area under the curve

𝒚 = 𝒇(𝒙)

enclosed between the limits 𝒙 = 𝒂 and 𝒙 = 𝒃.

Thus, the goal is to approximate the definite integral of a function 𝒇(𝒙)


over the interval [𝒂 . 𝒃] by evaluating the function 𝒇(𝒙) at a finite
number of sample points. Thus, the process of finding the
approximation to the definite Integral is known as Numerical
Integration.

∆𝒙 ∆𝒙 ∆𝒙 ∆𝒙 ∆𝒙

𝒙𝟏 𝒙𝟐

Let 𝒙𝟎 . 𝒙𝟏 . 𝒙𝟐 . ⋯ . 𝒙𝒏 be given set of observations, and let


𝒚𝟎 . 𝒚𝟏 . 𝒚𝟐 . ⋯ . 𝒚𝒏 be the corresponding values for the curve 𝒚 = 𝒇(𝒙).

Suppose that 𝒂 = 𝒙𝟎 < 𝒙𝟏 < 𝒙𝟐 < ⋯ < 𝒙𝒎 < 𝒃.


A formula of the form:

𝒎
𝑸[𝒇] = ∑ 𝒘𝒌 𝒇(𝒙𝒌 ) = 𝒘𝟎 𝒇(𝒙𝟎 ) + 𝒘𝟏 𝒇(𝒙𝟏 ) + ⋯ + 𝒘𝒎 𝒇(𝒙𝒎 )
𝒌=𝟎
2

with the property that:


𝒃
∫ 𝒇(𝒙)𝒅𝒙 = 𝑸[𝒇] + 𝑬[𝒇]
𝒂

is called a numerical integration or quadrature formula.


• The term 𝑬[𝒇] is called the truncation error for integration.
• The values {𝒙𝒌 }𝒎
𝒌=𝟎 are called the quadrature nodes and
• {𝒘𝒌 }𝒎
𝒌=𝟎 are called weights.

Closed Newton-Cotes Quadrature Formulas


The Newton – Cotes Integration formulas are the most
numerical integration schemes. They are based on the strategy of
replacing a complicated function or tabulated data with an
approximating function that is easy to integrate:

𝒃
𝑰 = ∫ 𝒇(𝒙)𝒅𝒙 = 𝑭(𝒃) − 𝑭(𝒂)
𝒂
Example:
𝟏
∫ 𝒆𝒙 𝒅𝒙 = 𝒆𝒙 |𝟏𝟎 = 𝒆𝟏 − 𝒆𝟎 = 𝟐. 𝟕𝟏𝟖 − 𝟏 = 𝟐. 𝟕𝟏𝟖𝟐𝟖 − 𝟏 = 𝟏. 𝟕𝟏𝟖𝟐𝟖
𝟎

since 𝒆𝒙 is an antiderivative of 𝒆𝒙 . It is however true that there are


functions for which antiderivatives cannot be written down if we are
allowed to use only the elementary functions: polynomials, rational
functions, trig functions, exp and log. Arguably the most famous example
is the following integral
𝟏
∫ 𝒆−𝟐𝒙 𝒅𝒙
𝟎
For this will need to use approximate numerical methods.
If divide the interval [a , b] into n subintervals and compute n + 1 points
𝒙𝒏 = 𝒙𝟎 + 𝒏 ∆𝒙 . 𝒏 = 𝐧𝐮𝐦𝐛𝐞𝐫 𝐨𝐟 𝐬𝐮𝐛𝐢𝐧𝐭𝐞𝐫𝐯𝐚𝐥𝐬 = 𝟏, 𝟐, 𝟑, ⋯
𝒙𝒏 − 𝒙𝟎
∆𝒙 = are 𝐞𝐪𝐮𝐚𝐥𝐥𝐲 𝐬𝐩𝐚𝐜𝐞𝐝 𝐧𝐨𝐝𝐞𝐬 and
𝒏
𝒏

𝒇𝒏 (𝒙) = ∑ 𝒂𝒊 𝒇(𝒙𝒊 ) = 𝒂𝟎 𝒇(𝒙𝟎 ) + 𝒂𝟏 𝒇(𝒙𝟏 ) + ⋯ + 𝒂𝒏 𝒇(𝒙𝒏 )


𝒊=𝟎
3

The first four closed Newton-Cotes quadrature formulas are:

𝒙𝟏
∆𝒙
∫ 𝒇(𝒙)𝒅𝒙 ≈ (𝒇 + 𝒇𝟏 ) − − − − − − − 𝐭𝐡𝐞 𝐓𝐫𝐚𝐩𝐞𝐳𝐨𝐢𝐝𝐚𝐥 𝐑𝐮𝐥𝐞
𝒙𝟎 𝟐 𝟎

𝒙𝟐
∆𝒙
∫ 𝒇(𝒙)𝒅𝒙 ≈ (𝒇 + 𝟒𝒇𝟏 + 𝒇𝟐 ) − − − −𝐭𝐡𝐞 𝐒𝐢𝐦𝐩𝐬𝐨𝐧`𝐬 𝟏/𝟑 𝐑𝐮𝐥𝐞
𝒙𝟎 𝟑 𝟎
𝒙𝟑
𝟑∆𝒙
∫ 𝒇(𝒙)𝒅𝒙 ≈ (𝒇𝟎 + 𝟑𝒇𝟏 + 𝟑𝒇𝟐 + 𝒇𝟑 ) 𝐭𝐡𝐞 𝐒𝐢𝐦𝐩𝐬𝐨𝐧`𝐬 𝟑/𝟖 𝐑𝐮𝐥𝐞
𝒙𝟎 𝟖
𝒙𝟒
𝟐∆𝒙
∫ 𝒇(𝒙)𝒅𝒙 ≈ (𝟕𝒇𝟎 + 𝟑𝟐𝒇𝟏 + 𝟏𝟐𝒇𝟐 + 𝟑𝟐𝒇𝟑 + 𝟕𝒇𝟒 ) 𝐭𝐡𝐞 𝐁𝐨𝐨𝐥𝐞`𝐬 𝐑𝐮𝐥𝐞
𝒙𝟎 𝟒𝟓

① Trapezoidal Rule

∆𝒙
𝑰= [𝒇(𝒙𝟎 ) + 𝟐{𝒇(𝒙𝟏 ) + 𝒇(𝒙𝟐 ) + 𝒇(𝒙𝟑 ) + ⋯ + 𝒇(𝒙𝒏−𝟏 } + 𝒇(𝒙𝒏 )]
𝟐

𝒃−𝒂
∆𝒙 = .
𝒏
Here n is a number of intervals, and when 𝒏 = 𝟏 ⟹ ∆𝒙 = 𝒃 − 𝒂

∆𝒙 = 𝒃 − 𝒂

𝒙𝟎 = 𝒂 𝒙𝟏 = 𝒃
Lagrange Interpolation:
𝒙 − 𝒙𝟏 𝒙 − 𝒙𝟏
𝑳(𝒙) = 𝒇(𝒙𝟎 ) + 𝒇(𝒙𝟏 )
𝒙𝟎 − 𝒙𝟏 𝒙𝟏 − 𝒙𝟎
4

Let 𝒂 = 𝒙𝟎 , 𝒃 = 𝒙𝟏 , ∆𝒙 = 𝒃 − 𝒂
𝒙−𝒂 𝒅𝒙
𝝃= , 𝒅𝝃 =
𝒃−𝒂 ∆𝒙
𝒙−𝒂 𝒂−𝒂
𝒙=𝒂 ⟹ 𝝃= = =𝟎
𝒃−𝒂 𝒃−𝒂

𝒙−𝒂 𝒃−𝒂
𝒙=𝒃 ⟹ 𝝃= = =𝟏
{ 𝒃−𝒂 𝒃−𝒂 }

⟹ 𝑳(𝝃) = (𝟏 − 𝝃)𝒇(𝒂) + (𝝃) 𝒇(𝒃)


Integrating to obtain the rule:
𝒃 𝒃 𝟏

𝑰 = ∫ 𝒇(𝒙) 𝒅𝒙 ≈ ∫ 𝑳(𝒙) 𝒅𝒙 = ∆𝒙 ∫ 𝑳(𝝃) 𝒅𝝃


𝒂 𝒂 𝟎
𝟏 𝟏

= ∆𝒙 𝒇(𝒂) ∫(𝟏 − 𝝃) 𝒅𝝃 + ∆𝒙 𝒇(𝒃) ∫ 𝑳(𝝃) 𝒅𝝃


𝟎 𝟎
𝟐 𝟏 𝟐 𝟏
𝝃 𝝃 ∆𝒙
= ∆𝒙 𝒇(𝒂) (𝝃 − )| + ∆𝒙 𝒇(𝒃) | ≈ [𝒇(𝒂) + 𝒇(𝒃)]
𝟐 𝟎 𝟐 𝟎 𝟐

Example 1: Evaluate the integral by using Trapezoidal method


𝟒

∫ 𝒙 𝒆𝟐𝒙 𝒅𝒙
𝟎
Solution:

• The exact solution is:


𝟒
𝒖 = 𝒙 ⟹ 𝒅𝒖 = 𝒅𝒙
∫𝒙 𝒆 𝟐𝒙
𝒅𝒙 = ∫ 𝒖𝒅𝒗 = 𝒖𝒗 − ∫ 𝒗 𝒅𝒖 = | 𝟐𝒙
𝒆𝟐𝒙 |
𝒅𝒗 = 𝒆 𝒅𝒙 ⟹ 𝒗 =
𝟎 𝟐
𝟒 𝟒
𝒆𝟐𝒙 𝒆𝟐𝒙 𝟏 𝟐𝒙
𝒆𝟐𝒙
=𝒙 −∫ 𝒅𝒙 = [ 𝒙 𝒆 − ]
𝟐 𝟐 𝟐 𝟒 𝟎
𝟎

𝒙 𝟐𝒙 𝟏 𝟐𝒙 𝟒 𝟏 𝟐𝒙 𝟒
= [ 𝒆 − 𝒆 ] = 𝒆 (𝟐𝒙 − 𝟏)| = 𝟓𝟐𝟏𝟔. 𝟗𝟑
𝟐 𝟒 𝟎 𝟒 𝟎
5

• By trapezoidal Rule:

Let 𝒂 = 𝒙𝟎 = 𝟎 . 𝒃 = 𝒙𝟏 = 𝟒 ⟹ ∆𝒙 = 𝒙𝟏 − 𝒙𝟎 = 𝟒 − 𝟎 = 𝟒
𝟒
∆𝒙 𝟒
𝑰 = ∫ 𝒙 𝒆𝟐𝒙 𝒅𝒙 ≈ [𝒇(𝒙𝟎 ) + 𝒇(𝒙𝟏 )] ≈ [𝒇(𝟎) + 𝒇(𝟒)]
𝟐 𝟐
𝟎
= 𝟐(𝟎 + 𝟒𝒆𝟖 ) = 𝟐𝟑𝟖𝟒𝟕. 𝟔𝟔

𝟓𝟐𝟏𝟔. 𝟗𝟐𝟔 − 𝟐𝟑𝟖𝟒𝟕. 𝟔𝟔


𝜺𝒂 = | | × 𝟏𝟎𝟎% = 𝟑𝟓𝟕. 𝟏𝟐%
𝟓𝟐𝟏𝟔. 𝟗𝟐𝟔

② Simpson`s 𝟏⁄𝟑 𝒓𝒅 Rule


Approximate the function by a parabola
∆𝒙
𝑰= [(𝒇(𝒙𝟎 ) + 𝟒𝒇(𝒙𝟏 ) + 𝒇(𝒙𝟐 )]
𝟑

∆𝒙 ∆𝒙

𝒙𝟎
𝒂 𝒃
Lagrange Interpolation:
(𝒙 − 𝒙𝟏 ) (𝒙 − 𝒙𝟐 ) (𝒙 − 𝒙𝟏 ) (𝒙 − 𝒙𝟐 )
𝑳(𝒙) = 𝒇(𝒙𝟎 ) + 𝒇(𝒙𝟏 )
(𝒙𝟎 − 𝒙𝟏 ) (𝒙𝟎 − 𝒙𝟐 ) (𝒙𝟏 − 𝒙𝟎 ) (𝒙𝟏 − 𝒙𝟐 )
(𝒙 − 𝒙𝟎 ) (𝒙 − 𝒙𝟏 )
+ 𝒇(𝒙𝟐 )
(𝒙𝟐 − 𝒙𝟎 ) (𝒙𝟐 − 𝒙𝟏 )
𝒃−𝒂
Let 𝒂 = 𝒙𝟎 , 𝒃 = 𝒙𝟐 , ∆𝒙 =
𝟐
∆𝒙 = 𝒙𝟏 − 𝒙𝟎 = 𝒙𝟐 − 𝒙𝟏

𝒙𝟏 = 𝒙𝟎 + ∆𝒙 , 𝒙𝟐 = 𝒙𝟎 + 𝟐∆𝒙 = 𝒙𝟏 + ∆𝒙
6

𝒙 − 𝒙𝟏 𝒅𝒙
𝝃= , 𝒅𝝃 =
∆𝒙 ∆𝒙

𝒙 = 𝒙𝟎 ⟹ 𝝃 = −𝟏
{ 𝒙 = 𝒙𝟏 ⟹ 𝝃=𝟎
𝒙 = 𝒙𝟐 ⟹ 𝝃=𝟏

𝝃(𝟏 − 𝝃) 𝝃(𝝃 + 𝟏)
⟹ 𝑳(𝝃) = 𝒇(𝒙𝟎 ) + (𝟏 − 𝝃𝟐 )𝒇(𝒙𝟏 ) + 𝒇(𝒙𝟐 )
𝟐 𝟐
Integrating to obtain the rule:
𝒃 𝟏

𝑰 = ∫ 𝒇(𝒙) 𝒅𝒙 ≈ ∆𝒙 ∫ 𝑳(𝝃) 𝒅𝝃
𝒂 −𝟏
𝟏 𝟏
∆𝒙
= 𝒇(𝒙𝟎 ) ∫ 𝝃(𝝃 − 𝟏) 𝒅𝝃 + 𝒇(𝒙𝟏 ) ∆𝒙 ∫(𝟏 − 𝝃𝟐 ) 𝒅𝝃
𝟐
−𝟏 −𝟏
𝟏
∆𝒙
+𝒇(𝒙𝟐 ) ∫ 𝝃(𝝃 + 𝟏) 𝒅𝝃
𝟐
−𝟏
𝟏 𝟏
∆𝒙 𝝃𝟑 𝝃𝟐 𝝃𝟑
= 𝒇(𝒙𝟎 ) ( − )| + 𝒇(𝒙𝟏 ) ∆𝒙 (𝝃 − )|
𝟐 𝟑 𝟐 −𝟏 𝟑 −𝟏
𝟏
∆𝒙 𝝃𝟑 𝝃𝟐
(
+ 𝒇 𝒙𝟐 ) ( + )|
𝟐 𝟑 𝟐 −𝟏
𝒃
∆𝒙
⟹ 𝑰 = ∫ 𝒇(𝒙) 𝒅𝒙 ≈ [𝒇(𝒙𝟎 ) + 𝟒𝒇(𝒙𝟏 ) + 𝒇(𝒙𝟐 )]
𝟑
𝒂
𝒃−𝒂
∆𝒙 =
𝟐

③ Simpson`s 𝟑⁄𝟖 𝒕𝒉 Rule


Approximate by a cubic polynomial

𝟑
𝑰≈ ∆𝒙[𝒇(𝒙𝟎 ) + 𝟑𝒇(𝒙𝟏 ) + 𝟑𝒇(𝒙𝟐 ) + 𝒇(𝒙𝟑 )]
𝟖

𝒃−𝒂
∆𝒙 =
𝟑
7

Lagrange Interpolation:

(𝒙 − 𝒙𝟏 ) (𝒙 − 𝒙𝟐 ) (𝒙 − 𝒙𝟑 )
𝑳(𝒙) = 𝒇(𝒙𝟎 )
(𝒙𝟎 − 𝒙𝟏 ) (𝒙𝟎 − 𝒙𝟐 ) (𝒙𝟎 − 𝒙𝟑 )
(𝒙 − 𝒙𝟎 ) (𝒙 − 𝒙𝟐 ) (𝒙 − 𝒙𝟑 )
+ 𝒇(𝒙𝟏 )
(𝒙𝟏 − 𝒙𝟎 ) (𝒙𝟏 − 𝒙𝟐 ) (𝒙𝟏 − 𝒙𝟑 )
(𝒙 − 𝒙𝟎 ) (𝒙 − 𝒙𝟏 ) (𝒙 − 𝒙𝟑 )
+ 𝒇(𝒙𝟐 )
(𝒙𝟐 − 𝒙𝟎 ) (𝒙𝟐 − 𝒙𝟏 ) (𝒙𝟐 − 𝒙𝟑 )
(𝒙 − 𝒙𝟎 ) (𝒙 − 𝒙𝟏 ) (𝒙 − 𝒙𝟐 )
+ 𝒇(𝒙𝟑 )
(𝒙𝟑 − 𝒙𝟎 ) (𝒙𝟑 − 𝒙𝟏 ) (𝒙𝟑 − 𝒙𝟐 )

Integrating to obtain the rule:

𝒃 𝒃

𝑰 = ∫ 𝒇(𝒙) 𝒅𝒙 ≈ ∫ 𝑳(𝒙) 𝒅𝒙 ,
𝒂 𝒂
𝒃
𝟑∆𝒙
⟹ 𝑰 = ∫ 𝒇(𝒙) 𝒅𝒙 ≈ [𝒇(𝒙𝟎 ) + 𝟑𝒇(𝒙𝟏 ) + 𝟑𝒇(𝒙𝟐 ) + 𝒇(𝒙𝟑 )]
𝟖
𝒂
𝒃−𝒂
∆𝒙 =
𝟑

Note the 𝟑⁄𝟖 in the formula, and hence the name of method as the
Simpson’s 𝟑⁄𝟖 rule.
8

Example 2: Evaluate the following integral using Simpson 1/3 and


Simpson 3/8 rule and then compare with exact value
𝟒

∫ 𝒙 𝒆𝟐𝒙 𝒅𝒙
𝟎
Solution:
The exact solution is:

𝟒
𝟐𝒙
𝒙 𝟐𝒙 𝟏 𝟐𝒙 𝟒 𝟏 𝟐𝒙 𝟒
∫𝒙 𝒆 𝒅𝒙 = [ 𝒆 − 𝒆 ] = 𝒆 (𝟐𝒙 − 𝟏)| = 𝟓𝟐𝟏𝟔. 𝟗𝟑
𝟐 𝟒 𝟎 𝟒 𝟎
𝟎

• Simpson 1/3 rule


𝟒
∆𝒙
𝑰 = ∫ 𝒙 𝒆𝟐𝒙 𝒅𝒙 ≈ [𝒇(𝟎) + 𝟒𝒇(𝟐) + 𝒇(𝟒)]
𝟑
𝟎
𝟒−𝟎
∆𝒙 = =𝟐
𝟐
𝟒
𝟐
⟹ ∫ 𝒙 𝒆𝟐𝒙 𝒅𝒙 = [𝟎 + 𝟒(𝟐𝒆𝟒 ) + 𝟒𝒆𝟒 ] = 𝟖𝟐𝟒𝟎. 𝟒𝟏
𝟑
𝟎

𝟓𝟐𝟏𝟔. 𝟗𝟑 − 𝟖𝟐𝟒𝟎. 𝟒𝟏
𝜺=| | × 𝟏𝟎𝟎% = −𝟓𝟕. 𝟗𝟔%
𝟓𝟐𝟏𝟔. 𝟗𝟑

• Simpson 3/8 rule


𝟒
𝟑∆𝒙 𝟒 𝟖
𝑰 = ∫ 𝒙 𝒆𝟐𝒙 𝒅𝒙 ≈ [𝒇(𝟎) + 𝟑𝒇 ( ) + 𝟑𝒇 ( ) + 𝒇(𝟒)]
𝟖 𝟑 𝟑
𝟎
𝟒−𝟎 𝟒
∆𝒙 = =
𝟑 𝟑
𝟒
𝟑 (𝟑)
⟹𝐈≈ [𝟎 + 𝟑(𝟏𝟗. 𝟏𝟖𝟗𝟐𝟐) + 𝟑(𝟓𝟓𝟐. 𝟑𝟑𝟗𝟑𝟑) + 𝟏𝟏𝟗𝟐𝟑. 𝟖𝟑𝟐]
𝟖
= 𝟔𝟖𝟏𝟗. 𝟐𝟏
𝟓𝟐𝟏𝟔. 𝟗𝟑 − 𝟔𝟖𝟏𝟗. 𝟐𝟏
𝜺=| | × 𝟏𝟎𝟎% = 𝟑𝟎. 𝟕𝟏%
𝟓𝟐𝟏𝟔. 𝟗𝟑
9

Example 3: A certain fluid has volume (0.08 m3) is expansion


reversibly in a cylinder behind a piston according to a
law𝑷𝑽 = 𝟎. 𝟐𝟓 to become (0.09 m3), where (𝑷) pressure in
(kPa) and (𝑽) volume in (m3). Find by Trapezoidal Rule
work done from
𝑽𝟐

𝑾 = ∫ 𝑷𝒅𝑽 and 𝒏 = 𝟓
𝑽𝟏
Solution:
By numerical integration:

𝒃 − 𝒂 𝟎. 𝟎𝟗 − 𝟎. 𝟎𝟖
∆𝒙 = = = 𝟎. 𝟎𝟎𝟐
𝒏 𝟓
𝟎. 𝟐𝟓 𝟎. 𝟐𝟓
𝑽𝟎 = 𝟎. 𝟎𝟖 𝑷𝟎 = 𝒇(𝑽𝟎 ) = = = 𝟑. 𝟏𝟐𝟓
𝑽𝟎 𝟎. 𝟎𝟖

𝑽𝟏 = 𝑽𝟎 + 𝟎. 𝟎𝟎𝟐 𝟎. 𝟐𝟓 𝟎. 𝟐𝟓
𝑷𝟏 = 𝒇(𝑽𝟏 ) = = = 𝟑. 𝟎𝟒𝟖𝟕
= 𝟎. 𝟎𝟖𝟐 𝑽𝟏 𝟎. 𝟎𝟖𝟐

𝑽𝟐 = 𝑽𝟏 + 𝟎. 𝟎𝟎𝟐 𝟎. 𝟐𝟓 𝟎. 𝟐𝟓
𝑷𝟐 = 𝒇(𝑽𝟐 ) = = = 𝟐. 𝟗𝟕𝟔𝟐
= 𝟎. 𝟎𝟖𝟒 𝑽𝟐 𝟎. 𝟎𝟖𝟒

𝑽𝟑 = 𝑽𝟐 + 𝟎. 𝟎𝟎𝟐 𝟎. 𝟐𝟓 𝟎. 𝟐𝟓
𝑷𝟑 = 𝒇(𝑽𝟑 ) = = = 𝟐. 𝟗𝟎𝟕
= 𝟎. 𝟎𝟖𝟔 𝑽𝟑 𝟎. 𝟎𝟖𝟔

𝑽𝟒 = 𝑽𝟑 + 𝟎. 𝟎𝟎𝟐 𝟎. 𝟐𝟓 𝟎. 𝟐𝟓
𝑷𝟒 = 𝒇(𝑽𝟒 ) = = = 𝟐. 𝟖𝟒𝟏
= 𝟎. 𝟎𝟖𝟖 𝑽𝟒 𝟎. 𝟎𝟖𝟖

𝑽𝟓 = 𝑽𝟒 + 𝟎. 𝟎𝟎𝟐 𝟎. 𝟐𝟓 𝟎. 𝟐𝟓
𝑷𝟓 = 𝒇(𝑽𝟓 ) = = = 𝟐. 𝟕𝟕𝟕𝟕
= 𝟎. 𝟎𝟗 𝑽𝟓 𝟎. 𝟎𝟗

𝑽𝟐
∆𝒙
𝑰 = 𝑾 = ∫ 𝑷𝒅𝑽 ≈ [𝑷 + 𝟐(𝑷𝟏 + 𝑷𝟐 + 𝑷𝟑 + 𝑷𝟒 ) + 𝑷𝟓 ]
𝟐 𝟎
𝑽𝟏

𝟎. 𝟎𝟎𝟐
≈ [𝟑. 𝟏𝟐𝟓 + 𝟐(𝟑. 𝟎𝟒𝟖𝟕 + 𝟐. 𝟗𝟕𝟔𝟐 + 𝟐. 𝟗𝟎𝟕 + 𝟐. 𝟖𝟒𝟏)
𝟐
+ 𝟐. 𝟕𝟕𝟕𝟕]
⟹ 𝑾 = 𝟎. 𝟎𝟐𝟗𝟒𝟒 𝒌𝑱
10

The exact solution is:

𝑽𝟐 𝟎.𝟎𝟗
𝟎. 𝟐𝟓
𝑾 = ∫ 𝑷𝒅𝑽 = ∫ 𝒅𝑽 = 𝟎. 𝟐𝟓[𝒍𝒏𝑽]𝟎.𝟎𝟗
𝟎.𝟎𝟖 = 𝟎. 𝟎𝟐𝟗𝟒𝟒 𝒌𝑱
𝑽
𝑽𝟏 𝟎.𝟎𝟖

𝟎. 𝟎𝟐𝟗𝟒𝟒 − 𝟎. 𝟎𝟐𝟗𝟒𝟒
𝜺= = 𝟎%
𝟎. 𝟎𝟐𝟗𝟒𝟒

Example 4: The vertical distance covered by a rocket from x = 8 to x


= 30 seconds is given by
𝟑𝟎
𝟏𝟒𝟎𝟎𝟎𝟎
𝒔 = ∫ [𝟐𝟎𝟎𝟎 𝒍𝒏 ( ) − 𝟗. 𝟖 𝒙] 𝒅𝒙
𝟏𝟒𝟎𝟎𝟎𝟎 − 𝟐𝟏𝟎𝟎 𝒙
𝟖
Use Simpson 3/8 rule to find the approximate value of the
integral.
Solution:
The Simpson 3/8 rule is:
𝟑
𝑰≈ ∆𝒙[𝒇(𝒙𝟎 ) + 𝟑𝒇(𝒙𝟏 ) + 𝟑𝒇(𝒙𝟐 ) + 𝒇(𝒙𝟑 )]
𝟖
𝒃 − 𝒂 𝟑𝟎 − 𝟖
where ∆𝒙 = = = 𝟕. 𝟑𝟑𝟑𝟑
𝒏 𝟑
𝒙𝟎 = 𝒂 = 𝟖
𝟏𝟒𝟎𝟎𝟎𝟎
𝒇(𝒙𝟎 ) = 𝟐𝟎𝟎𝟎 𝒍𝒏 ( ) − 𝟗. 𝟖 × 𝟖 = 𝟏𝟕𝟕. 𝟐𝟔𝟔𝟕
𝟏𝟒𝟎𝟎𝟎𝟎 − 𝟐𝟏𝟎𝟎 × 𝟖

𝒙𝟏 = 𝒙𝟎 + ∆𝒙 = 𝟖 + 𝟕. 𝟑𝟑𝟑𝟑 = 𝟏𝟓. 𝟑𝟑𝟑𝟑

𝟏𝟒𝟎𝟎𝟎𝟎
𝒇(𝒙𝟏 ) = 𝟐𝟎𝟎𝟎 𝒍𝒏 ( ) − 𝟗. 𝟖 × 𝟏𝟓. 𝟑𝟑𝟑𝟑
𝟏𝟒𝟎𝟎𝟎𝟎 − 𝟐𝟏𝟎𝟎 × 𝟏𝟓. 𝟑𝟑𝟑𝟑
= 𝟑𝟕𝟐. 𝟒𝟔𝟐𝟗

𝒙𝟐 = 𝒙𝟎 + 𝟐∆𝒙 = 𝟖 + 𝟐(𝟕. 𝟑𝟑𝟑𝟑) = 𝟐𝟐. 𝟔𝟔𝟔𝟔

𝟏𝟒𝟎𝟎𝟎𝟎
𝒇(𝒙𝟐 ) = 𝟐𝟎𝟎𝟎 𝒍𝒏 ( ) − 𝟗. 𝟖 × 𝟐𝟐. 𝟔𝟔𝟔𝟔
𝟏𝟒𝟎𝟎𝟎𝟎 − 𝟐𝟏𝟎𝟎 × 𝟐𝟐. 𝟔𝟔𝟔𝟔
= 𝟔𝟎𝟖. 𝟖𝟗𝟕𝟔
11

𝒙𝟑 = 𝒙𝟎 + 𝟑∆𝒙 = 𝟖 + 𝟑(𝟕. 𝟑𝟑𝟑𝟑) = 𝟑𝟎


𝟏𝟒𝟎𝟎𝟎𝟎
𝒇(𝒙𝟑 ) = 𝟐𝟎𝟎𝟎 𝒍𝒏 ( ) − 𝟗. 𝟖 × 𝟑𝟎 = 𝟗𝟎𝟏. 𝟔𝟕𝟒𝟎
𝟏𝟒𝟎𝟎𝟎𝟎 − 𝟐𝟏𝟎𝟎 × 𝟑𝟎
Substituting these values into the formula for Simpson 3/8 rule, yields
𝟑
𝑰≈ × 𝟕. 𝟑𝟑𝟑𝟑 × (𝟏𝟕𝟕. 𝟐𝟔𝟔𝟕 + 𝟑 × 𝟑𝟕𝟐. 𝟒𝟔𝟐𝟗 + 𝟑 × 𝟔𝟎𝟖. 𝟖𝟗𝟕𝟔
𝟖
+𝟗𝟎𝟏. 𝟔𝟕𝟒𝟎) ≈ 𝟏𝟏𝟎𝟔𝟑. 𝟑𝟏

The exact answer can be computed as


𝑰𝒆𝒙𝒂𝒄𝒕 = 𝟏𝟏𝟎𝟔𝟏. 𝟑𝟒

𝟏𝟏𝟎𝟔𝟏. 𝟑𝟒 − 𝟏𝟏𝟎𝟔𝟑. 𝟑𝟏
𝜺=| | × 𝟏𝟎𝟎% = 𝟏𝟕𝟖. 𝟎𝟗𝟖%
𝟏𝟏𝟎𝟔𝟏. 𝟑𝟒

④ The Boole`s Rule


Boole's rule is a method of numerical integration to
approximates an integral
𝒙𝟒
∫ 𝒇(𝒙) 𝒅𝒙
𝒙𝟎
by using the values of the function 𝒇(𝒙) at five equally spaced points
𝒙𝟎 .
𝒙𝟏 = 𝒙𝟎 + ∆𝒙 .
𝒙𝟐 = 𝒙𝟎 + 𝟐∆𝒙 .
𝒙𝟑 = 𝒙𝟎 + 𝟑∆𝒙 .
𝒙𝟒 = 𝒙𝟎 + 𝟒∆𝒙
It expressed as

𝒙𝟒
𝟐∆𝒙
∫ 𝒇(𝒙) 𝒅𝒙 ≈ [𝟕 𝒇(𝒙𝟎 ) + 𝟑𝟐𝒇(𝒙𝟏 ) + 𝟏𝟐𝒇(𝒙𝟐 ) + 𝟑𝟐𝒇(𝒙𝟑 ) + 𝟕𝒇(𝒙𝟒 )]
𝒙𝟎 𝟒𝟓

it is applicable only when the number of subintervals is a multiple of 𝟒


(𝒏 = 𝟒. 𝟖. 𝟏𝟐. ⋯) . Thus dividing the range into four equal parts.
12

Example 5: Apply the various quadrature formulas to evaluate the


integration of the function
𝒇(𝒙) = 𝟏 + 𝒆−𝒙 𝒔𝒊𝒏(𝟒𝒙)
over the interval [𝟎. 𝟐] with equally spaced quadrature
nodes
𝒙𝟎 = 𝟎 , 𝒙𝟏 = 𝟎. 𝟓 , 𝒙𝟐 = 𝟏 , 𝒙𝟑 = 𝟏. 𝟓 , 𝒙𝟒 = 𝟐
Solution:
The step size is:
∆𝒙 = 𝒙𝟏 − 𝒙𝟎 = 𝟎. 𝟓 − 𝟎 = 𝟎. 𝟓
and the corresponding function values are:
𝒇𝟎 = 𝒇(𝟎) = 𝟏 + 𝒆−𝟎 𝒔𝒊𝒏(𝟒 × 𝟎) = 𝟏

𝒇𝟏 = 𝒇(𝟎. 𝟓) = 𝟏 + 𝒆−𝟎.𝟓 𝒔𝒊𝒏(𝟒 × 𝟎. 𝟓) = 𝟏. 𝟓𝟓𝟏𝟓𝟐

𝒇𝟐 = 𝒇(𝟏) = 𝟏 + 𝒆−𝟏 𝒔𝒊𝒏(𝟒 × 𝟏) = 𝟎. 𝟕𝟐𝟏𝟓𝟗

𝒇𝟑 = 𝒇(𝟏. 𝟓) = 𝟏 + 𝒆−𝟏.𝟓 𝒔𝒊𝒏(𝟒 × 𝟏. 𝟓) = 𝟎. 𝟗𝟑𝟕𝟔𝟓

𝒇𝟒 = 𝒇(𝟐) = 𝟏 + 𝒆−𝟐 𝒔𝒊𝒏(𝟒 × 𝟐) = 𝟏. 𝟏𝟑𝟑𝟗𝟎

➢ 𝐓𝐡𝐞 𝐓𝐫𝐚𝐩𝐞𝐳𝐨𝐢𝐝𝐚𝐥 𝐑𝐮𝐥𝐞


𝒙𝟏 𝟎.𝟓
∆𝒙 𝟎. 𝟓
∫ 𝒇(𝒙)𝒅𝒙 = ∫ 𝒇(𝒙)𝒅𝒙 ≈ (𝒇𝟎 + 𝒇𝟏 ) = (𝟏 + 𝟏. 𝟓𝟓𝟏𝟓𝟐)
𝒙𝟎 𝟎 𝟐 𝟐
≈ 𝟎. 𝟔𝟑𝟕𝟖𝟖
➢ 𝐓𝐡𝐞 𝐒𝐢𝐦𝐩𝐬𝐨𝐧`𝐬 𝟏/𝟑 𝐑𝐮𝐥𝐞
𝒙𝟐 𝟏
∆𝒙
∫ 𝒇(𝒙)𝒅𝒙 = ∫ 𝒇(𝒙)𝒅𝒙 ≈ (𝒇 + 𝟒𝒇𝟏 + 𝒇𝟐 )
𝒙𝟎 𝟎 𝟑 𝟎
𝟎. 𝟓
= [𝟏 + 𝟒(𝟏. 𝟓𝟓𝟏𝟓𝟐) + 𝟎. 𝟕𝟐𝟏𝟓𝟗] = 𝟏. 𝟑𝟐𝟏𝟐𝟖
𝟑
➢ 𝐓𝐡𝐞 𝐒𝐢𝐦𝐩𝐬𝐨𝐧`𝐬 𝟑/𝟖 𝐑𝐮𝐥𝐞
𝒙𝟑 𝟏.𝟓
𝟑∆𝒙
∫ 𝒇 𝒙 𝒅𝒙 = ∫ 𝒇(𝒙)𝒅𝒙 ≈
( ) (𝒇𝟎 + 𝟑𝒇𝟏 + 𝟑𝒇𝟐 + 𝒇𝟑 )
𝒙𝟎 𝟎 𝟖
𝟑(𝟎. 𝟓)
= (𝟏 + 𝟑(𝟏. 𝟓𝟓𝟏𝟓𝟐) + 𝟑(𝟎. 𝟕𝟐𝟏𝟓𝟗) + 𝟎. 𝟗𝟑𝟕𝟔𝟓)
𝟖
= 𝟏. 𝟔𝟒𝟏𝟗𝟑
13

➢ 𝐓𝐡𝐞 𝐁𝐨𝐨𝐥𝐞`𝐬 𝐑𝐮𝐥𝐞


𝒙𝟒 𝟐
𝟐∆𝒙
∫ 𝒇(𝒙)𝒅𝒙 = ∫ 𝒇(𝒙)𝒅𝒙 ≈ (𝟕𝒇𝟎 + 𝟑𝟐𝒇𝟏 + 𝟏𝟐𝒇𝟐 + 𝟑𝟐𝒇𝟑 + 𝟕𝒇𝟒 )
𝒙𝟎 𝟎 𝟒𝟓
𝟐(𝟎. 𝟓)
= [𝟕(𝟏) + 𝟑𝟐(𝟏. 𝟓𝟓𝟏𝟓𝟐) + 𝟏𝟐(𝟎. 𝟕𝟐𝟏𝟓𝟗)
𝟒𝟓
+ 𝟑𝟐(𝟎. 𝟗𝟑𝟕𝟔𝟓) + 𝟕(𝟏. 𝟏𝟑𝟑𝟗)] = 𝟐. 𝟐𝟗𝟒𝟒𝟒

➢ If the endpoints of the interval [a, b] are held fixed, the step size
must be adjusted for each rule as follows:

∆𝒙 = 𝒉 = 𝒃 − 𝒂 𝐅𝐨𝐫 𝐭𝐫𝐚𝐩𝐞𝐳𝐨𝐢𝐝𝐚𝐥 𝐫𝐮𝐥𝐞


𝒃−𝒂
∆𝒙 = 𝒉 = 𝐅𝐨𝐫 𝐒𝐢𝐦𝐩𝐬𝐨𝐧`𝐬 𝟏/𝟑 𝐫𝐮𝐥𝐞
𝟐
𝒃−𝒂 𝟑
∆𝒙 = 𝒉 = 𝐅𝐨𝐫 𝐒𝐢𝐦𝐩𝐬𝐨𝐧`𝐬 𝐫𝐮𝐥𝐞, and
𝟑 𝟖
𝒃−𝒂
∆𝒙 = 𝒉 = 𝐅𝐨𝐫 𝐁𝐨𝐨𝐥𝐞`𝐬 𝐫𝐮𝐥𝐞
𝟒
The next example illustrates this point.

Example 6: Evaluate the integration of the function


𝒇(𝒙) = 𝟏 + 𝒆−𝒙 𝒔𝒊𝒏(𝟒𝒙)
over the interval [𝒂, 𝒃] = [𝟎, 𝟏] by applying the various
quadrature formulas.
Solution:
➢ For the trapezoidal rule, where

𝒂 = 𝒙𝟎 = 𝟎 , 𝒃 = 𝒙𝟏 = 𝟏
The step size is:
∆𝒙 = 𝒃 − 𝒂 = 𝟏 − 𝟎 = 𝟏
14

𝒙𝟏 𝟏
∆𝒙
∫ 𝒇(𝒙)𝒅𝒙 = ∫ 𝒇(𝒙)𝒅𝒙 ≈ (𝒇 + 𝒇𝟏 )
𝒙𝟎 𝟎 𝟐 𝟎

The values of the corresponding function are:

𝒇𝟎 = 𝒇(𝟎) = 𝟏 + 𝒆−𝟎 𝒔𝒊𝒏(𝟒 × 𝟎) = 𝟏

𝒇𝟏 = 𝒇(𝟏) = 𝟏 + 𝒆−𝟏 𝒔𝒊𝒏(𝟒 × 𝟏) = 𝟎. 𝟕𝟐𝟏𝟓𝟗


Thus,
𝟏
∆𝒙 𝟏
∫ 𝒇(𝒙)𝒅𝒙 ≈ (𝒇𝟎 + 𝒇𝟏 ) = (𝟏 + 𝟏. 𝟓𝟓𝟏𝟓𝟐) ≈ 𝟎. 𝟖𝟔𝟎𝟕𝟗
𝟎 𝟐 𝟐

➢ For the Simpson`s 1/3 rule, where


𝒃−𝒂
𝒂 = 𝒙𝟎 , 𝒃 = 𝒙𝟐 , 𝒙𝟏 =
𝟐
The step size is:
𝒃−𝒂 𝟏−𝟎
∆𝒙 = = = 𝟎. 𝟓
𝟐 𝟐

𝒙𝟐 𝟏
∆𝒙
∫ 𝒇(𝒙)𝒅𝒙 = ∫ 𝒇(𝒙)𝒅𝒙 ≈ (𝒇 + 𝟒𝒇𝟏 + 𝒇𝟐 )
𝒙𝟎 𝟎 𝟑 𝟎

The values of the corresponding function are:

𝒇𝟎 = 𝒇(𝟎) = 𝟏 + 𝒆−𝟎 𝒔𝒊𝒏(𝟒 × 𝟎) = 𝟏

𝒇𝟏 = 𝒇(𝟎. 𝟓) = 𝟏 + 𝒆−𝟎.𝟓 𝒔𝒊𝒏(𝟒 × 𝟎. 𝟓) = 𝟏. 𝟓𝟓𝟏𝟓𝟐

𝒇𝟐 = 𝒇(𝟏) = 𝟏 + 𝒆−𝟏 𝒔𝒊𝒏(𝟒 × 𝟏) = 𝟎. 𝟕𝟐𝟏𝟓𝟗


15

Thus,
𝒙𝟐 𝟏
∆𝒙
∫ 𝒇(𝒙)𝒅𝒙 = ∫ 𝒇(𝒙)𝒅𝒙 ≈ (𝒇 + 𝟒𝒇𝟏 + 𝒇𝟐 )
𝒙𝟎 𝟎 𝟑 𝟎

𝟎. 𝟓
= [𝟏 + 𝟒(𝟏. 𝟓𝟓𝟏𝟓𝟐) + 𝟎. 𝟕𝟐𝟏𝟓𝟗] = 𝟏. 𝟑𝟐𝟏𝟐𝟖
𝟑

➢ For the Simpson`s 3/8 rule, where

𝒂 = 𝒙𝟎 = 𝟎 , 𝒃 = 𝒙𝟑 = 𝟏
The step size is:
𝒃−𝒂 𝟏−𝟎 𝟏
∆𝒙 = = =
𝟑 𝟑 𝟑

𝒙𝟑 𝟏
𝟑∆𝒙
∫ 𝒇(𝒙)𝒅𝒙 = ∫ 𝒇(𝒙)𝒅𝒙 ≈ (𝒇𝟎 + 𝟑𝒇𝟏 + 𝟑𝒇𝟐 + 𝒇𝟑 )
𝒙𝟎 𝟎 𝟖

The values of the corresponding function are:

𝒇𝟎 = 𝒇(𝟎) = 𝟏 + 𝒆−𝟎 𝒔𝒊𝒏(𝟒 × 𝟎) = 𝟏

𝒇𝟏 = 𝒇(𝟏/𝟑) = 𝟏 + 𝒆−𝟏/𝟑 𝒔𝒊𝒏(𝟒 × 𝟏/𝟑) = 𝟏. 𝟔𝟗𝟔𝟒𝟐

𝒇𝟐 = 𝒇(𝟐/𝟑) = 𝟏 + 𝒆−𝟐/𝟑 𝒔𝒊𝒏(𝟒 × 𝟐/𝟑) = 𝟏. 𝟐𝟑𝟒𝟒𝟕

𝒇𝟑 = 𝒇(𝟏) = 𝟏 + 𝒆−𝟏 𝒔𝒊𝒏(𝟒 × 𝟏) = 𝟎. 𝟕𝟐𝟏𝟓𝟗


16

Thus,
𝒙𝟑 𝟏
𝟑∆𝒙
∫ 𝒇(𝒙)𝒅𝒙 = ∫ 𝒇(𝒙)𝒅𝒙 ≈ (𝒇𝟎 + 𝟑𝒇𝟏 + 𝟑𝒇𝟐 + 𝒇𝟑 )
𝒙𝟎 𝟎 𝟖
𝟑(𝟏/𝟑)
= (𝟏 + 𝟑(𝟏. 𝟔𝟗𝟔𝟒𝟐) + 𝟑(𝟏. 𝟐𝟑𝟒𝟒𝟕) + 𝟎. 𝟕𝟐𝟏𝟓𝟗)
𝟖
= 𝟏. 𝟑𝟏𝟒𝟒

➢ For the Boole`s rule


Since Boole`s rule is applicable only when the number of subintervals
is a multiple of 𝟒 (𝒏 = 𝟒, 𝟖, 𝟏𝟐, ⋯). Therefore dividing the range [𝟎, 𝟏]
into four equal parts by taking ∆𝒙 = 𝟏/𝟒

𝒙𝟒 𝟏
𝟐∆𝒙
∫ 𝒇(𝒙)𝒅𝒙 = ∫ 𝒇(𝒙)𝒅𝒙 ≈ (𝟕𝒇𝟎 + 𝟑𝟐𝒇𝟏 + 𝟏𝟐𝒇𝟐 + 𝟑𝟐𝒇𝟑 + 𝟕𝒇𝟒 )
𝒙𝟎 𝟎 𝟒𝟓

The corresponding function values are:

𝒇𝟎 = 𝒇(𝟎) = 𝟏 + 𝒆−𝟎 𝒔𝒊𝒏(𝟒 × 𝟎) = 𝟏

𝒇𝟏 = 𝒇(𝟏/𝟒) = 𝟏 + 𝒆−𝟏/𝟒 𝒔𝒊𝒏(𝟒 × 𝟏/𝟒) = 𝟏. 𝟔𝟓𝟓𝟑𝟒

𝒇𝟐 = 𝒇(𝟏/𝟐) = 𝟏 + 𝒆−𝟏/𝟐 𝒔𝒊𝒏(𝟒 × 𝟏/𝟐) = 𝟏. 𝟓𝟓𝟏𝟓𝟐

𝒇𝟑 = 𝒇(𝟑/𝟒) = 𝟏 + 𝒆−𝟑/𝟒 𝒔𝒊𝒏(𝟒 × 𝟑/𝟒) = 𝟏. 𝟎𝟔𝟔𝟔𝟔

𝒇𝟒 = 𝒇(𝟏) = 𝟏 + 𝒆−𝟏 𝒔𝒊𝒏(𝟒 × 𝟏) = 𝟎. 𝟕𝟐𝟏𝟓𝟗

𝟏
𝟐 (𝟏 ⁄ 𝟒 )
⟹ ∫ 𝒇(𝒙)𝒅𝒙 ≈ [𝟕(𝟏) + 𝟑𝟐(𝟏. 𝟔𝟓𝟓𝟑𝟒) + 𝟏𝟐(𝟏. 𝟓𝟓𝟏𝟓𝟐)
𝟎 𝟒𝟓
+𝟑𝟐(𝟏. 𝟎𝟔𝟔𝟔𝟔) + 𝟕(𝟎. 𝟕𝟐𝟏𝟓𝟗)] = 𝟏. 𝟑𝟎𝟖𝟓𝟗

The true value of the definite integral is:

𝟏
𝟐𝟏 𝒆 − 𝟒 𝒄𝒐𝒔(𝟒) − 𝒔𝒊𝒏(𝟒)
∫ 𝒇(𝒙)𝒅𝒙 = = 𝟏. 𝟑𝟎𝟖𝟐𝟓𝟏
𝟎 𝟏𝟕 𝒆

The approximation from Boole’s rule is the best,


17

➔ Composite Integration
To make a fair comparison of quadrature methods, the same
number of function evaluations in each method must be used. The
final example is concerned with comparing integration over a fixed
interval [𝒂, 𝒃] using exactly five function evaluation 𝒇𝒌 = 𝒇(𝒙𝒌 ), for
𝒌 = 𝟎, 𝟏, 𝟐, 𝟑, 𝟒 for each method.

 Composite Trapezoidal Rule


The trapezoidal rule when is applied on the many subintervals
[𝒙𝟎 , 𝒙𝟏 ] , [𝒙𝟏 , 𝒙𝟐 ] , [𝒙𝟐 , 𝒙𝟑 ] , ⋯ , [𝒙𝒎−𝟐 , 𝒙𝒎−𝟏 ] , [𝒙𝒎−𝟏 , 𝒙𝒎 ]

it is called a composite trapezoidal rule.

The composite trapezoidal rule for 𝒏 subintervals can be expressed as:

𝒃
∆𝒙
∫ 𝒇(𝒙)𝒅𝒙 ≈ [𝒇(𝒙𝟎 ) + 𝟐{𝒇(𝒙𝟏 ) + 𝒇(𝒙𝒊 ) + ⋯ + 𝒇(𝒙𝒎−𝟏 )} + 𝒇(𝒙𝒎 )]
𝒂 𝟐
Proof:
Suppose that the interval [𝒂, 𝒃] is subdivided into
subinterval [𝒙𝒌 , 𝒙𝒌+𝟏 ] of width
𝒃−𝒂
∆𝒙 = 𝒉 = where 𝒏 = 𝐧𝐮𝐦𝐛𝐞𝐫 𝐨𝐟 𝐬𝐮𝐛𝐢𝐧𝐭𝐞𝐫𝐯𝐚𝐥𝐬
𝒏
by using equally spaced nodes

𝒙𝒌 = 𝒂 + 𝒌∆𝒙 for 𝒌 = 𝟎, 𝟏, 𝟐, 𝟑, ⋯ , 𝒎
18

Applying the trapezoidal rule over each subinterval and use the
additive property of the integral for subintervals:
𝒃 𝒙𝟏 𝒙𝟐 𝒙𝒎
∫ 𝒇(𝒙)𝒅𝒙 = ∫ 𝒇(𝒙) 𝒅𝒙 + ∫ 𝒇(𝒙)𝒅𝒙 + ⋯ + ∫ 𝒇(𝒙)𝒅𝒙
𝒂 𝒙𝟎 𝒙𝟏 𝒙𝒎−𝟏

∆𝒙 ∆𝒙
≈ [𝒇(𝒙𝟎 ) + 𝒇(𝒙𝟏 )] + [𝒇(𝒙𝟏 ) + 𝒇(𝒙𝟐 )] + ⋯
𝟐 𝟐
∆𝒙
+ [𝒇(𝒙𝒎−𝟏 ) + 𝒇(𝒙𝒎 )]
𝟐
∆𝒙
≈ [𝒇(𝒙𝟎 ) + 𝟐𝒇(𝒙𝟏 ) + 𝟐𝒇(𝒙𝒊 ) + ⋯ + 𝟐𝒇(𝒙𝒎−𝟏 ) + 𝒇(𝒙𝒎 )]
𝟐
∆𝒙
≈ [𝒇(𝒙𝟎 ) + 𝟐{𝒇(𝒙𝟏 ) + 𝒇(𝒙𝒊 ) + ⋯ + 𝒇(𝒙𝒎−𝟏 )} + 𝒇(𝒙𝒎 )]
𝟐

Example 7: Use the composite trapezoid rule to evaluate the integral


𝟒

∫ 𝒙 𝒆𝟐𝒙 𝒅𝒙
𝟎
Solution:
➢ 𝒏=𝟏
𝒃−𝒂 𝟒−𝟎
∆𝒙 = = =𝟒
𝒏 𝟏
∆𝒙
⟹ 𝑰≈ [𝒇(𝟎) + 𝒇(𝟒)] = 𝟐𝟑𝟖𝟒𝟕. 𝟔𝟔
𝟐
𝜺 = −𝟑𝟓𝟕. 𝟏𝟐%
➢ 𝒏=𝟐
𝒃−𝒂 𝟒−𝟎
∆𝒙 = = =𝟐
𝒏 𝟐
∆𝒙
⟹𝑰≈ [𝒇(𝟎) + 𝟐𝒇(𝟐) + 𝒇(𝟒)] = 𝟏𝟐𝟏𝟒𝟐. 𝟐𝟑
𝟐
𝜺 = −𝟏𝟑𝟐. 𝟕𝟓%
➢ 𝒏=𝟒
𝒃−𝒂 𝟒−𝟎
∆𝒙 = = =𝟏
𝒏 𝟒
∆𝒙
⟹𝑰≈ [𝒇(𝟎) + 𝟐𝒇(𝟏) + 𝟐𝒇(𝟐) + 𝟐𝒇(𝟑) + 𝒇(𝟒)] = 𝟕𝟐𝟖𝟖. 𝟕𝟗
𝟐
𝜺 = −𝟑𝟗. 𝟏𝟕%
19

➢ 𝒏=𝟖
𝒃−𝒂 𝟒−𝟎
∆𝒙 = = = 𝟎. 𝟓
𝒏 𝟖

∆𝒙
⟹𝑰≈ [𝒇(𝟎) + 𝟐𝒇(𝟎. 𝟓) + 𝟐𝒇(𝟏) + 𝟐𝒇(𝟏. 𝟓) + 𝟐𝒇(𝟐) + 𝟐𝒇(𝟐. 𝟓)
𝟐
+ 𝟐𝒇(𝟑) + 𝟐𝒇(𝟑. 𝟓) + 𝒇(𝟒)] = 𝟓𝟕𝟔𝟒. 𝟕𝟔

𝜺 = −𝟏𝟎. 𝟓𝟎%

➢ 𝒏 = 𝟏𝟔
𝒃−𝒂 𝟒−𝟎
∆𝒙 = = = 𝟎. 𝟐𝟓
𝒏 𝟏𝟔
∆𝒙
⟹𝑰≈ [𝒇(𝟎) + 𝟐𝒇(𝟎. 𝟐𝟓) + 𝟐𝒇(𝟎. 𝟓) + ⋯ + 𝟐𝒇(𝟑. 𝟓) + 𝒇(𝟒)]
𝟐
= 𝟓𝟑𝟓𝟓. 𝟗𝟓
𝜺 = −𝟐. 𝟔𝟔%
Example 8: Use the composite trapezoidal rule with 11 sample points
to compute an approximation to the integral of the function
𝒇(𝒙) = 𝟐 + 𝒔𝒊𝒏(𝟐√𝒙)
taken over [1,6].
Solution:
To generate 11 sample points, we use 𝒏 = 𝟏𝟎 and
𝒃−𝒂 𝟔−𝟏
∆𝒙 = 𝒉 = = = 𝟎. 𝟓
𝒏 𝟏𝟎
𝒙 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6
𝒇(𝒙) 2.91 2.64 2.31 1.98 1.68 1.44 1.24 1,11 1.03 1.00 1.02
𝟔
∆𝒙
∫ 𝒇(𝒙)𝒅𝒙 ≈ [𝒇(𝒙𝟎 ) + 𝟐{𝒇(𝒙𝟏 ) + 𝒇(𝒙𝟐 ) + ⋯ + 𝒇(𝒙𝟓 )} + 𝒇(𝒙𝟔 )]
𝟏 𝟐
∆𝒙
≈ [𝒇(𝟏) + 𝟐{𝒇(𝟏. 𝟓) + 𝒇(𝟐) + 𝒇(𝟐. 𝟓) + 𝒇(𝟑)
𝟐
+ 𝒇(𝟑. 𝟓) + 𝒇(𝟒) + 𝒇(𝟒. 𝟓) + 𝒇(𝟓) + 𝒇(𝟓. 𝟓}
+ 𝒇(𝒙𝟔 )] = 𝟖. 𝟏𝟗𝟑𝟖𝟔
20

❖ Composite Trapezoid Rule with Unequal Segments

Example 9: Use the composite trapezoid rule to evaluate the integral


𝟒

∫ 𝒙 𝒆𝟐𝒙 𝒅𝒙
𝟎
with (∆𝒙)𝟏 = 𝟐 , (∆𝒙)𝟐 = 𝟏 , (∆𝒙)𝟑 = 𝟎. 𝟓 , (∆𝒙)𝟒 = 𝟎. 𝟓
Solution:

𝟐 𝟑 𝟑.𝟓 𝟒
𝑰 = ∫ 𝒇(𝒙)𝒅𝒙 + ∫ 𝒇(𝒙) 𝒅𝒙 + ∫ 𝒇(𝒙)𝒅𝒙 + ∫ 𝒇(𝒙)𝒅𝒙
𝟎 𝟐 𝟑 𝟑.𝟓

(∆𝒙)𝟏 (∆𝒙)𝟐
≈ [𝒇(𝟎) + 𝒇(𝟐)] + [𝒇(𝟐) + 𝒇(𝟑)]
𝟐 𝟐
(∆𝒙)𝟑 (∆𝒙)𝟒
+ [𝒇(𝟑) + 𝒇(𝟑. 𝟓)] + [𝒇(𝟑. 𝟓) + 𝒇(𝟒)]
𝟐 𝟐
𝟐 𝟏 𝟎. 𝟓
≈ [𝟎 + 𝟐 𝒆𝟒 ] + [𝟐 𝒆𝟒 + 𝟑 𝒆𝟔 ] + [𝟑 𝒆𝟔 + 𝟑. 𝟓 𝒆𝟕 ]
𝟐 𝟐 𝟐
𝟎. 𝟓
+ [𝟑. 𝟓 𝒆𝟕 + 𝟒 𝒆𝟖 ] = 𝟓𝟗𝟕𝟏. 𝟓𝟖
𝟐

𝟓𝟐𝟏𝟔. 𝟗𝟑 − 𝟓𝟗𝟕𝟏. 𝟓𝟖
𝜺= = −𝟏𝟒. 𝟒𝟕%
𝟓𝟐𝟏𝟔. 𝟗𝟑

 Composite Simpson’s Rule

Simpson's rule can also be used in same manner as for


trapezoidal rule when is applied on the many subintervals it is called
a composite Simpson rule.
Suppose that [𝒂, 𝒃] is subdivided into 𝒏 subintervals [𝒙𝒌 , 𝒙𝒌+𝟏 ] of
equal width
𝒃−𝒂
∆𝒙 =
𝒏
by using
𝒙𝒌 = 𝒂 + 𝒊∆𝒙 for 𝒊 = 𝟎, 𝟏, 𝟐, 𝟑, ⋯ , 𝟐
21

The composite Simpson rule for 𝟐𝒎 subintervals can be expressed as:


𝒃
∆𝒙
∫ 𝒇(𝒙)𝒅𝒙 ≈ [𝒇(𝒙𝟎 ) + 𝟒𝒇(𝒙𝟏 ) + 𝟐𝒇(𝒙𝟐 ) + 𝟒𝒇(𝒙𝟑 ) + ⋯
𝒂 𝟑
+ 𝟐𝒇(𝒙𝒏−𝟐 ) + 𝟒𝒇(𝒙𝒏−𝟏 ) + 𝒇(𝒙𝒏 )]
𝒏−𝟏 𝒏−𝟐
∆𝒙
≈ [𝒇(𝒂) + 𝟒 ∑ 𝒇( 𝒙𝒊 ) + 𝟐 ∑ 𝒇( 𝒙𝒊 ) + 𝒇(𝒃)]
𝟑
𝒊=𝟏 𝒊=𝟐
𝒊=𝒐𝒅𝒅 𝒊=𝒆𝒗𝒆𝒏

When Simpson's rule is applied on the two subintervals [𝒙𝟎 , 𝒙𝟐 ] and


[𝒙𝟐 , 𝒙𝟒 ], can be expressed by
𝒙𝟒 𝒙𝟐 𝒙𝟒
∫ 𝒇(𝒙)𝒅𝒙 = ∫ 𝒇(𝒙)𝒅𝒙 + ∫ 𝒇(𝒙)𝒅𝒙
𝒙𝟎 𝒙𝟎 𝒙𝟐
∆𝒙 ∆𝒙
≈ (𝒇𝟎 + 𝟒𝒇𝟏 + 𝒇𝟐 ) + (𝒇 + 𝟒𝒇𝟑 + 𝒇𝟒 )
𝟑 𝟑 𝟐
∆𝒙
≈ (𝒇 + 𝟒𝒇𝟏 + 𝟐𝒇𝟐 + 𝟒𝒇𝟑 + 𝒇𝟒 )
𝟑 𝟎
Example 10: Use the composite Simpson`s rule with 11 sample points
to compute an approximation to the integral of the
function
𝒇(𝒙) = 𝟐 + 𝒔𝒊𝒏(𝟐√𝒙)
over the interval [1,6].
Solution:
To generate 11 sample points, use 𝒏 = 𝟏𝟎 and
𝒃−𝒂 𝟔−𝟏
∆𝒙 = = = 𝟎. 𝟓
𝒏 𝟏𝟎
𝒙 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6
𝒇(𝒙) 2.91 2.64 2.31 1.98 1.68 1.44 1.24 1,11 1.03 1.00 1.02
𝒃
∆𝒙
∫ 𝒇(𝒙)𝒅𝒙 ≈ [𝒇(𝟏) + 𝟒𝒇(𝟏. 𝟓) + 𝟐𝒇(𝟐) + 𝟒𝒇(𝟐. 𝟓) + 𝟐𝒇(𝟑)
𝒂 𝟑
+ 𝟒𝒇(𝟑. 𝟓) + 𝟐𝒇(𝟒) + 𝟒𝒇(𝟒. 𝟓) + 𝟐𝒇(𝟓) + 𝟒𝒇(𝟓. 𝟓)
+ 𝒇(𝟔)]
22

𝒏−𝟏 𝒏−𝟐
𝒃
∆𝒙
or ∫ 𝒇(𝒙)𝒅𝒙 ≈ [𝒇(𝒂) + 𝟒 ∑ 𝒇( 𝒙𝒊 ) + 𝟐 ∑ 𝒇( 𝒙𝒊 ) + 𝒇(𝒃)]
𝒂 𝟑
𝒊=𝟏 𝒊=𝟐
Thus,
𝟔
𝟎. 𝟓
∫ 𝒇(𝒙)𝒅𝒙 ≈ [𝒇(𝟏)
𝟏 𝟑
+ 𝟒{𝒇(𝟏. 𝟓) + 𝒇(𝟐. 𝟓) + 𝒇(𝟑. 𝟓) + 𝒇(𝟒. 𝟓) + 𝒇(𝟓. 𝟓)}
+ 𝟐{𝒇(𝟐) + 𝒇(𝟑) + 𝒇(𝟒) + 𝒇(𝟓)} + 𝒇(𝟔)] = 𝟖. 𝟏𝟖𝟑𝟎𝟐
➢ Piecewise Quadratic approximations
𝒃−𝒂
∆𝒙 = , 𝒏 = 𝐧𝐮𝐦𝐛𝐞𝐫 𝐨𝐟 𝐬𝐮𝐛𝐢𝐧𝐭𝐞𝐫𝐯𝐚𝐥𝐬
𝒏

➢ Multiple applications of Simpson’s rule


𝒃 𝒙𝟐 𝒙𝟒 𝒙𝒏
∫ 𝒇(𝒙)𝒅𝒙 = ∫ 𝒇(𝒙) 𝒅𝒙 + ∫ 𝒇(𝒙)𝒅𝒙 + ⋯ + ∫ 𝒇(𝒙)𝒅𝒙
𝒂 𝒙𝟎 𝒙𝟐 𝒙𝒏−𝟐

∆𝒙
≈ [𝒇(𝒙𝟎 ) + 𝟒𝒇(𝒙𝟏 ) + 𝒇(𝒙𝟐 )]
𝟑
∆𝒙
+ [𝒇(𝒙𝟐 ) + 𝟒𝒇(𝒙𝟑 ) + 𝒇(𝒙𝟒 )] + ⋯
𝟑
∆𝒙
+ [𝒇(𝒙𝒏−𝟐 ) + 𝟒𝒇(𝒙𝒏−𝟏 ) + 𝒇(𝒙𝒏 )]
𝟑
∆𝒙
≈ [𝒇(𝒙𝟎 ) + 𝟒𝒇(𝒙𝟏 ) + 𝟐𝒇(𝒙𝟐 ) + 𝟒𝒇(𝒙𝟑 ) + 𝟐𝒇(𝒙𝟒 )
𝟑
+ ⋯ + 𝟒𝒇(𝒙𝟐𝒊−𝟏 ) + 𝟐𝒇(𝒙𝟐𝒊 ) + 𝟒𝒇(𝒙𝟐𝒊+𝟏 )
+ ⋯ +𝟐𝒇(𝒙𝒏−𝟐 ) + 𝟒𝒇(𝒙𝒏−𝟏 ) + 𝒇(𝒙𝒏 )]
23

Example 11: Use composite Simpson`s rule to evaluate the integral


𝟒

∫ 𝒙 𝒆𝟐𝒙 𝒅𝒙
𝟎

with 𝒏 = 𝟐 , ∆𝒙 = 𝟐 and 𝒏 = 𝟒 , ∆𝒙 = 𝟏
Solution:
• 𝒏 = 𝟐 , ∆𝒙 = 𝟐
∆𝒙 𝟐
𝑰≈ [𝒇(𝟎) + 𝟒𝒇(𝟐) + 𝒇(𝟒)] = [𝟎 + 𝟒(𝟐 𝒆𝟒 ) + 𝟒𝒆𝟖 )]
𝟑 𝟑
= 𝟖𝟐𝟒𝟎. 𝟒𝟏
𝟓𝟐𝟏𝟔. 𝟗𝟑 − 𝟖𝟐𝟒𝟎. 𝟒𝟏
𝜺= = −𝟓𝟕. 𝟗𝟔%
𝟓𝟐𝟏𝟔. 𝟗𝟑
• 𝒏 = 𝟒 , ∆𝒙 = 𝟏
∆𝒙
𝑰≈ [𝒇(𝟎) + 𝟒𝒇(𝟏) + 𝟐𝒇(𝟐) + 𝟒𝒇(𝟑) + 𝒇(𝟒)]
𝟑
𝟐
= [𝟎 + 𝟒( 𝒆𝟐 ) + 𝟐 (𝟐 𝒆𝟒 ) + 𝟒 (𝟑 𝒆𝟔 ) + 𝟒 𝒆𝟖 )]
𝟑
= 𝟓𝟔𝟕𝟎. 𝟗𝟖

𝟓𝟐𝟏𝟔. 𝟗𝟑 − 𝟓𝟔𝟕𝟎. 𝟗𝟖
𝜺= = −𝟖. 𝟕𝟎%
𝟓𝟐𝟏𝟔. 𝟗𝟑

❖ Composite Simpson’s Rule with Unequal Segments


Example 12: Use the composite trapezoid rule to evaluate the integral
𝟒

∫ 𝒙 𝒆𝟐𝒙 𝒅𝒙
𝟎
with (∆𝒙)𝟏 = 𝟏. 𝟓 , (∆𝒙)𝟐 = 𝟎. 𝟓
Solution:
𝟑 𝟒
𝑰 = ∫ 𝒇(𝒙)𝒅𝒙 + ∫ 𝒇(𝒙) 𝒅𝒙
𝒂 𝟑
(∆𝒙)𝟏 (∆𝒙)𝟐
≈ [𝒇(𝟎) + 𝟒 𝒇(𝟏. 𝟓) + 𝟐 𝒇(𝟑)] + [𝒇(𝟑) + 𝟒𝒇(𝟑. 𝟓) + 𝟐 𝒇(𝟒)]
𝟑 𝟑
𝟏. 𝟓 𝟎. 𝟓
= [𝟎 + 𝟒 𝒇(𝟏. 𝟓 𝒆𝟑 ) + 𝟑 𝒆𝟔 ] + [𝟑 𝒆𝟔 + 𝟒 (𝟑. 𝟓 𝒆𝟕 ) + 𝟒 𝒆𝟖 ]
𝟑 𝟑
24

= 𝟓𝟒𝟏𝟑. 𝟐𝟑
𝟓𝟐𝟏𝟔. 𝟗𝟑 − 𝟓𝟒𝟏𝟑. 𝟐𝟑
𝜺= = −𝟑. 𝟕𝟔%
𝟓𝟐𝟏𝟔. 𝟗𝟑

Example 13: Evaluate the integration of the function


𝒇(𝒙) = 𝟏 + 𝒆−𝒙 𝒔𝒊𝒏(𝟒𝒙)
over the interval [𝒂, 𝒃] = [𝟎, 𝟏].Use exactly five function
evaluations and compare the results from the composite
trapezoidal rule and composite Simpson's rule.
Solution:
Since it is required five function evaluations, the uniform step
size has to be:
∆𝒙 = 𝟏/𝟒.
The composite trapezoidal rule produces:
𝟏 𝟏/𝟒
∫ 𝒇(𝒙)𝒅𝒙 = ∫ 𝒇(𝒙)𝒅𝒙
𝟎 𝟎
𝟏/𝟐 𝟑/𝟒 𝟏
+∫ 𝒇(𝒙)𝒅𝒙 + ∫ 𝒇(𝒙)𝒅𝒙 + ∫ 𝒇(𝒙)𝒅𝒙
𝟏/𝟒 𝟏/𝟐 𝟑/𝟒
∆𝒙
≈ (𝒇 + 𝟐𝒇𝟏 + 𝟐𝒇𝟐 + 𝟐𝒇𝟑 + 𝒇𝟒 )
𝟐 𝟎

𝟏/𝟒 𝟏 𝟏 𝟑
= [𝒇𝟎 + 𝟐𝒇 ( ) + 𝟐𝒇 ( ) + 𝟐𝒇 ( ) + 𝒇(𝟏)]
𝟐 𝟒 𝟐 𝟒
The corresponding function values are:
𝒇𝟎 = 𝒇(𝟎) = 𝟏 + 𝒆−𝟎 𝒔𝒊𝒏(𝟒 × 𝟎) = 𝟏
𝒇𝟏 = 𝒇(𝟏/𝟒) = 𝟏 + 𝒆−𝟏/𝟒 𝒔𝒊𝒏(𝟒 × 𝟏/𝟒) = 𝟏. 𝟔𝟓𝟓𝟑𝟒
𝒇𝟐 = 𝒇(𝟏/𝟐) = 𝟏 + 𝒆−𝟏/𝟐 𝒔𝒊𝒏(𝟒 × 𝟏/𝟐) = 𝟏. 𝟓𝟓𝟏𝟓𝟐
𝒇𝟑 = 𝒇(𝟑/𝟒) = 𝟏 + 𝒆−𝟑/𝟒 𝒔𝒊𝒏(𝟒 × 𝟑/𝟒) = 𝟏. 𝟎𝟔𝟔𝟔𝟔
𝒇𝟒 = 𝒇(𝟏) = 𝟏 + 𝒆−𝟏 𝒔𝒊𝒏(𝟒 × 𝟏) = 𝟎. 𝟕𝟐𝟏𝟓𝟗

𝟏
𝟏
∫ 𝒇(𝒙)𝒅𝒙 = [𝟏 + 𝟐(𝟏. 𝟔𝟓𝟓𝟑𝟒) + 𝟐(𝟏. 𝟓𝟓𝟏𝟓𝟐) + 𝟐(𝟏. 𝟎𝟔𝟔𝟔𝟔)
𝟎 𝟖
+ 𝟎. 𝟕𝟐𝟏𝟓𝟗] = 𝟏. 𝟐𝟖𝟑𝟓𝟖
25

➢ Using the composite Simpson's rule yields:


𝟏
∆𝒙
∫ 𝒇(𝒙)𝒅𝒙 ≈ (𝒇 + 𝟒𝒇𝟏 + 𝟐𝒇𝟐 + 𝟒𝒇𝟑 + 𝒇𝟒 )
𝟎 𝟑 𝟎
𝟏/𝟒 𝟏 𝟏 𝟑
= [𝒇𝟎 + 𝟒𝒇 ( ) + 𝟐𝒇 ( ) + 𝟒𝒇 ( ) + 𝒇(𝟏)]
𝟑 𝟒 𝟐 𝟒
𝟏
= [𝟏 + 𝟒(𝟏. 𝟔𝟓𝟓𝟑𝟒) + 𝟐(𝟏. 𝟓𝟓𝟏𝟓𝟐) + 𝟒(𝟏. 𝟎𝟔𝟔𝟔𝟔)
𝟏𝟐
+ 𝟎. 𝟕𝟐𝟏𝟓𝟗] = 𝟏. 𝟑𝟎𝟗𝟑𝟖

❖ Combined Simpson’s–1/3 & Simpson’s–3/8

Example 14: Integrate the data listed in the table by using Simpson`s
1/3 rule and Simpson`s 3/8 rules.
𝒊 0 1 2 3 4 5 6 7
𝒙 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7
𝒇(𝒙) 1.543 1.669 1.811 1.971 2.151 2.352 2.577 2.828
Solution:
8 abscissas (values of x) ⇒ n = 7 subintervals. So
o Simpson’s–1/3 rule cannot be used alone (n is not divisible by 2) or
o Simpson’s–3/8 rule cannot be used alone (n is not divisible by 3).
However, in this problem can combine the methods by appropriately
dividing the interval:
1. Using Simpson’s–1/3 rule on interval [1.0, 1.4] (4 subintervals is
divisible by 2), and
2. Using Simpson’s–3/8 rule on interval [1.4, 1.7] (3 subintervals is
divisible by 3).
This way consistent accuracy can be obtained on the entire interval
[1.0, 1.7].
➢ Using Simpson’s–1/3 rule on interval [𝟏. 𝟎, 𝟏. 𝟒],
(𝟏. 𝟎 → 𝟏. 𝟐 and 𝟏. 𝟐 → 𝟏. 𝟒) we have 4 subintervals i. e. 𝒏 = 𝟒
𝒃 − 𝒂 𝟏. 𝟒 − 𝟏. 𝟎 𝟎. 𝟒
⟹ ∆𝒙 = = = = 𝟎. 𝟏
𝒏 𝟒 𝟒
26

𝟏.𝟒
∆𝒙
∫ 𝒇(𝒙)𝒅𝒙 ≈ [𝒇(𝟎) + 𝟒𝒇(𝟏) + 𝟐𝒇(𝟐) + 𝟒𝒇(𝟑) + 𝒇(𝟒)]
𝟏.𝟎 𝟑
𝟎. 𝟏
= [(𝟏. 𝟓𝟒𝟑) + 𝟒(𝟏. 𝟔𝟔𝟗) + 𝟐(𝟏. 𝟖𝟏𝟏) + 𝟒(𝟏. 𝟗𝟕𝟏) + 𝟐. 𝟏𝟓𝟏]
𝟑
= 𝟎. 𝟕𝟐𝟗𝟐
➢ Using Simpson’s–3/8 rule on interval [𝟏. 𝟒, 𝟏. 𝟕], ∆𝒙 = 𝟎. 𝟏
𝒃 − 𝒂 𝟏. 𝟕 − 𝟏. 𝟒 𝟎. 𝟑
⟹ ∆𝒙 = = = = 𝟎. 𝟏
𝒏 𝟑 𝟑
𝟏.𝟕
𝟑∆𝒙
∫ 𝒇(𝒙)𝒅𝒙 ≈ [𝒇(𝟒) + 𝟑𝒇(𝟓) + 𝟑𝒇(𝟔) + 𝒇(𝟕)]
𝟏.𝟒 𝟖
𝟑(𝟎. 𝟏)
= [(𝟐. 𝟏𝟓𝟏) + 𝟑(𝟐. 𝟑𝟓𝟐) + 𝟑(𝟐. 𝟓𝟕𝟕) + 𝟐. 𝟖𝟐𝟖]
𝟖
= 𝟎. 𝟕𝟒𝟏𝟐𝟑
Now add the results
𝟏.𝟕 𝟏.𝟒 𝟏.𝟕
∫ 𝒇(𝒙)𝒅𝒙 = ∫ 𝒇(𝒙)𝒅𝒙 + ∫ 𝒇(𝒙)𝒅𝒙
𝟏.𝟎 𝟏.𝟎 𝟏.𝟒

= 𝟎. 𝟕𝟐𝟗𝟐 + 𝟎. 𝟕𝟒𝟏𝟐𝟑 = 𝟏. 𝟒𝟕𝟎𝟒𝟑

NOTE: Alternatively, Simpson’s–3/8 rule could be used on interval


[1.0, 1.3] and Simpson’s–1/3 rule on interval [1.3, 1.7] to
obtain a different approximation: 1.47044.
BE CAREFUL:
• Could use
o Simpson’s–1/3 rule on interval [1.0, 1.6] (6 subintervals
is divisible by 2) and
o the Trapezoidal rule on interval [1.6, 1.7], but why
wouldn’t we?
• Could also
o use Simpson’s–3/8 rule on interval [1.0, 1.6] (6
subintervals is divisible by 3) and
o the Trapezoidal rule on interval [1.6, 1.7], but why
wouldn’t?
27

 If Even number of Intervals are there, it is preferred to use


𝟏
Simpson’s 𝟑 𝒓𝒅 Rule (or) Trapezoidal Rule.
𝟑
 If Number of Intervals is multiple of 3, then use Simpson’s 𝟖 𝒕𝒉
Rule (or) Trapezoidal Rule.
 If Odd number of Intervals are there, and which is not multiple of
3, then use Trapezoidal Rule.
 For any number of Intervals, the default Rule we can use is
Trapezoidal

You might also like