0% found this document useful (0 votes)
1 views

3- Integration - Numerical Analysis

mathematics
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

3- Integration - Numerical Analysis

mathematics
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Topic: Numerical Analysis Class: 3rd.

By: Asst. Prof. Dr. Waleed A. Abbas Date:


University of Technology Civil Engineering Department

QUESTIONS NOTES
Numerical Integration
‫) وعرض كل‬n( ‫ يتم تقسيم منطقة التكامل الى عدد من الشرائح عددها‬:‫ ادناه‬3 ‫ الى‬1 ‫لطرق التكامل من‬
(h) ‫واحدة منها هو‬
𝒃−𝒂
𝒉=
𝒏
b = max. limit of integration

a = min. limit of integration

1- Trapezoidal Rule:

n: even or odd number


𝒃 𝒏−𝟏
𝒉
∫ 𝒇(𝒙) . 𝐝𝐱 = [𝐟(𝐚) + 𝟐 ∑ 𝒇(𝒙𝒊 ) + 𝒇(𝒃) ]
𝟐
𝒂 𝒊=𝟏

𝒉
2- Simpson’s Rule:
𝟑

n: even number

𝒃 𝒏−𝟏 𝒏−𝟐
𝒉
∫ 𝒇(𝒙). 𝒅𝒙 = 𝒇(𝒂) + 𝟒 ∑ 𝒇(𝒙𝒊 ) + 𝟐 ∑ 𝒇(𝒙𝒊 ) + 𝒇(𝒃)
𝟑
𝒂 𝒊=𝟏,𝟑,𝟓,…
⏟ 𝒊=𝟐,𝟒,𝟔,…

[ 𝒏−𝒐𝒅𝒅 𝒏−𝒆𝒗𝒆𝒏 ]

SUMMARY: Write 4 or more sentences describing specific learning from these notes.
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
45
Topic: Numerical Analysis Class: 3rd.
By: Asst. Prof. Dr. Waleed A. Abbas Date:
University of Technology Civil Engineering Department

QUESTIONS NOTES
𝟑𝒉
3- Simpson’s Rule:
𝟖

n: 3 ‫عدد يقبل القسمة على‬

𝒃
𝟑𝒉
∫ 𝒇(𝒙). 𝒅𝒙 = . [𝒇(𝒙𝒐 ) + 𝟑𝒇(𝒙𝟏 ) + 𝟑𝒇(𝒙𝟐 ) + 𝟐𝒇(𝒙𝟑 ) + 𝟑𝒇(𝒙𝟒 ) + 𝟑𝒇(𝒙𝟓 ) + 𝟐𝒇(𝒙𝟔 ) + ⋯ …
𝟖
𝒂
+ 𝟑𝒇(𝒙𝒏−𝟐 ) + 𝟑𝒇(𝒙𝒏−𝟏 ) + 𝒇(𝒙𝒏 )]

OR:

𝑏
3ℎ
∫ 𝑓(𝑥). 𝑑𝑥 = [𝑓 + 3𝑓1 + 3𝑓2 + 2𝑓3 + ⋯ + ⋯ + 3𝑓𝑛−2 + 3𝑓𝑛−1 + 𝑓𝑏 ]
8 𝑎
𝑎

𝒘𝒉𝒆𝒓𝒆 ∶ 𝒇(𝒙𝒐 ) = 𝑓𝑎 and 𝒇(𝒙𝒏 ) = 𝑓𝑏

: ‫حاالت خاصة‬
: ‫ فإن‬6 ‫ أقل من‬4 ‫* اذا كان عدد الشرائح‬
𝑏
3ℎ ℎ
∫ 𝑓(𝑥). 𝑑𝑥 = [fo + 3𝑓1 + 3𝑓2 + 𝑓3 ] + [𝑓3 + 𝑓4 ]
8 2
𝑎

: ‫ فإن‬6 ‫ أقل من‬5 ‫* اذا كان عدد الشرائح‬


𝑏
3ℎ ℎ
∫ 𝑓(𝑥). 𝑑𝑥 = [𝑓𝑜 + 3𝑓1 + 3𝑓2 + 𝑓3 ] + [𝑓3 + 4𝑓4 + 𝑓5 ]
8 3
𝑎

SUMMARY: Write 4 or more sentences describing specific learning from these notes.
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
46
Topic: Numerical Analysis Class: 3rd.
By: Asst. Prof. Dr. Waleed A. Abbas Date:
University of Technology Civil Engineering Department

QUESTIONS NOTES
4- Gaussian Quadrature Method (Gauss–Legendre rules):
𝑏 𝑘
𝑏−𝑎 𝑏−𝑎 𝑏+𝑎
∫ 𝑓(𝑥) . dx = . [∑ 𝑊𝑖 𝑓 ( 𝑡𝑖 + )]
2 2 2
𝑎 𝑖=1

4-1 If we have K=2 ) ‫(تقسيمات منطقة التكامل‬


𝑏
𝑏−𝑎
∴ ∫ 𝑓(𝑥). 𝑑𝑥 = ( ) . [𝑊1 . 𝑓(𝑥1 ) + 𝑊2 . 𝑓(𝑥2 )]
2
𝑎
𝑏−𝑎 𝑏+𝑎
𝑥𝑖 = ( ) t𝑖 + ( ) 𝑖 = 1 𝑜𝑟 2
2 2

𝑏−𝑎
𝑑𝑥 = . 𝑑𝑡
2

−𝟏
K=2 𝑾𝟏 = 𝟏 𝒕𝟏 =
√𝟑
𝟏
𝑾𝟐 = 𝟏 𝒕𝟐 =
√𝟑

4-2 If we have K=3

𝟓
K=3 𝑾𝟏 = 𝟑
𝟗 𝒕𝟏 = − √
𝟓
𝟖
𝑾𝟐 = 𝒕𝟐 = 𝟎
𝟗

𝟓 𝟑
𝑾𝟑 = 𝒕𝟑 = + √
𝟗 𝟓

SUMMARY: Write 4 or more sentences describing specific learning from these notes.
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
47
Topic: Numerical Analysis Class: 3rd.
By: Asst. Prof. Dr. Waleed A. Abbas Date:
University of Technology Civil Engineering Department

QUESTIONS NOTES
1.5 2
Example: Solve the following integral: 𝑓(𝑥) = ∫0.2 𝑒 − 𝑥 . 𝑑𝑥 . use n = 6

1- Trapezoidal Rule:
𝑏 − 𝑎 1.5 − 0.2
ℎ= = = 0.216667
𝑛 6

𝟐
i x 𝒇(𝒙) = 𝒆−𝒙
a 0 0.2 0.9607894
1 0.416667 0.8406235
2 0.633334 0.6695751
3 0.850001 0.4855361
4 1.066668 0.3205296
5 1.283335 0.1926368
b 6 1.500002 0.1053986

𝟏.𝟓 𝒏−𝟏
−𝒙𝟐
𝒉
∫ 𝒆 𝐝𝐱 = [𝐟(𝐚) + 𝟐 ∑ 𝒇(𝒙𝒊 ) + 𝒇(𝒃) ]
𝟐
𝟎.𝟐 𝒊=𝟏

0.216667
= [0.9607894 + 2(0.8406235 + 0.6695751 +
2
0.4855361 + 0.3205296 + 0.1926368) + 0.1053986] = 0.65909995
𝒉
2- Simpson’s Rule:
𝟑

1.5 𝒏−𝟏 𝒏−𝟐


−𝑥 2
𝒉
∫ 𝑒 𝑑𝑥 = 𝒇(𝒂) + 𝟒 ∑ 𝒇(𝒙𝒊 ) + 𝟐 ∑ 𝒇(𝒙𝒊 ) + 𝒇(𝒃)
𝟑
0.2 𝒊=𝟏,𝟑,𝟓
⏟ 𝒊=𝟐,𝟒

[ 𝒏−𝒐𝒅𝒅 𝒏−𝒆𝒗𝒆𝒏 ]
0.216667
= (0.960789 + 4(0.8406235 + 0.4855361 +
3
0.1926368) + 2(0.6695751 + 0.3205296) + 0.1053986) = 0.658782008

SUMMARY: Write 4 or more sentences describing specific learning from these notes.
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
48
Topic: Numerical Analysis Class: 3rd.
By: Asst. Prof. Dr. Waleed A. Abbas Date:
University of Technology Civil Engineering Department

QUESTIONS NOTES
𝟑𝒉
3- Simpson’s Rule:
𝟖

1.5
2 3ℎ
∫ 𝑒 −𝑥 𝑑𝑥 = [𝑓 + 3𝑓1 + 3𝑓2 + 2𝑓3 + ⋯ … + 3𝑓𝑛−2 + 3𝑓𝑛−1 + 𝑓𝑛 ]
8 𝑜
0.2

3ℎ
= . [𝑓(𝑥𝑜 ) + 3𝑓(𝑥1 ) + 3𝑓(𝑥2 ) + 2𝑓(𝑥3 ) + 3𝑓(𝑥4 ) + 3𝑓(𝑥5 ) + 𝑓(𝑥6 )]
8
3 ∗ 0.216667
= [0.9607894 + 3(0.8406235 + 0.6695751) + 2(0.4855361)
8
+ 3(0.3205296 + 0.1926368) + 0.1053986]

= 0.659607676

4- Gaussian Quadrature Method K=2 :


𝑏−𝑎 1.5−0.2 𝑏+𝑎 1.5+0.2
= = 0.65 and = = 0.85
2 2 2 2

1.5 𝑘
−𝑥 2
𝑏−𝑎 𝑏−𝑎 𝑏+𝑎
∫ 𝑒 𝑑𝑥 = . [∑ 𝑊𝑖 𝑓 ( 𝑡𝑖 + )]
2 2 2
0.2 𝑖=1

−1 1
𝑊1 = 1, 𝑊2 = 1, 𝑡1 = , 𝑡2 =
√3 √3
𝑏−𝑎 𝑏+𝑎
∴ 𝑥𝑖 = ( ) 𝑡𝑖 + = 0.65 𝑡𝑖 + 0.85
2 2
1.5 2 2
−1 1
−𝑥 2 −( 0.65∗ +0.85) −( 0.65∗ +0.85)
∫ 𝑒 𝑑𝑥 = 0.65 . (1 ∗ 𝑒 √3 +1∗ 𝑒 √3 )
0.2
= 0.65 . (0.79822 + 0.22283)

= 0.66368

SUMMARY: Write 4 or more sentences describing specific learning from these notes.
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
49
Topic: Numerical Analysis Class: 3rd.
By: Asst. Prof. Dr. Waleed A. Abbas Date:
University of Technology Civil Engineering Department

QUESTIONS NOTES
5- Gaussian Quadrature Method K=3 :
𝑏−𝑎 1.5−0.2 𝑏+𝑎 1.5+0.2
= = 0.65 and = = 0.85
2 2 2 2

1.5 𝑘
−𝑥 2
𝑏−𝑎 𝑏−𝑎 𝑏+𝑎
∫ 𝑒 𝑑𝑥 = . [∑ 𝑊𝑖 𝑓 ( 𝑡𝑖 + )]
2 2 2
0.2 𝑖=1

5 8 5
𝑊1 = 𝑊2 = 𝑊3 =
9 9 9

𝟑 3
𝑡1 = −√ = −√0.6 𝑡2 = 0 𝑡3 = +√ = +√0.6
𝟓 5

1.5 𝑘=3
−𝑥 2
∫ 𝑒 𝑑𝑥 = 0.65 [∑ 𝑊𝑖 𝑓(0.65𝑡𝑖 + 0.85)]
0.2 𝑖=1

5 8 5
= 0.65 [ ∗ 𝐹{0.65(−√0.6) + 0.85} + ∗ 𝐹{0.65(0) + 0.85} + ∗ 𝐹{0.65(√0.6) + 0.85}]
9 9 9

5 2 8 2 5 2
= 0.65 [ ∗ (𝑒 −(0.3465) ) + ∗ (𝑒 −(0.85) ) + ∗ (𝑒 −(1.3535) )]
9 9 9

= 0.65 [0.4927 + 0.4316 + 0.0889]

1.5 2
∴ ∫0.2 𝑒 −𝑥 𝑑𝑥 = 0.65858

SUMMARY: Write 4 or more sentences describing specific learning from these notes.
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
50
Topic: Numerical Analysis Class: 3rd.
By: Asst. Prof. Dr. Waleed A. Abbas Date:
University of Technology Civil Engineering Department

QUESTIONS NOTES
7
Example: Evaluate the following integral use n=4 : ∫3 𝑥 2 . 𝑙𝑛 𝑥. 𝑑𝑥

Solution:
𝑏−𝑎 7−3
ℎ= = =1
𝑛 4
𝒊 0 1 2 3 4
𝒙 3 4 5 6 7
9.88751 22.18071 40.23595 64.50334 95.34960
𝒇(𝒙𝒊 ) 𝒇(𝒙𝒐 ) 𝒇(𝒙𝟏 ) 𝒇(𝒙𝟐 ) 𝒇(𝒙𝟑 ) 𝒇(𝒙𝟒 )

1- Trapezoidal Rule:
7
1
∫ 𝑥 2 𝑙𝑛 𝑥 𝑑𝑥 = [9.88751 + 2(22.18071 + 40.23595 + 64.50334)
2
3
+ 95.3496] = 179.538555
𝒉
2- Simpson’s Rule:
𝟑

7
1
∫ 𝑥 2 𝑙𝑛 𝑥 𝑑𝑥 = [9.88751 + 4(22.18071 + 64.50334) + 2(40.23595)
3
3
+ 95.3496] = 177.4817367

𝟑𝒉
3- Simpson’s Rule:
𝟖

𝟕
3∗1
∫ 𝒙𝟐 𝐥𝐧 𝒙 𝒅𝒙 = [9.88751 + 3(22.18071 + 40.23595) + 64.50334]
8
𝟑
1
+ [64.50334 + 95.3496] = 178.0417813
2

SUMMARY: Write 4 or more sentences describing specific learning from these notes.
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
51
Topic: Numerical Analysis Class: 3rd.
By: Asst. Prof. Dr. Waleed A. Abbas Date:
University of Technology Civil Engineering Department

QUESTIONS NOTES
4- Gaussian quadrature formula: (k=3)
𝑏−𝑎 7−3 𝑏+𝑎 7+3
= =2 = =5
2 2 2 2
7 3

∴ ∫ 𝑥 2 𝑙𝑛 𝑥 𝑑𝑥 = 2 . [∑ 𝑊𝑖 𝑓(2𝑡𝑖 + 5)]
3 𝑖=1

5 8 5
= 2 [ ∗ 𝐹{2(−√0.6) + 5} + ∗ 𝐹 {2(0) + 5} + ∗ 𝐹{2(√0.6 ) + 5}]
9 9 9
5 8 5
= 2 [ ∗ 𝐹(3.4508) + ∗ 𝐹(5) + ∗ 𝐹(6.5492)]
9 9 9
5 8 5
= 2 [ ∗ 14.74935 + ∗ 40.23595 + ∗ 80.60881]
9 9 9

= 177.4840889

SUMMARY: Write 4 or more sentences describing specific learning from these notes.
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
________________________________________________________________________________________
52

You might also like