Professional Documents
Culture Documents
Numerical Analysis: Prof. Dr. Süheyla ÇEHRELİ
Numerical Analysis: Prof. Dr. Süheyla ÇEHRELİ
Numerical Analysis: Prof. Dr. Süheyla ÇEHRELİ
12
NUMERİCAL INTEGRATİON
Indefinite Integrals Definite Integrals
2
x 2 1
x dx 2 c
1
x 1
0 xdx 2
2
0
f(x)
b
Area f(x)dx
a
a b
TRAPEZOID METHOD
f(b)
f b f a
b
f(a) I f a x a dx
a ba
Trapezoid Rule
𝑓 𝑎 + 𝑓(𝑏)
𝐼 = (𝑏 − 𝑎)
2
a b
I width average height
THE MULTIPLE-APPLICATION TRAPEZOIDAL RULE
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.
ba
h n # of seg. a x0 b xn
n
x1 x2 xn
f ( x0 ) f ( x1 ) f ( x1 ) f ( x 2 ) f ( xn1 ) f ( x n )
I h h h
2 2 2
ba n 1
I
2n
f ( x 0 ) f ( x n ) 2
i 1
f ( x )
i
SIMPSON’S RULES
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)
SIMPSON’S RULES
b b
I f ( x)dx f 2 ( x)dx where f 2 ( x ) is a second - order polynomial.
a a
Using a x0 b x2
( x x1 )( x x2 ) ( x x0 )( x x2 ) ( x x0 )( x x1 )
x2
I f ( x0 ) f ( x1 ) f ( x2 )dx
x0
( x0 x1 )( x0 x2 ) ( x1 x0 )( x1 x2 ) ( x2 x0 )( x2 x1 )
ba
I f ( x0 ) 4 f ( x1 ) f ( x2 )
h
h
3 2
𝑥1 = (𝑏 + 𝑎)/2
𝒇 𝒙𝟎 + 𝟒𝒇 𝒙𝟏 + 𝒇(𝒙𝟐 )
𝑰 = (𝒃 − 𝒂) Simpson’s 1/3 Rule
𝟔
THE MULTIPLE-APPLICATION SİMPSON’S 1/3 RULE
f ( x) p3 ( x) a0 a1 x a2 x 2 a3 x3
I f x dx p3 x dx
x3 x3
x0 x0
ba
I h f x0 3 x1 3 f x2 f x3
3
h
3 8
pressure, kPa 420 368 333 326 326 312 242 207
volume, m3 0.5 2 3 4 6 8 10 11