Numerical Integration - boun.edu.trweb.boun.edu.tr/ozupek/me303/integration_web.pdfIntegration = ∫...
Transcript of Numerical Integration - boun.edu.trweb.boun.edu.tr/ozupek/me303/integration_web.pdfIntegration = ∫...
11/28/2007
1
Numerical Integration
Quadrature
11/28/2007
2
Newton-Cotes Quadrature(quadrature based on polynomial interpolation)
11/28/2007
3
Integration
∫=b
adx)x(fI
The process of measuring the area under a curve.
Where:
f(x) is the integrand
a= lower limit of integration
b= upper limit of integration
f(x)
a b
y
x
∫b
a
dx)x(f
Approximate f (x) by a straight line
11/28/2007
4
Derivation of trapezoidal rule from Lagrange Polynomial
Integrate P1 to get trapezoidal rule Integrate E1 to get the truncation error/degree of precision
Approximate f (x) by a quadratic curve
11/28/2007
5
Derivation of Simpson’s rule from Lagrange Polynomial
Integrate P2 to get Simpson’s rule Integrate E2 to get the truncation error/degree of precision
Approximate f (x) by a cubic curve
11/28/2007
6
For a fair comparison of various methods use the same number of function evaluations in each method.E.g. Five evaluations in [x0,x4]
composite trapezoidal rule
composite Simpson’s rule
11/28/2007
7
11/28/2007
8
11/28/2007
9
11/28/2007
10
.
.
Apply Simpson’s Rule over each interval,
...)x(f)x(f)x(f)xx(dx)x(fb
a+⎥⎦
⎤⎢⎣⎡ ++
−=∫ 64 210
02
f(x)
. . .
x0 x2 x2M
-2
x2M
x
.....dx)x(fdx)x(fdx)x(fx
x
x
x
b
a++= ∫∫∫
4
2
2
0
∫−
+M
M
x
x
dxxf2
22
)(
⎥⎦⎤
⎢⎣⎡ ++
−+ −−− 6
)()(4)()( 21222222
MMMMM
xfxfxfxx
Composite Simpson’s Rule
hxx ii 22 =− −
Then
...)x(f)x(f)x(fhdx)x(fb
a+⎥⎦
⎤⎢⎣⎡ ++
=∫ 642 210
...)x(f)x(f)x(fh +⎥⎦⎤
⎢⎣⎡ ++
+6
42 432
⎥⎦⎤
⎢⎣⎡ ++
+ −−
6)()(4)(2 21222 MMM xfxfxfh
Composite Simpson’s Rule
∫b
adx)x(f { }[ ]...)(...)()(4)(
3 12310 +++++= −Mxfxfxfxfh
{ } )}]()(...)()(2... 22242 MM xfxfxfxf +++++ −
( )⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡++= −
=−∑ )()(4)(
3 2121
22 ii
M
ii xfxfxfh
11/28/2007
11
Recursive Rules
11/28/2007
12
11/28/2007
13
11/28/2007
14
Romberg Integration
recall that
11/28/2007
15
Romberg IntegrationThe pattern for integration rules of increasing accuracy is of the form:
.....
Romberg Integration relies on Richardson’s extrapolation
11/28/2007
16
⇓
11/28/2007
17
11/28/2007
18
Gauss Quadrature
11/28/2007
19
Basis of the Gaussian Quadrature Rule
Previously, the Trapezoidal Rule can be developed by the methodof undetermined coefficients as:
)b(fc)a(fcdx)x(fb
a21 +≅∫
)b(fab)a(fab22−
+−
=
Basis of the Gaussian Quadrature Rule
The two-point Gauss Quadrature Rule is an extension of the Trapezoidal Rule approximation where the arguments of the function are not predetermined as a and b but as unknownsx1 and x2. In the two-point Gauss Quadrature Rule, the integral is approximated as
∫=b
adx)x(fI )x(fc)x(fc 2211 +≈
11/28/2007
20
To find wi, xi we need four conditions = find wi, xi so that the integration rule has degree of precision 3
11/28/2007
21
11/28/2007
22