Professional Documents
Culture Documents
GAUSSIAN
INTEGRATION
Adinda Salshabilla Yudha (19030174012)
Kurrotul Hasanah (19030174056)
TABLE OF CONTENTS
ORTHOGONAL
1 OVERVIEW 2 POLYNOMIALS
ABSCISSAS AND
WEIGHTS FOR DETERMINATION
OF NODAL
4 CLASSICAL 3 ABSCISSAS AND
GAUSSIAN
QUADRATURES WEIGHTS
OVERVIEW
GAUSSIAN INTEGRATION
𝑏
Form: 𝑎 𝑤(𝑥)𝑓 𝑥 𝑑𝑥 , where w(x) is called the weighting function and
integrable.
The difference lies in the way that the weight 𝑨𝒊 and nodal abscissas
𝒙𝒊 are determined.
In Gaussian Quadrature, the nodes and weights are chosen so 𝑛𝑖<0 𝐴𝑖 𝑓(𝑥𝑖 )
yield the exact integral if f(x) is a polynomial of degree 2n + 1 or less
𝑏 𝑛
𝑎
𝑤(𝑥)𝑓 𝑥 𝑑𝑥 = 𝑖<0 𝐴𝑖 𝑃𝑚 (𝑥𝑖 ) , m ≤ 2𝑛 + 1
𝑏
𝑤(𝑥)𝑓 𝑥 𝑑𝑥 = 𝑛
𝐴 𝑥 𝑖 𝑗, j = 0, 1, 2, … , 2n+1 for the unknowns 𝐴𝑖 and 𝑥𝑖
𝑎 𝑖<0 𝑖
ORTHOGONAL
POLYNOMIALS
The polynomials 𝜑𝑛 𝑥 , 𝑛 = 0, 1, 2, … 𝑛 𝑖𝑠 𝑑𝑒𝑔𝑟𝑒𝑒 𝑜𝑓 𝑡𝑒 𝑝𝑜𝑙𝑦𝑛𝑜𝑚𝑖𝑎𝑙
are said to form an orthogonal set in the interval (a,b) with respect to the
𝒃
weighting function w(x) if: 𝒂 𝒘(𝒙)𝝋𝒎 (𝒙)𝝋𝒏 (𝒙)𝒅𝒙 = 𝟎, m≠n
THE CLASSICAL ORTHOGONAL
POLYNOMIALS
Name Symbol a b w(x)
Legendre 𝑝𝑛 (𝑥) -1 1 1
1
Chebyshev 𝑇𝑛 (𝑥) -1 1
(1−𝑥 2 );2
Laguerre 𝐿𝑛 (𝑥) 0 ∞ 𝑒 ;𝑥
2
Hermite 𝐻𝑛 (𝑥) -∞ ∞ 𝑒𝑥
The classical orthogonal polynomials are
also obtainable from these formulas:
(;1)𝑛 𝑑 𝑛 2 )𝑛 ]
𝑝𝑛 𝑥 = 𝑛
2 𝑛! 𝑑𝑥 𝑛 [(1 − 𝑥
𝑛 ;𝑥 2 𝑑𝑛
𝐻𝑛 (𝑥) = (−1) 𝑒
𝑑𝑥 𝑛
DETERMINATION
OF NODAL
ABSCISSAS AND
WEIGHTS
Theorem: The nodal abscissas are the zeros of the polynomial 𝜑𝑛:1 𝑥
that belongs to the orthogonal set defined in
𝑏
𝑎
𝑤(𝑥)𝜑𝑚 (𝑥)𝜑𝑛 (𝑥)𝑑𝑥 = 0, m≠n
Where 𝑄𝑛 (𝑥), 𝑅𝑛 (𝑥), and 𝜑2𝑛:1 𝑥 are polynomials of the degree indicated by
the subscripts.
Therefore,
𝑏 𝑏 𝑏
𝑎
𝑤 𝑥 𝑃2𝑛:1 𝑥 𝑑𝑥 = 𝑎 𝑤 𝑥 𝑄𝑛 (𝑥)𝑑𝑥 + 𝑎
𝑤 𝑥 𝑅𝑛 (𝑥) 𝜑2𝑛:1 𝑥 𝑑𝑥
𝒃
But, according to 𝒂
𝒘(𝒙)𝝋𝒎:𝒏 𝒅𝒙 = 𝟎, m≥ 0 , so that:
𝑏 𝑏
𝑎
𝑤 𝑥 𝑃2𝑛:1 𝑥 𝑑𝑥 = 𝑎
𝑤 𝑥 𝑄𝑛 (𝑥)𝑑𝑥
Because a polynomial of degree n is uniquely defined by n + 1 points, it is
always possible to find 𝐴𝑖 such that:
𝑏 𝑛
𝑎
𝑤 𝑥 𝑄𝑛 (𝑥)𝑑𝑥 = 𝑖<0 𝐴𝑖 𝑄𝑛 (𝑥𝑖 )
𝑏
To arrive at 𝑎 𝑤 𝑥 𝑃2𝑛:1 𝑥 𝑑𝑥 = 𝑛𝑖<0 𝐴𝑖 𝑃2𝑛:1 (𝑥𝑖 )
we must choose for the nodal abscissas 𝑥𝑖 the roots of 𝜑𝑛:1 (x) = 0.
𝑏 𝑛
and 𝑎
𝑤 𝑥 𝑄𝑛 (𝑥)𝑑𝑥 = 𝑖<0 𝐴𝑖 𝑄𝑛 (𝑥𝑖 )
𝑏 𝑏 𝑛
lead to 𝑎
𝑤 𝑥 𝑃2𝑛:1 𝑥 𝑑𝑥 = 𝑎
𝑤 𝑥 𝑄𝑛 (𝑥)𝑑𝑥 = 𝑖<0 𝐴𝑖 𝑄𝑛 (𝑥𝑖 )
Thus, we have:
𝒃 𝒏
𝒂
𝒘 𝒙 𝑷𝟐𝒏:𝟏 𝒙 𝒅𝒙 = 𝒊<𝟎 𝑨𝒊 𝑸𝒏 (𝒙𝒊 )
Proven!
ABSCISSAS AND
WEIGHTS FOR
CLASSICAL
GAUSSIAN
QUADRATURES
GAUSS-LEGENDRE QUADRATURE
𝑏 𝑏;𝑎 𝑛
𝑎
𝑓 𝑥 𝑑𝑥 ≈ 𝑖<1 𝐴𝑖 𝑓(𝑥𝑖 )
2
𝑏;𝑎 𝑏:𝑎
With transformation: 𝑥 = 𝜉 +
2 2
Gauss-Legendre Quadrature 2-Point
Formula
𝑏;𝑎
𝐼= 𝑤1 𝑓 𝑥1 + 𝑤2 𝑓(𝑥2 )
2
𝑏
𝐼= 𝑎
𝑓 𝑥 𝑑𝑥
𝑏;𝑎 𝑏:𝑎 5 8 5
𝑥2 = 𝑧2 + , 𝑤1 = , 𝑤2 = , 𝑤3 =
2 2 9 9 9
; ;2 ; 2
Where, 2 − (−2) 3 3
𝐼= 1𝑒 2 + 1𝑒 2 = 𝟒. 𝟔𝟖𝟓𝟒
2
𝑏;𝑎 𝑏:𝑎 𝑏;𝑎 𝑏:𝑎
𝑥1 = 𝑧1 + , 𝑥2 = 𝑧2 +
2 2 2 2
;1 1
𝑤1 = 𝑤2 = 1, 𝑧1 = , 𝑧2 =
3 3
2. Use Gauss-Legendre three-point formula to evaluate
EXAMPLE
𝟒
𝑰= (𝒙𝟒 + 𝟏)𝒅𝒙
𝟐
Solution:
4−2 3 4+2
𝑥3 = + = 3.7746
2 5 2
4−2 5 8 5
𝐼= 9 𝑓 2.2254 + 9 𝑓 3 + 9 𝑓 3.7746 = 𝟐𝟎𝟎. 𝟒𝟎𝟏𝟒
2
3. Use Gauss-Legendre two-point formula to evaluate
EXAMPLE
𝟏
𝑰= 𝒆𝒙 𝒅𝒙
;𝟏
Solution:
𝑏;𝑎
𝐼= 𝑤1 𝑓 𝑥1 + 𝑤2 𝑓(𝑥2 )
2
1 − (−1) −1 1 − 1 −1
𝑥1 = + =
2 3 2 3
Where,
1 − (−1) 1 1−1 1
𝑏;𝑎 𝑏:𝑎 𝑏;𝑎 𝑏:𝑎 𝑥2 = + =
𝑥1 = 𝑧1 + , 𝑥2 = 𝑧2 + 2 3 2 3
2 2 2 2
;1 1 𝑏−𝑎
𝑤1 = 𝑤2 = 1, 𝑧1 =
3
, 𝑧2 =
3 𝐼= 𝑤1 𝑓 −1 + 𝑤2 𝑓 1
2 3 3
;1 1
1 − (−1) 3 3
𝐼= 1𝑒 2 + 1𝑒 2 = 𝟐. 𝟑𝟒𝟐𝟕
2
EXAMPLE
4. Use Gauss-Legendre three-point formula to evaluate
𝑰= 𝒆𝒙 𝒅𝒙
;𝟏
Solution:
𝑏−𝑎
𝐼= 𝑤1 𝑓 𝑥1 + 𝑤2 𝑓 𝑥2 + 𝑤3 𝑓 𝑥3
2
1 − (−1) 5 3 8 5 3
𝐼= 9𝑓 − 5 + 9𝑓 0 + 9 𝑓 5 = 𝟐. 𝟑𝟓𝟑𝟑
2
GAUSS-CHEBYSHEV QUADRATURE
1 𝜋 𝑛
;1
(1 − 𝑥 2 );1/2 𝑓 𝑥 𝑑𝑥 ≈ 𝑖<0 𝑓(𝑥𝑖 ) with
𝑛:1
(2𝑖:1)𝜋
𝑥𝑖 = cos
2𝑛:2
−1 < c < 1
𝟏 𝟑
Evaluate the integral ;𝟏
(𝟏 − 𝒙𝟐 ) 𝟐 𝐜𝐨𝐬 𝒙 𝒅𝒙 using Gauss
Chebyshev Integral!
Solution:
1
;1
𝐼= (1 − 𝑥 2 )2(1 − 𝑥 2 ) 2 cos 𝑥 𝑑𝑥
;1
1 1-Point Formula
(1 − 𝑥 2 )2
𝐼= cos 𝑥 𝑑𝑥
1 − 𝑥2 1
;1 𝑓(𝑥)
𝑑𝑥 = 𝜋𝑓(0)
Here, 𝑓 𝑥 = (1 − 𝑥 2 )2 𝑐𝑜𝑠𝑥 1 − 𝑥2
;1
1
1 − 𝑥2 2
⟹ cos 𝑥 𝑑𝑥 = 𝜋 1
1 − 𝑥2
;1
1
1 − 𝑥2 2
⟹ cos 𝑥 𝑑𝑥 = 𝟑. 𝟏𝟒𝟐𝟖𝟓
1 − 𝑥2
;1
2-Point Formula
1
𝑓(𝑥) 𝜋 −1 𝜋 1
𝑑𝑥 = 𝑓 + 𝑓
1 − 𝑥2 2 2 2 2
;1
1
1 − 𝑥2 2 𝜋 −1 1
cos 𝑥 𝑑𝑥 = 𝑓 +𝑓
1 − 𝑥2 2 2 2
;1
2
−1 −1 1
𝑓 = 1− 𝑐𝑜𝑠 = 0.25 0.76024 = 0.19006
2 2 2
2
1 1 1
𝑓 = 1− 𝑐𝑜𝑠 = 0.25 0.76024 = 0.19006
2 2 2
1
1 − 𝑥2 2
𝜋
⟹ cos 𝑥 𝑑𝑥 = 0.19006 + 0.19006
1 − 𝑥2 2
;1
= 𝟎. 𝟓𝟗𝟕𝟎𝟗
3-Point Formula
1
𝑓 𝑥 𝜋 − 3 3
𝑑𝑥 = 𝑓 +𝑓 0 +𝑓
1 − 𝑥2 3 2 2
;1
1
1 − 𝑥2 2 𝜋 − 3 3
cos 𝑥 𝑑𝑥 = 𝑓 +𝑓 0 +𝑓
1 − 𝑥2 3 2 2
;1
2
− 3 − 3 3
𝑓 = 1− 𝑐𝑜𝑠 = 0.0625 0.66786 = 0.04049
2 2 2
3
𝑓 = 0.04049 ; 𝑓 0 = 1
2
1
1 − 𝑥2 2 𝜋
∴ cos 𝑥 𝑑𝑥 = 0.04049 + 1 + 0.04049 = 𝟏. 𝟏𝟑𝟏𝟗𝟗
1 − 𝑥2 3
;1
GAUSS-LAGUERRE QUADRATURE
∞ ;𝑥 𝑛
0
𝑒 𝑓 𝑥 𝑑𝑥 ≈ 𝑖<0 𝐴𝑖 𝑓(𝑥𝑖 )
Solution :
𝟏
𝒇 𝒙 =
𝟏 + 𝒙𝟐
Two point formula is given by
∞
1
𝑒 ;𝑥 𝑓 𝑥 𝑑𝑥 = 2+1 𝑓 2+ 2 + 2 − 1 𝑓(2 + 2)
2 2
0
∞
1 1 1
𝑒 ;𝑥 𝑓 𝑥 𝑑𝑥 = 2+1 2 + 2−1 2
2 2 1+ 2+ 2 1+ 2+ 2
0
1 2+1 2−1 1
= + =
2 2 7+4 2 7+4 2 7+4 2
∞
𝑒 ;𝑥 𝑓 𝑥 𝑑𝑥 = 𝟎. 𝟎𝟕𝟎𝟗
0
The three point formula is given by
1 0.27852
= 0.71109 2
+
1 + 0.41577 1 + (2.29428)2
0.01039
+
1 + (6.28995)2
= 0.60628 + 0.04447 + 0.00026
= 𝟎. 𝟔𝟓𝟏𝟎𝟏
GAUSS-HERMITE QUADRATURE
∞ 𝑛
2
𝑒 ;𝑥 𝑓 𝑥 𝑑𝑥 ≈ 𝐴𝑖 𝑓(𝑥𝑖 )
;∞ 𝑖<0
Solution :
1
𝑓 𝑥 =
𝑥2 + 𝑥 + 1
1-point formula
∞
2
𝑒 ;𝑥 𝑓 𝑥 𝑑𝑥 = 𝜋 𝑓 0
;∞
∞ 2
𝑒 ;𝑥
𝑑𝑥 = 𝜋 (1)
𝑥2 + 𝑥 + 1
;∞
∞ 2
𝑒 ;𝑥
𝑑𝑥 = 𝟏. 𝟕𝟕𝟐𝟒𝟓
𝑥2 + 𝑥 + 1
;∞
https://youtu.be/KTCiGtQP6w8
2-point formula
∞
2 𝜋 −1 1
𝑒 ;𝑥 𝑓 𝑥 𝑑𝑥 = 𝑓 +𝑓
2 2 2
;∞
−1 1
𝑓 = 2 = 1.26120
2 −1 −1
+ +1
2 2
1 1
𝑓 = 2 = 0.45308
2 1 1
+ +1
2 2
∞ 2
𝑒 ;𝑥 𝜋
𝑑𝑥 = ( 1.26120 + 0.45308)
𝑥2 + 𝑥 + 1 2
;∞
∞ 2
𝑒 ;𝑥
𝑑𝑥 = 𝟏. 𝟓𝟏𝟗𝟐𝟒
𝑥2 + 𝑥 + 1
;∞
3-point formula
∞
2 𝜋 3 3
𝑒 ;𝑥 𝑓 𝑥 𝑑𝑥 = 𝑓 − + 4𝑓 0 + 𝑓
6 2 2
;∞
𝜋
= 0.78416 + 4 + 0.26848
6
= 0.2954 5.05264
∞ 2
𝑒 ;𝑥
∴ 𝑑𝑥 = 𝟏. 𝟒𝟗𝟐𝟒𝟗
𝑥2 + 𝑥 + 1
;∞
REFERENCES