You are on page 1of 33

2019U

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.

Gauss integration formulas have the same form as Newton-Cotes rules:


I = 𝑛𝑖<0 𝐴𝑖 𝑓(𝑥𝑖 )

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

One way of determining the weights and abscissas is to substitute


𝑃0 𝑥 = 1, 𝑃1 𝑥 = 𝑥, … 𝑃2𝑛:1 𝑥 = 𝑥 2𝑛:1 and there are 2n + 2 equations

𝑏
𝑤(𝑥)𝑓 𝑥 𝑑𝑥 = 𝑛
𝐴 𝑥 𝑖 𝑗, 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 − 𝑥

𝑇𝑛 (𝑥) = cos 𝑛𝑐𝑜𝑠 ;1 𝑥 , 𝑛 > 0


𝑒 𝑥 𝑑𝑛 𝑛 𝑒 ;𝑥 )
𝐿𝑛 (𝑥) = 𝑛! 𝑑𝑥 𝑛 (𝑥

𝑛 ;𝑥 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

Proof: Because the Gaussian integration with n + 1 nodes is exact for


𝑏
this polynomial, we have: 𝑎 𝑤 𝑥 𝑃2𝑛:1 𝑥 𝑑𝑥 = 𝑛𝑖<0 𝐴𝑖 𝑃2𝑛:1 (𝑥𝑖 )
A polynomial of degree 2n + 1 can always be written in the form
𝑃2𝑛:1 (𝑥) = 𝑄𝑛 (𝑥) + 𝑅𝑛 (𝑥) 𝜑2𝑛:1 𝑥

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.

According to 𝑃2𝑛:1 (𝑥) = 𝑄𝑛 (𝑥) + 𝑅𝑛 (𝑥) 𝜑2𝑛:1 𝑥 we then have:


𝑃2𝑛:1 (𝑥𝑖 ) = 𝑄𝑛 𝑥𝑖 , 𝑖 = 0,1,2, … 𝑛
𝑏 𝑏
Which together with 𝑎
𝑤 𝑥 𝑃2𝑛:1 𝑥 𝑑𝑥 = 𝑎
𝑤 𝑥 𝑄𝑛 (𝑥)𝑑𝑥

𝑏 𝑛
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
𝑏
𝐼= 𝑎
𝑓 𝑥 𝑑𝑥

Where, Gauss-Legendre Quadrature 3-Point


𝑥1 =
𝑏;𝑎
𝑧1 +
𝑏:𝑎 Formula
2 2
𝑏;𝑎 𝑏:𝑎 𝑏;𝑎
𝑥2 = 𝑧2 + 𝐼= 𝑤1 𝑓 𝑥1 + 𝑤2 𝑓 𝑥2 + 𝑤3 𝑓 𝑥3
2 2 2
;1 1
𝑤1 = 𝑤2 = 1, 𝑧1 = , 𝑧2 =
3 3 Where,
𝑏;𝑎 𝑏:𝑎 𝑏;𝑎 𝑏:𝑎
𝑥1 = 𝑧1 + , 𝑥3 = 𝑧3 +
2 2 2 2

𝑏;𝑎 𝑏:𝑎 5 8 5
𝑥2 = 𝑧2 + , 𝑤1 = , 𝑤2 = , 𝑤3 =
2 2 9 9 9

19. Gaussian Quadrature Formula - Derivation and 3 3


Examples – YouTube 𝑧1 = − , 𝑧2 = 0, 𝑧3 =
5 5
EXAMPLE
1. Use Gauss-Legendre two-point formula to
evaluate
𝟐 −𝒙
𝑰= ;𝟐
𝒆 𝟐 𝒅𝒙
2 − (−2) −1 2 − 2 −2
Solution: 𝑥1 = + =
2 3 2 3
−𝑥
Given data: 𝑎 = −2, 𝑏 = 2, 𝑎𝑛𝑑 𝑓 𝑥 = 𝑒 2
2 − (−2) 1 2−2 2
Gauss Quadrature 2-Point Formula: 𝑥2 = + =
2 3 2 3
𝑏;𝑎
𝐼= 𝑤1 𝑓 𝑥1 + 𝑤2 𝑓(𝑥2 ) 𝑏−𝑎
2 𝐼= 𝑤1 𝑓 −2 + 𝑤2 𝑓 2
2 3 3

; ;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:

Given data: 𝑎 = 2, 𝑏 = 4, 𝑎𝑛𝑑 𝑓 𝑥 = (𝑥 4 + 1)

𝑏;𝑎 𝑏:𝑎 𝑏;𝑎 𝑏:𝑎 4−2 3 4+2


𝑥1 = 𝑧1 + , 𝑥2 = 𝑧2 + , 𝑥1 = − + = 2.2254
2 2 2 2 2 5 2
𝑏;𝑎 𝑏:𝑎
𝑥3 = 𝑧3 +
2 2 4−2 4+2
𝑥2 = 0 + =3
2 2

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:

Given data: 𝑎 = −1, 𝑏 = 1, 𝑎𝑛𝑑 𝑓 𝑥 = 𝑒 𝑥

𝑏;𝑎
𝐼= 𝑤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:

Given data: 𝑎 = −1, 𝑏 = 1, 𝑎𝑛𝑑 𝑓 𝑥 = 𝑒 𝑥

𝑏−𝑎
𝐼= 𝑤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

The truncation error is


2𝜋
𝐸 = 2𝑛+2 𝑓 2𝑛:2 𝑐 ,
2 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 𝐴𝑖 𝑓(𝑥𝑖 )

The truncation error is


[ 𝑛:1 !]2 2𝑛:2
𝐸= 𝑓 𝑐 ,
2𝑛:2 !
0<c<∞
∞ 𝒆−𝒙
Evaluate 𝟎 𝒅𝒙 using the Gauss-Laguerre two point and three point
EXAMPLE formula!
𝟏:𝒙𝟐

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

𝑒 ;𝑥 𝑓 𝑥 𝑑𝑥 = 0.71109𝑓 0.41577 + 0.27852𝑓 2.29428 + 0.01039𝑓 6.28995


0

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

The truncation error is


𝜋 (𝑛:1)! 2𝑛:2
𝐸= 𝑓 𝑐 ,
22 2𝑛:2 !
0<c<∞
EXAMPLE ∞ 𝒆−𝒙
𝟐
Evaluate 𝑰 = 𝒅𝒙 using Gauss Hermite
;∞ 𝒙𝟐 :𝒙:𝟏
Integral 1-point, 2-point, and 3-point formulas!

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

YouTube Sources: Books sources:

https://youtu.be/El0o_vCHL7Y (Gauss-Legendre) Chapra, S. C. (2018). Applied Numerical


Methods with MATHLAB for Engineers and
https://youtu.be/ZS2MYXFteLM (Gauss-Chebyshev) Scientist. New York: McGraw-Hill
https://youtu.be/e1mubbFpdKE (Gauss-Laguerre) Education.

https://youtu.be/aZRwWnam_6o (Gauss-Laguerre) Kiusalaas, J. (2013). Numerical Methods in


Engineering with Python 3. New York:
https://youtu.be/PI9eeNMiUbE (Gauss-Hermite) Cambridge University Press.
https://youtu.be/KTCiGtQP6w8 (Gauss-Hermite)
19. Gaussian Quadrature Formula - Derivation and Examples –
YouTube

You might also like