SlideShare a Scribd company logo
1
Numerical integration
2
Methods for Numerical Integration
3
Newton-Cotes Formulas
Approximate integrand function f(x) by a polynomial that can then be easily integrated
4
Newton-Cotes Quadrature
5
The Trapezoidal Rule
( ) ( )dxxfdxxf
b
a
b
a ∫∫ ≅= 1I
( ) ( ) ( ) ( )( )a-x
a-b
afbf
afxf
−
+=1
( ) ( ) ( )( ) ( ) ( ) ( )
2
bfaf
abdxa-x
a-b
afbf
afI
b
a
+
−=




 −
+= ∫
All the Newton-Cotes formulas can be expressed in this general average height form
heightaveragewidthI ×≅
Example 1 Single Application of the Trapezoidal Rule
f(x) = 0.2 +25x – 200x2 + 675x3 – 900x4 + 400x5
Integrate f(x) from a=0 to b=0.8
%....E
.
..
.
)()(
)(
tt
:oferroranrepresentswhich
:RulelTrapezoida
58946773117280640531
17280
2
232020
80
2
==−=
=
+
=
+
−=
ε
bfaf
abI
∫
=
=
==
80
0
640531
.
.)(:valueintegralTrue
b
a
dxxfI
Solution: f(a)=f(0) = 0.2 and f(b)=f(0.8) = 0.232
7
• The accuracy can be improved by dividing the
interval from a to b into a number of segments
and applying the method to each segment.
• The areas of individual segments are added to
yield the integral for the entire interval.
Using the trapezoidal rule, we get:
∫∫∫
−
+++=
===
−
=
n
n
x
x
x
x
x
x
n
dxxfdxxfdxxfI
xbxa
n
ab
h
1
2
1
1
0
)()()(
seg.of#n 0
L






++
−
=
+
++
+
+
+
=
∑
−
=
−
1
1
0
12110
2
2
222
n
i
in
nn
xfxfxf
n
ab
I
xfxf
h
xfxf
h
xfxf
hI
)()()(
)()()()()()(
L
The Multiple-Application Trapezoidal Rule
8
Example 2
10
11
Example 3
12
Example 4
The vertical distance covered by a rocket from to seconds is
given by:
∫ 





−



−
=
30
8
89
2100140000
140000
2000 dtt.
t
lnx
a) Use two-segment Trapezoidal rule to find the distance covered.
b) Find the true error, for part (a).
c) Find the absolute relative true error, for part (a).a∈
tE
Solution
a) The solution using 2-segment Trapezoidal rule is






+






++
−
= ∑
−
=
)b(f)iha(f)a(f
n
ab
I
n
i
1
1
2
2
2=n 8=a 30=b
2
830 −
=
n
ab
h
−
= 11=
Solution (cont)






+






++
−
= ∑
−
=
)(f)iha(f)(f
)(
I
i
3028
22
830 12
1
[ ])(f)(f)(f 301928
4
22
++=
[ ]6790175484227177
4
22
.).(. ++=
m11266=
Then:
Solution (cont)
∫ 





−



−
=
30
8
89
2100140000
140000
2000 dtt.
t
lnx m11061=
b) The exact value of the above integral is
so the true error is
ValueeApproximatValueTrueEt −=
1126611061−=
Solution (cont)
The absolute relative true error, , would bet∈
100
ValueTrue
ErrorTrue
×=∈t
100
11061
1126611061
×
−
=
%8534.1=
Solution (cont)
Table 1 gives the values
obtained using multiple
segment Trapezoidal rule for
n Value Et
1 11868 -807 7.296 ---
2 11266 -205 1.853 5.343
3 11153 -91.4 0.8265 1.019
4 11113 -51.5 0.4655 0.3594
5 11094 -33.0 0.2981 0.1669
6 11084 -22.9 0.2070 0.09082
7 11078 -16.8 0.1521 0.05482
8 11074 -12.9 0.1165 0.03560
∫ 





−



−
=
30
8
89
2100140000
140000
2000 dtt.
t
lnx
Table 1: Multiple Segment Trapezoidal Rule Values
%t∈ %a∈
Exact Value=11061 m
19
Example 5
21
Example 6
22
23
)()(
)(
)(
2
2
1
212
2
2
1
2
1






≅⇒≅
h
h
hEhE
h
h
hE
hE
Romberg Integration
Successive application of the trapezoidal rule to attain efficient numerical integrals of functions.
Richardson’s Extrapolation:
Uses two estimates of an integral to compute a third and more accurate approximation.
sizes)stepdifferentforconstantis(assume
)()()()(
/)(/)()()(
)
2
(
2
12
2211
fhOfh
ab
E
hEhIhEhI
habnnabhhEhII
′′=′′
−
≅
+=+
−=−=+=
I = exact value of integral E(h) = the truncation error
I(h): trapezoidal rule (n segments, step size h)
Improved estimate of the integral.
It is shown that the error of this
estimate is O(h4). Trapezoidal rule
had an error estimate of O(h2).( )
[ ])()(
/
)(
)()(
122
21
2
22
1
1
hIhI
hh
hII
hEhII
−
−
+≅
+=
( )
( ) 1/
)()(
)()()(/)()( 2
21
12
222
2
2121
−
−
≅⇒+≅+
hh
hIhI
hEhEhIhhhEhI
25
( )
[ ])()(
1/
1
)( 122
21
2 hIhI
hh
hII −
−
+≅
Example 7
Evaluate the integral of f(x) = 0.2 +25x – 200x2 + 675x3 – 900x4 + 400x5
from a=0 to b=0.8. I (True Integral value) = 1.6405
Segments h Integral εtr%
1 0.8 0.1728 89.5
2 0.4 1.0688 34.9
4 0.2 1.4848 9.5
%)6.16(0.2733675.16405.1E
3675.1)1728.0(
3
1
)0688.1(
3
4
:givetocombined2&1Segments
tt ==−=
=−≅
ε
I
In each case, two estimates with
error O(h2) are combined to give a
third estimate with error O(h4)
%)1(0.01716234.16405.1E
6234.1)0688.1(
3
1
)4848.1(
3
4
:givetocombined4&2Segments
tt ==−=
=−≅
ε
I
)2/(If 12 ⇒= hh [ ] )(
3
1
)(
3
4
)()(
12
1
)( 121222 hIhIhIhIhII −=−
−
+≅
26
Simpson’s Rules
General idea:
Use high order polynomials other than trapezoids to achieve more
accurate integration result but using the similar amount of computation
Parabola Cubic polynomial
• More accurate estimate of an integral is obtained if
a high-order polynomial is used to connect the
points. These formulas are called Simpson’s rules.
Simpson’s 1/3 Rule: results when a 2nd order
Lagrange interpolating polynomial is used for f(x)
dxxf
xxxx
xxxx
xf
xxxx
xxxx
xf
xxxx
xxxx
I
dxxfdxxfI
x
x
b
a
b
a
xbxa
xf
∫
∫ ∫






−−
−−
+
−−
−−
+
−−
−−
=
≅=
==
2
0
)(
))((
))((
)(
))((
))((
)(
))((
))((
)()(
2
1202
10
1
2101
20
0
2010
21
20
2
Using
.polynomialorder-secondais)(2where
[ ] RULE1/3SSIMPSON'
2
)()(4)(
3
210
:resultsformulafollowingtheon,manipulatialgebraicandnintegratioafter
⇐
−
=++≅
ab
hxfxfxf
h
I
a=x0 x1 b=x2
Simpson’s Rules
28
[ ] RULE1/3SSIMPSON'
2
)()(4)(
3
210
:resultsformulafollowingtheon,manipulatialgebraicandnintegratioafter
⇐
−
=++≅
ab
hxfxfxf
h
I
29
30
Trapezoidal vs. Simpson’s 1/3 Rule
( ) ( ) ( ) ( ) 3674671
2
8080 .
.
..I =
++
=
++
≅
6
0.2322.45640
6
0.8f0.44f0f
%.616=→== tt 0.27306671.367467-1.640533E ε
Trapezoidal:
Example: f(x) = 0.2 + 25x – 200x2 + 675x3 – 900x4 + 400x5 (integral between a=0 and b=0.8)
( ) ( ) ( ) 0.1728
2
0.8f0f
00.8 =
+
−≅I
Et = 1.640533 – 0.1728 = 1.467733 εt = 89.5%
Simpson’s 1/3 rule:
31
Example 8
32
Multiple Application of Simpson’s 1/3 Rule
33
Example 9
34
Example 10
35
36
Example 11
37
38
[ ]
8
)()(3)(3)(
)(
)()(3)(3)(
8
3
)()(
3210
3210
3
3
)(
xfxfxfxf
abI
xfxfxfxf
h
I
dxxfdxxfI
ab
h
b
a
b
a
+++
−≅
+++≅
≅=
−
=
∫ ∫
Simpson’s 3/8 Rule
Simpson’s 1/3 and 3/8 rules can be
applied in tandem to handle
multiple applications with odd
number of intervals
Fit a 3rd order Lagrange interpolating
polynomial to four points and integrate
39
Example 12
40
41
Example 13
42
Gauss Quadrature
• Gauss quadrature implements a strategy of
positioning any two points on a curve to define a
straight line that would balance the positive and
negative errors.
• Hence the area evaluated under this straight line
provides an improved estimate of the integral.
44
Gauss Quadrature (cont.)
45
Gauss Quadrature (cont.)
Method of Undetermined Coefficients
• The trapezoidal rule yields exact results when the function
being integrated is a constant or a straight line, such as y=1
and y=x:
)()( 10 bfcafcI +≅
)(
2
)(
2
2
0
22
22
110
10
10
10
2/)(
2/)(
10
2/)(
2/)(
bf
ab
af
ab
I
ab
cc
ab
c
ab
c
abcc
dxx
ab
c
ab
c
dxcc
ab
ab
ab
ab
−
+
−
=
−
==
=
−
+
−
−
−=+
=
−
+
−
−
=+
∫
∫
−
−−
−
−−
Solve simultaneously
Trapezoidal rule
47
Derivation of the Two-Point Gauss-Legendre Formula/
• The object of Gauss quadrature is to determine the equations of
the form
• However, in contrast to trapezoidal rule that uses fixed end
points a and b, the function arguments x0 and x1 are not fixed
end points but unknowns.
• Thus, four unknowns to be evaluated require four conditions.
• First two conditions are obtained by assuming that the above
eqn. for I fits the integral of a constant and a linear function
exactly.
• The other two conditions are obtained by extending this
reasoning to a parabolic and a cubic functions.
)()( 1100 xfcxfcI +≅
Solved simultaneously






+




 −
≅
−==
−=−=
==
3
1
3
1
5773503.0
3
1
5773503.0
3
1
1
1
0
10
ffI
x
x
cc
K
K
Yields an integral
estimate that is third
order accurate
49
Two-Point Gauss-Legendre Formula
(arbitrary a and b)
( ) ( )
bxx
ax-x
2
xabab
x
d
dd
=→=
=→=


−++
=
1
1
( )∫=
b
a
dxxfI
( ) ( ) ( ) ( )
∫
=
=





 −++





 −++
=
1x
-1x
ddd
d 2
xabab
d
2
xabab
fI
( ) ( )
∫ 




 −++−
=
1
1- d
d
dx
2
xabab
f
2
ab
I
50
Example of Two-Point Gauss-Legendre Formula
( ) 8225781264592532918525140
3
1
3
1
40 ....ff.I dd =+=
















+






 −
=
( ) ( )∫∫ +==
1
1-
0.8
0 dd dx0.4x0.4f0.4dxxfI
( )∫=
1
1- ddd dxxf40.I
Example14: f(x) = 0.2 + 25x – 200x2 + 675x3 – 900x4 + 400x5 (integral between a=0 and b=0.8)
x = 0.4 + 0.4xd
dx = 0.4 dxd
( ) ( ) ( ) ( ) ( )[ ]∫ +++−+++−++=
1
1- dddddd dx0.4x0.40.4x0.40.4x0.40.4x0.40.4x0.4250.20.4
543
400900675200 2
I
( ) ( )
bxx
ax-x
2
xabab
x
d
dd
=→=
=→=


−++
=
1
1
)()( 1100 xfcxfcI +≅
51
Higher-Point Gauss-Legendre Formula
( ) ( ) ( )[ ]2d21d10d0 xfcxfcxfc ++= 40.I
( ) ( ) ( ) ( )
44444444 344444444 21
L
44444 344444 21
444 3444 21
pointn
1-n1-n
pointthree
22
pointtwo
1100 xfcxfcxfcxfc
−
−
−
++++≅I
( )∫=
1
1- ddd dxxf40.I
Example: f(x) = 0.2 + 25x – 200x2 + 675x3 – 900x4 + 400x5 (integral between a=0 and b=0.8)
Three-point Gauss-Legendre formula: c0 = 0.5555556 x0 = - 0.774596669
c1 = 0.8888889 x1 = 0.0
c2 = 0.5555556 x2 = 0.774596669
( ) ( ) ( )[ ].77459669f0.5555560f0.88888890.77459669-f0.5555560.4 ddd ++=I
1.640533
52
53
Example 15
54
( ) 543376.0318386.0768365.05.0
3
1
3
1
5.0 =+=











+




 −
= dd ffI
( ) ( ) ( )( )
( ) 0.5405910.275778*0.55555560.494845*0.88888890.878598*0.55555565.0
90.77459666*0.55555560.0*0.888888990.77459666-*0.55555565.0
=++=
++= ddd fffI
55
Gauss Quadrature
Gauss-Chebyshev Formula
56
Gauss Quadrature
Gauss-Hermite Formula
57
Integration Using Matlab
Approximation of Double Integrals Using Matlab
58
Miscellaneous problems #1
59
60
Miscellaneous problems #2
61
62
63
Special Problem 7
Homework
64
1.
2.
3.
4.
5.
6.

More Related Content

What's hot

Finite difference method
Finite difference methodFinite difference method
Finite difference method
Divyansh Verma
 
Fourier Series - Engineering Mathematics
Fourier Series -  Engineering MathematicsFourier Series -  Engineering Mathematics
Fourier Series - Engineering Mathematics
Md Sadequl Islam
 
Thomas algorithm
Thomas algorithmThomas algorithm
Thomas algorithm
Paridhi SK
 
the fourier series
the fourier seriesthe fourier series
the fourier seriessafi al amu
 
21 simpson's rule
21 simpson's rule21 simpson's rule
21 simpson's rule
Salah Mahmood
 
trapezoidal and simpson's 1/3 and 3/8 rule
trapezoidal and simpson's 1/3 and 3/8 ruletrapezoidal and simpson's 1/3 and 3/8 rule
trapezoidal and simpson's 1/3 and 3/8 rule
hitarth shah
 
2. Fixed Point Iteration.pptx
2. Fixed Point Iteration.pptx2. Fixed Point Iteration.pptx
2. Fixed Point Iteration.pptx
saadhaq6
 
weddle's rule
weddle's ruleweddle's rule
weddle's rule
Effa Kiran
 
Divided difference Matlab code
Divided difference Matlab codeDivided difference Matlab code
Divided difference Matlab code
Taimoor Muzaffar Gondal
 
Linear Systems Gauss Seidel
Linear Systems   Gauss SeidelLinear Systems   Gauss Seidel
Linear Systems Gauss SeidelEric Davishahl
 
Jacobi and gauss-seidel
Jacobi and gauss-seidelJacobi and gauss-seidel
Jacobi and gauss-seidel
arunsmm
 
Numerical integration
Numerical integrationNumerical integration
Numerical integration
Mohammed_AQ
 
Gaussian Elimination Method
Gaussian Elimination MethodGaussian Elimination Method
Gaussian Elimination Method
Andi Firdaus
 
Lesson 3 simpsons rule
Lesson 3 simpsons ruleLesson 3 simpsons rule
Lesson 3 simpsons rule
Dr. Jennifer Chang Wathall
 
A brief introduction to finite difference method
A brief introduction to finite difference methodA brief introduction to finite difference method
A brief introduction to finite difference method
Prateek Jha
 
Simpson’s one third and weddle's rule
Simpson’s one third and weddle's ruleSimpson’s one third and weddle's rule
Simpson’s one third and weddle's rule
zahid6
 
Gaussian Quadrature Formula
Gaussian Quadrature FormulaGaussian Quadrature Formula
Gaussian Quadrature Formula
Dhaval Shukla
 
Secant method
Secant methodSecant method
Secant method
Zahra Saman
 
Lecture 04 newton-raphson, secant method etc
Lecture 04 newton-raphson, secant method etcLecture 04 newton-raphson, secant method etc
Lecture 04 newton-raphson, secant method etc
Riyandika Jastin
 

What's hot (20)

Finite difference method
Finite difference methodFinite difference method
Finite difference method
 
Fourier Series - Engineering Mathematics
Fourier Series -  Engineering MathematicsFourier Series -  Engineering Mathematics
Fourier Series - Engineering Mathematics
 
Thomas algorithm
Thomas algorithmThomas algorithm
Thomas algorithm
 
the fourier series
the fourier seriesthe fourier series
the fourier series
 
21 simpson's rule
21 simpson's rule21 simpson's rule
21 simpson's rule
 
trapezoidal and simpson's 1/3 and 3/8 rule
trapezoidal and simpson's 1/3 and 3/8 ruletrapezoidal and simpson's 1/3 and 3/8 rule
trapezoidal and simpson's 1/3 and 3/8 rule
 
2. Fixed Point Iteration.pptx
2. Fixed Point Iteration.pptx2. Fixed Point Iteration.pptx
2. Fixed Point Iteration.pptx
 
weddle's rule
weddle's ruleweddle's rule
weddle's rule
 
Divided difference Matlab code
Divided difference Matlab codeDivided difference Matlab code
Divided difference Matlab code
 
Linear Systems Gauss Seidel
Linear Systems   Gauss SeidelLinear Systems   Gauss Seidel
Linear Systems Gauss Seidel
 
Gauss sediel
Gauss sedielGauss sediel
Gauss sediel
 
Jacobi and gauss-seidel
Jacobi and gauss-seidelJacobi and gauss-seidel
Jacobi and gauss-seidel
 
Numerical integration
Numerical integrationNumerical integration
Numerical integration
 
Gaussian Elimination Method
Gaussian Elimination MethodGaussian Elimination Method
Gaussian Elimination Method
 
Lesson 3 simpsons rule
Lesson 3 simpsons ruleLesson 3 simpsons rule
Lesson 3 simpsons rule
 
A brief introduction to finite difference method
A brief introduction to finite difference methodA brief introduction to finite difference method
A brief introduction to finite difference method
 
Simpson’s one third and weddle's rule
Simpson’s one third and weddle's ruleSimpson’s one third and weddle's rule
Simpson’s one third and weddle's rule
 
Gaussian Quadrature Formula
Gaussian Quadrature FormulaGaussian Quadrature Formula
Gaussian Quadrature Formula
 
Secant method
Secant methodSecant method
Secant method
 
Lecture 04 newton-raphson, secant method etc
Lecture 04 newton-raphson, secant method etcLecture 04 newton-raphson, secant method etc
Lecture 04 newton-raphson, secant method etc
 

Similar to Applied numerical methods lec10

Amth250 octave matlab some solutions (2)
Amth250 octave matlab some solutions (2)Amth250 octave matlab some solutions (2)
Amth250 octave matlab some solutions (2)asghar123456
 
Chapter 1 (math 1)
Chapter 1 (math 1)Chapter 1 (math 1)
Chapter 1 (math 1)
Amr Mohamed
 
Differential calculus
Differential calculusDifferential calculus
Differential calculus
Chit Laplana
 
1531 fourier series- integrals and trans
1531 fourier series- integrals and trans1531 fourier series- integrals and trans
1531 fourier series- integrals and trans
Dr Fereidoun Dejahang
 
MT T4 (Bab 3: Fungsi Kuadratik)
MT T4 (Bab 3: Fungsi Kuadratik)MT T4 (Bab 3: Fungsi Kuadratik)
MT T4 (Bab 3: Fungsi Kuadratik)
hasnulslides
 
Howard, anton calculo i- um novo horizonte - exercicio resolvidos v1
Howard, anton   calculo i- um novo horizonte - exercicio resolvidos v1Howard, anton   calculo i- um novo horizonte - exercicio resolvidos v1
Howard, anton calculo i- um novo horizonte - exercicio resolvidos v1
cideni
 
functions limits and continuity
functions limits and continuityfunctions limits and continuity
functions limits and continuity
Pume Ananda
 
2.1 Calculus 2.formulas.pdf.pdf
2.1 Calculus 2.formulas.pdf.pdf2.1 Calculus 2.formulas.pdf.pdf
2.1 Calculus 2.formulas.pdf.pdf
NiccoloAaronMendozaA
 
Calculus 10th edition anton solutions manual
Calculus 10th edition anton solutions manualCalculus 10th edition anton solutions manual
Calculus 10th edition anton solutions manual
Reece1334
 
25285 mws gen_int_ppt_trapcontinuous
25285 mws gen_int_ppt_trapcontinuous25285 mws gen_int_ppt_trapcontinuous
25285 mws gen_int_ppt_trapcontinuousJyoti Parange
 
1519 differentiation-integration-02
1519 differentiation-integration-021519 differentiation-integration-02
1519 differentiation-integration-02
Dr Fereidoun Dejahang
 
Cuaderno+de+integrales
Cuaderno+de+integralesCuaderno+de+integrales
Cuaderno+de+integralesjoseluisroyo
 
Numerical Methods and Analysis
Numerical Methods and AnalysisNumerical Methods and Analysis
exponen dan logaritma
exponen dan logaritmaexponen dan logaritma
exponen dan logaritma
Hanifa Zulfitri
 
Differential Calculus
Differential Calculus Differential Calculus
Differential Calculus
OlooPundit
 
8.7 numerical integration
8.7 numerical integration8.7 numerical integration
8.7 numerical integrationdicosmo178
 
8.7 numerical integration
8.7 numerical integration8.7 numerical integration
8.7 numerical integrationdicosmo178
 

Similar to Applied numerical methods lec10 (20)

Amth250 octave matlab some solutions (2)
Amth250 octave matlab some solutions (2)Amth250 octave matlab some solutions (2)
Amth250 octave matlab some solutions (2)
 
Chapter 1 (math 1)
Chapter 1 (math 1)Chapter 1 (math 1)
Chapter 1 (math 1)
 
Differential calculus
Differential calculusDifferential calculus
Differential calculus
 
1531 fourier series- integrals and trans
1531 fourier series- integrals and trans1531 fourier series- integrals and trans
1531 fourier series- integrals and trans
 
MT T4 (Bab 3: Fungsi Kuadratik)
MT T4 (Bab 3: Fungsi Kuadratik)MT T4 (Bab 3: Fungsi Kuadratik)
MT T4 (Bab 3: Fungsi Kuadratik)
 
Howard, anton calculo i- um novo horizonte - exercicio resolvidos v1
Howard, anton   calculo i- um novo horizonte - exercicio resolvidos v1Howard, anton   calculo i- um novo horizonte - exercicio resolvidos v1
Howard, anton calculo i- um novo horizonte - exercicio resolvidos v1
 
functions limits and continuity
functions limits and continuityfunctions limits and continuity
functions limits and continuity
 
Functions limits and continuity
Functions limits and continuityFunctions limits and continuity
Functions limits and continuity
 
2.1 Calculus 2.formulas.pdf.pdf
2.1 Calculus 2.formulas.pdf.pdf2.1 Calculus 2.formulas.pdf.pdf
2.1 Calculus 2.formulas.pdf.pdf
 
Calculus 10th edition anton solutions manual
Calculus 10th edition anton solutions manualCalculus 10th edition anton solutions manual
Calculus 10th edition anton solutions manual
 
25285 mws gen_int_ppt_trapcontinuous
25285 mws gen_int_ppt_trapcontinuous25285 mws gen_int_ppt_trapcontinuous
25285 mws gen_int_ppt_trapcontinuous
 
1519 differentiation-integration-02
1519 differentiation-integration-021519 differentiation-integration-02
1519 differentiation-integration-02
 
Cuaderno+de+integrales
Cuaderno+de+integralesCuaderno+de+integrales
Cuaderno+de+integrales
 
Numerical Methods and Analysis
Numerical Methods and AnalysisNumerical Methods and Analysis
Numerical Methods and Analysis
 
Numerical methods generating polynomial
Numerical methods generating polynomialNumerical methods generating polynomial
Numerical methods generating polynomial
 
05_AJMS_332_21.pdf
05_AJMS_332_21.pdf05_AJMS_332_21.pdf
05_AJMS_332_21.pdf
 
exponen dan logaritma
exponen dan logaritmaexponen dan logaritma
exponen dan logaritma
 
Differential Calculus
Differential Calculus Differential Calculus
Differential Calculus
 
8.7 numerical integration
8.7 numerical integration8.7 numerical integration
8.7 numerical integration
 
8.7 numerical integration
8.7 numerical integration8.7 numerical integration
8.7 numerical integration
 

More from Yasser Ahmed

Artificial reefs
Artificial reefsArtificial reefs
Artificial reefs
Yasser Ahmed
 
Novel approach of bidirectional diffuser-augmented channels system for enhanc...
Novel approach of bidirectional diffuser-augmented channels system for enhanc...Novel approach of bidirectional diffuser-augmented channels system for enhanc...
Novel approach of bidirectional diffuser-augmented channels system for enhanc...
Yasser Ahmed
 
Applied numerical methods lec14
Applied numerical methods lec14Applied numerical methods lec14
Applied numerical methods lec14
Yasser Ahmed
 
Applied numerical methods lec13
Applied numerical methods lec13Applied numerical methods lec13
Applied numerical methods lec13
Yasser Ahmed
 
Applied numerical methods lec12
Applied numerical methods lec12Applied numerical methods lec12
Applied numerical methods lec12
Yasser Ahmed
 
Applied numerical methods lec11
Applied numerical methods lec11Applied numerical methods lec11
Applied numerical methods lec11
Yasser Ahmed
 
Applied numerical methods lec9
Applied numerical methods lec9Applied numerical methods lec9
Applied numerical methods lec9
Yasser Ahmed
 
Applied numerical methods lec8
Applied numerical methods lec8Applied numerical methods lec8
Applied numerical methods lec8
Yasser Ahmed
 
Applied numerical methods lec7
Applied numerical methods lec7Applied numerical methods lec7
Applied numerical methods lec7
Yasser Ahmed
 
Applied numerical methods lec6
Applied numerical methods lec6Applied numerical methods lec6
Applied numerical methods lec6
Yasser Ahmed
 
Applied numerical methods lec5
Applied numerical methods lec5Applied numerical methods lec5
Applied numerical methods lec5
Yasser Ahmed
 
Applied numerical methods lec4
Applied numerical methods lec4Applied numerical methods lec4
Applied numerical methods lec4
Yasser Ahmed
 
Applied numerical methods lec3
Applied numerical methods lec3Applied numerical methods lec3
Applied numerical methods lec3
Yasser Ahmed
 
Applied numerical methods lec2
Applied numerical methods lec2Applied numerical methods lec2
Applied numerical methods lec2
Yasser Ahmed
 
Applied numerical methods lec1
Applied numerical methods lec1Applied numerical methods lec1
Applied numerical methods lec1
Yasser Ahmed
 

More from Yasser Ahmed (15)

Artificial reefs
Artificial reefsArtificial reefs
Artificial reefs
 
Novel approach of bidirectional diffuser-augmented channels system for enhanc...
Novel approach of bidirectional diffuser-augmented channels system for enhanc...Novel approach of bidirectional diffuser-augmented channels system for enhanc...
Novel approach of bidirectional diffuser-augmented channels system for enhanc...
 
Applied numerical methods lec14
Applied numerical methods lec14Applied numerical methods lec14
Applied numerical methods lec14
 
Applied numerical methods lec13
Applied numerical methods lec13Applied numerical methods lec13
Applied numerical methods lec13
 
Applied numerical methods lec12
Applied numerical methods lec12Applied numerical methods lec12
Applied numerical methods lec12
 
Applied numerical methods lec11
Applied numerical methods lec11Applied numerical methods lec11
Applied numerical methods lec11
 
Applied numerical methods lec9
Applied numerical methods lec9Applied numerical methods lec9
Applied numerical methods lec9
 
Applied numerical methods lec8
Applied numerical methods lec8Applied numerical methods lec8
Applied numerical methods lec8
 
Applied numerical methods lec7
Applied numerical methods lec7Applied numerical methods lec7
Applied numerical methods lec7
 
Applied numerical methods lec6
Applied numerical methods lec6Applied numerical methods lec6
Applied numerical methods lec6
 
Applied numerical methods lec5
Applied numerical methods lec5Applied numerical methods lec5
Applied numerical methods lec5
 
Applied numerical methods lec4
Applied numerical methods lec4Applied numerical methods lec4
Applied numerical methods lec4
 
Applied numerical methods lec3
Applied numerical methods lec3Applied numerical methods lec3
Applied numerical methods lec3
 
Applied numerical methods lec2
Applied numerical methods lec2Applied numerical methods lec2
Applied numerical methods lec2
 
Applied numerical methods lec1
Applied numerical methods lec1Applied numerical methods lec1
Applied numerical methods lec1
 

Recently uploaded

Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
Kamal Acharya
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
DuvanRamosGarzon1
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
ShahidSultan24
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
MuhammadTufail242431
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
ssuser9bd3ba
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
abh.arya
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 

Recently uploaded (20)

Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 

Applied numerical methods lec10

  • 3. 3 Newton-Cotes Formulas Approximate integrand function f(x) by a polynomial that can then be easily integrated
  • 5. 5 The Trapezoidal Rule ( ) ( )dxxfdxxf b a b a ∫∫ ≅= 1I ( ) ( ) ( ) ( )( )a-x a-b afbf afxf − +=1 ( ) ( ) ( )( ) ( ) ( ) ( ) 2 bfaf abdxa-x a-b afbf afI b a + −=      − += ∫ All the Newton-Cotes formulas can be expressed in this general average height form heightaveragewidthI ×≅
  • 6. Example 1 Single Application of the Trapezoidal Rule f(x) = 0.2 +25x – 200x2 + 675x3 – 900x4 + 400x5 Integrate f(x) from a=0 to b=0.8 %....E . .. . )()( )( tt :oferroranrepresentswhich :RulelTrapezoida 58946773117280640531 17280 2 232020 80 2 ==−= = + = + −= ε bfaf abI ∫ = = == 80 0 640531 . .)(:valueintegralTrue b a dxxfI Solution: f(a)=f(0) = 0.2 and f(b)=f(0.8) = 0.232
  • 7. 7 • The accuracy can be improved by dividing the interval from a to b into a number of segments and applying the method to each segment. • The areas of individual segments are added to yield the integral for the entire interval. Using the trapezoidal rule, we get: ∫∫∫ − +++= === − = n n x x x x x x n dxxfdxxfdxxfI xbxa n ab h 1 2 1 1 0 )()()( seg.of#n 0 L       ++ − = + ++ + + + = ∑ − = − 1 1 0 12110 2 2 222 n i in nn xfxfxf n ab I xfxf h xfxf h xfxf hI )()()( )()()()()()( L The Multiple-Application Trapezoidal Rule
  • 8. 8
  • 10. 10
  • 12. 12
  • 13. Example 4 The vertical distance covered by a rocket from to seconds is given by: ∫       −    − = 30 8 89 2100140000 140000 2000 dtt. t lnx a) Use two-segment Trapezoidal rule to find the distance covered. b) Find the true error, for part (a). c) Find the absolute relative true error, for part (a).a∈ tE
  • 14. Solution a) The solution using 2-segment Trapezoidal rule is       +       ++ − = ∑ − = )b(f)iha(f)a(f n ab I n i 1 1 2 2 2=n 8=a 30=b 2 830 − = n ab h − = 11=
  • 15. Solution (cont)       +       ++ − = ∑ − = )(f)iha(f)(f )( I i 3028 22 830 12 1 [ ])(f)(f)(f 301928 4 22 ++= [ ]6790175484227177 4 22 .).(. ++= m11266= Then:
  • 16. Solution (cont) ∫       −    − = 30 8 89 2100140000 140000 2000 dtt. t lnx m11061= b) The exact value of the above integral is so the true error is ValueeApproximatValueTrueEt −= 1126611061−=
  • 17. Solution (cont) The absolute relative true error, , would bet∈ 100 ValueTrue ErrorTrue ×=∈t 100 11061 1126611061 × − = %8534.1=
  • 18. Solution (cont) Table 1 gives the values obtained using multiple segment Trapezoidal rule for n Value Et 1 11868 -807 7.296 --- 2 11266 -205 1.853 5.343 3 11153 -91.4 0.8265 1.019 4 11113 -51.5 0.4655 0.3594 5 11094 -33.0 0.2981 0.1669 6 11084 -22.9 0.2070 0.09082 7 11078 -16.8 0.1521 0.05482 8 11074 -12.9 0.1165 0.03560 ∫       −    − = 30 8 89 2100140000 140000 2000 dtt. t lnx Table 1: Multiple Segment Trapezoidal Rule Values %t∈ %a∈ Exact Value=11061 m
  • 20.
  • 22. 22
  • 23. 23
  • 24. )()( )( )( 2 2 1 212 2 2 1 2 1       ≅⇒≅ h h hEhE h h hE hE Romberg Integration Successive application of the trapezoidal rule to attain efficient numerical integrals of functions. Richardson’s Extrapolation: Uses two estimates of an integral to compute a third and more accurate approximation. sizes)stepdifferentforconstantis(assume )()()()( /)(/)()()( ) 2 ( 2 12 2211 fhOfh ab E hEhIhEhI habnnabhhEhII ′′=′′ − ≅ +=+ −=−=+= I = exact value of integral E(h) = the truncation error I(h): trapezoidal rule (n segments, step size h) Improved estimate of the integral. It is shown that the error of this estimate is O(h4). Trapezoidal rule had an error estimate of O(h2).( ) [ ])()( / )( )()( 122 21 2 22 1 1 hIhI hh hII hEhII − − +≅ += ( ) ( ) 1/ )()( )()()(/)()( 2 21 12 222 2 2121 − − ≅⇒+≅+ hh hIhI hEhEhIhhhEhI
  • 25. 25 ( ) [ ])()( 1/ 1 )( 122 21 2 hIhI hh hII − − +≅ Example 7 Evaluate the integral of f(x) = 0.2 +25x – 200x2 + 675x3 – 900x4 + 400x5 from a=0 to b=0.8. I (True Integral value) = 1.6405 Segments h Integral εtr% 1 0.8 0.1728 89.5 2 0.4 1.0688 34.9 4 0.2 1.4848 9.5 %)6.16(0.2733675.16405.1E 3675.1)1728.0( 3 1 )0688.1( 3 4 :givetocombined2&1Segments tt ==−= =−≅ ε I In each case, two estimates with error O(h2) are combined to give a third estimate with error O(h4) %)1(0.01716234.16405.1E 6234.1)0688.1( 3 1 )4848.1( 3 4 :givetocombined4&2Segments tt ==−= =−≅ ε I )2/(If 12 ⇒= hh [ ] )( 3 1 )( 3 4 )()( 12 1 )( 121222 hIhIhIhIhII −=− − +≅
  • 26. 26 Simpson’s Rules General idea: Use high order polynomials other than trapezoids to achieve more accurate integration result but using the similar amount of computation Parabola Cubic polynomial
  • 27. • More accurate estimate of an integral is obtained if a high-order polynomial is used to connect the points. These formulas are called Simpson’s rules. Simpson’s 1/3 Rule: results when a 2nd order Lagrange interpolating polynomial is used for f(x) dxxf xxxx xxxx xf xxxx xxxx xf xxxx xxxx I dxxfdxxfI x x b a b a xbxa xf ∫ ∫ ∫       −− −− + −− −− + −− −− = ≅= == 2 0 )( ))(( ))(( )( ))(( ))(( )( ))(( ))(( )()( 2 1202 10 1 2101 20 0 2010 21 20 2 Using .polynomialorder-secondais)(2where [ ] RULE1/3SSIMPSON' 2 )()(4)( 3 210 :resultsformulafollowingtheon,manipulatialgebraicandnintegratioafter ⇐ − =++≅ ab hxfxfxf h I a=x0 x1 b=x2 Simpson’s Rules
  • 29. 29
  • 30. 30 Trapezoidal vs. Simpson’s 1/3 Rule ( ) ( ) ( ) ( ) 3674671 2 8080 . . ..I = ++ = ++ ≅ 6 0.2322.45640 6 0.8f0.44f0f %.616=→== tt 0.27306671.367467-1.640533E ε Trapezoidal: Example: f(x) = 0.2 + 25x – 200x2 + 675x3 – 900x4 + 400x5 (integral between a=0 and b=0.8) ( ) ( ) ( ) 0.1728 2 0.8f0f 00.8 = + −≅I Et = 1.640533 – 0.1728 = 1.467733 εt = 89.5% Simpson’s 1/3 rule:
  • 32. 32 Multiple Application of Simpson’s 1/3 Rule
  • 35. 35
  • 37. 37
  • 38. 38 [ ] 8 )()(3)(3)( )( )()(3)(3)( 8 3 )()( 3210 3210 3 3 )( xfxfxfxf abI xfxfxfxf h I dxxfdxxfI ab h b a b a +++ −≅ +++≅ ≅= − = ∫ ∫ Simpson’s 3/8 Rule Simpson’s 1/3 and 3/8 rules can be applied in tandem to handle multiple applications with odd number of intervals Fit a 3rd order Lagrange interpolating polynomial to four points and integrate
  • 40. 40
  • 42. 42
  • 43. Gauss Quadrature • Gauss quadrature implements a strategy of positioning any two points on a curve to define a straight line that would balance the positive and negative errors. • Hence the area evaluated under this straight line provides an improved estimate of the integral.
  • 46. Method of Undetermined Coefficients • The trapezoidal rule yields exact results when the function being integrated is a constant or a straight line, such as y=1 and y=x: )()( 10 bfcafcI +≅ )( 2 )( 2 2 0 22 22 110 10 10 10 2/)( 2/)( 10 2/)( 2/)( bf ab af ab I ab cc ab c ab c abcc dxx ab c ab c dxcc ab ab ab ab − + − = − == = − + − − −=+ = − + − − =+ ∫ ∫ − −− − −− Solve simultaneously Trapezoidal rule
  • 47. 47 Derivation of the Two-Point Gauss-Legendre Formula/ • The object of Gauss quadrature is to determine the equations of the form • However, in contrast to trapezoidal rule that uses fixed end points a and b, the function arguments x0 and x1 are not fixed end points but unknowns. • Thus, four unknowns to be evaluated require four conditions. • First two conditions are obtained by assuming that the above eqn. for I fits the integral of a constant and a linear function exactly. • The other two conditions are obtained by extending this reasoning to a parabolic and a cubic functions. )()( 1100 xfcxfcI +≅
  • 49. 49 Two-Point Gauss-Legendre Formula (arbitrary a and b) ( ) ( ) bxx ax-x 2 xabab x d dd =→= =→=   −++ = 1 1 ( )∫= b a dxxfI ( ) ( ) ( ) ( ) ∫ = =       −++       −++ = 1x -1x ddd d 2 xabab d 2 xabab fI ( ) ( ) ∫       −++− = 1 1- d d dx 2 xabab f 2 ab I
  • 50. 50 Example of Two-Point Gauss-Legendre Formula ( ) 8225781264592532918525140 3 1 3 1 40 ....ff.I dd =+=                 +        − = ( ) ( )∫∫ +== 1 1- 0.8 0 dd dx0.4x0.4f0.4dxxfI ( )∫= 1 1- ddd dxxf40.I Example14: f(x) = 0.2 + 25x – 200x2 + 675x3 – 900x4 + 400x5 (integral between a=0 and b=0.8) x = 0.4 + 0.4xd dx = 0.4 dxd ( ) ( ) ( ) ( ) ( )[ ]∫ +++−+++−++= 1 1- dddddd dx0.4x0.40.4x0.40.4x0.40.4x0.40.4x0.4250.20.4 543 400900675200 2 I ( ) ( ) bxx ax-x 2 xabab x d dd =→= =→=   −++ = 1 1 )()( 1100 xfcxfcI +≅
  • 51. 51 Higher-Point Gauss-Legendre Formula ( ) ( ) ( )[ ]2d21d10d0 xfcxfcxfc ++= 40.I ( ) ( ) ( ) ( ) 44444444 344444444 21 L 44444 344444 21 444 3444 21 pointn 1-n1-n pointthree 22 pointtwo 1100 xfcxfcxfcxfc − − − ++++≅I ( )∫= 1 1- ddd dxxf40.I Example: f(x) = 0.2 + 25x – 200x2 + 675x3 – 900x4 + 400x5 (integral between a=0 and b=0.8) Three-point Gauss-Legendre formula: c0 = 0.5555556 x0 = - 0.774596669 c1 = 0.8888889 x1 = 0.0 c2 = 0.5555556 x2 = 0.774596669 ( ) ( ) ( )[ ].77459669f0.5555560f0.88888890.77459669-f0.5555560.4 ddd ++=I 1.640533
  • 52. 52
  • 54. 54 ( ) 543376.0318386.0768365.05.0 3 1 3 1 5.0 =+=            +      − = dd ffI ( ) ( ) ( )( ) ( ) 0.5405910.275778*0.55555560.494845*0.88888890.878598*0.55555565.0 90.77459666*0.55555560.0*0.888888990.77459666-*0.55555565.0 =++= ++= ddd fffI
  • 57. 57 Integration Using Matlab Approximation of Double Integrals Using Matlab
  • 59. 59
  • 61. 61
  • 62. 62