Integrasi Numerik
1
Integrasi Numerik
2
Newton-Cotes Rule
Newton-Cotes Rule:
One Point Rule (Aturan segiempat, n=1)
Q0 ( x) f ( x1 )
f ( x) x2 x2
Q0 ( x)
x1
f ( x)dx
x1
Q0 ( x) dx
x2
x1 x2
h
x1
f ( x)dx h f ( x1 )
3
Newton-Cotes Rule:
Two Point Rule (Aturan Trapesium, n=2)
f ( x) x2
f ( x)dx 12 h f ( x1 ) f ( x2 )
Q1 ( x) x1
x1 x2
h
7
Contoh
Newton-Cotes Rule (n=1 dan n=2)
/2
Penyelesaian:
Aturan segi-empat: h / 4
/2
I
/4
sin xdx sin 0.5554
4 4
Aturan Trapesium: h / 4
/2
1
I
sin xdx 2 4 sin 4 sin 2 0.6704
/4
4
Newton-Cotes Rule:
Three Point Rule (Aturan Simpson, n=3)
Q2 ( x)
f ( x)
x1 x2 x3
h h
9
Newton-Cotes Rule:
Three Point Rule (Aturan Simpson, n=3)
10
5
Newton-Cotes Rule:
Three Point Rule (Aturan Simpson, n=3)
Q2 ( x)
F ( x) f ( x)
h 0 h x1 x2 x3
h h h h
x3 h
f ( x )dx F ( x )dx ………….. II
x1 h
F ( x) f ( x x1 h) 2h x3 x1
11
Newton-Cotes Rule:
Three Point Rule (Aturan Simpson, n=3)
F ( x)dx w f ( x ) w
h
1 1 2 f ( x2 ) w3 f ( x3 )
Misal F ( x) 1, maka :
h
h
dx 2h w1 w2 w3
w1 w2 w3 2h .....……. (a)
12
6
Newton-Cotes Rule:
Three Point Rule (Aturan Simpson, n=3)
Misal F ( x) x, maka :
h
h
xdx 0 w1 (h) w2 0 w3 h
Newton-Cotes Rule:
Three Point Rule (Aturan Simpson, n=3)
w1 w3 13 h
w2 43 h
sehingga:
h
F ( x )dx 13 hF ( h ) 43 hF ( 0 ) 13 hF ( h )
h
14
7
Newton-Cotes Rule:
Three Point Rule (Aturan Simpson, n=3)
x3
1 4 1
f ( x)dx 3 h f ( x1 ) 3 h f ( x2 ) 3 h f ( x3 )
x1
15
B
f ( x)dx hf ( A) ; h B A
A
B
f ( x)dx 12 h f ( A) f ( B) ; h B A
A
B
f ( x)dx 13 h f ( A) 4 f ( A2 B ) f ( B ) ; h B A / 2
A
16
8
Contoh
Three Point Rule (Aturan Simpson, n=3)
/2
Dekati nilai integral: I
sin xdx
/4
Penyelesaian:
Aturan Simpson
1
h
8
I
38
sin 4 4sin 38 sin 2
0.7072
Diintegralkan menjadi:
x2 x2
2 3
f ( x)dx xf ( x ) 1
1
( x x1 ) f '( x1 ) ( x x1 ) f "( x1 )
1
2 6
x1 x1
18
9
Kesalahan Pada Aturan Trapesium
1
2
h 2 f '( x1 ) 12 hf ( x2 ) 12 hf ( x1 ) 14 h3 f "( x1 ) (c)
Substitusi (c) ke (a), diperoleh:
x2
Pemotongan dgn aturan trapesium
19
f ( x)dx 1
3
hf (h) 43 hf (0) 13 hf ( h) f iv ( x)
h = constant coefficient
1 5 iv
Dominant error pada aturan Simpson = h f ( x)
90
20
10
Ringkasan Newto-Cotes Rule
n C0 w1 w2 w3 w4 w5 C1 k Nama
1
1 2
1 1 1 Aturan Segi-empat
1
2 121
2 1 1 2 Aturan Trapesium
1 1
3
3 1 4 1 90 4 Aturan Simpson
3 3
8 80
4 1 3 3 1 4 Aturan 4-titik
2 8
45 945
5 7 32 12 32 7 6 Aturan 5-titik
21
f ( x)dx 1
2
h f ( A) 2 f ( A h) 2 f ( A 2h) 2 f ( B h) f ( B)
A
B k 1
f ( x)dx 12 h f ( A) f ( B ) h f ( A ih)
i 1
A
22
11
Contoh
Aturan Trapesium Berulang
Penyelesaian:
1
h
I
2 12
sin 4 sin 2 12 sin 3 sin 512
12
0.7031
Catatan :
• Penyelesaian eksak: I = 0.7071
• Jika digunakan Aturan Trapesium diperoleh I = 0.6704
23
B
f ( A) 4 f ( A h) 2 f ( A 2h) 4 f ( A 3h)
f ( x)dx 13 h
A
2 f ( B 2h) 4 f ( B h) f ( B )
B k 1 k 2
f ( x )dx 13 h f ( A) f ( B ) 43 h
i 1,3,5,...
f ( A ih) 23 h
i 2,4,6,...
f ( A ih )
A
24
12
Contoh:
Dekati nilai integral:
/2
I sin xdx dengan Aturan Simpson Berulang dengan k = 4
/4
Penyelesaian
I
1
sin 4 sin 2 34 16 sin 516 sin 716 32 16 sin 38
h 3 16
16
0.7071
25
Gauss-Legendre Rule
13
Gauss-Legendre Rule
f ( x)dx w f (x )
i 1
i i
a
Dengan pendekatan polinomial akan diperoleh 2n persamaan
yang akan memberikan nilai eksak untuk f(x) berderajat 2n-1
Jika menggunakan Aturan Newton-Cotes, dengan
menggunakan jumlah titik sampel yang sama, hanya akan
diperoleh solusi eksak untuk f(x) sampai derajat n-1 atau n (jika
n genap).
Meskipun batas integral a dan b diketahui, namun
pengembangan aturan ini akan sangat sederhana jika
digunakan batas 1. Ini bukan merupakan batas umum metode
ini tetapi batas aktual dapat diperoleh dengan transformasi
sederhana.
27
Gauss-Legendre Rule
Aturan Satu Titik (Aturan Titik Tengah, n=1)
-1 0 1 x
1
f ( x)dx 2 f (0)
1
28
14
Gauss-Legendre Rule
Aturan Dua Titik (n=2)
f ( x)
1
Q0 ( x)
f ( x)dx w f ( x ) w
1
1 1 2 f ( x2 )
29
Gauss-Legendre Rule
Aturan Dua Titik (n=2)
15
Gauss-Legendre Rule
Aturan Dua Titik (n=2)
1
f ( x)dx f 1
3
3
3 f 1
3
Contoh:
1
Dekati nilai I ( x 3 2 x 2 1)dx
1
Gauss – Legendre.
dengan Aturan Dua Titik 10
3
Penyelesaian:
I 19 3 23 1 1
9
3 23 1 ※ Solusi eksak =
10
3
103
31
Gauss-Legendre Rule
Aturan Tiga Titik (n=3)
w1 w3 ; x1 x3 ; x2 0
16
Gauss-Legendre Rule
Perubahan Batas Integral
(b a )t (b a )
x
b 1 2
f ( x)dx F (t )dt
a 1 (b a )
dx dt
2
33
Penyelesaian:
Dengan menggunakan persamaan (a) dan (b) dapat dihitung:
3t 5
x dan dx 32 dt
2 1
3
sehingga masalah ditransformasikan menjadi: I (3t 5) cos12 (3t 5)dt
4 1
17
Integral Ganda
f ( x, y )
I f ( x, y)dxdy
R
f ( x, y )dxdy w w
i 1 j 1
i j f ( xi , y j )
R
x
35
Integral Ganda
k R
y1
h
x1 x2 x
Aplikasi Aturan Trapesium
y2 x2
f ( x, y )dxdy 14 hk f ( x1 , y1 ) f ( x1 , y2 ) f ( x2 , y1 ) f ( x2 , y2 )
y1 x1
36
18
Integral Ganda
4 f ( x1 , y2 ) 16 f ( x2 , y2 ) 4 f ( x3 , y2 )
f ( x1 , y3 ) 4 f ( x2 , y3 ) f ( x3 , y3 )
37
3 2
Dekati integral I
1 1
xy (1 x)dxdy
Dengan Aturan Trapesium dan Aturan Simpson!
Penyelesaian
Aturan Trapesium: h = 1, k = 2
I 1
2 f (1,1) f (2,1) f (1,3) f (2,3)
12 (2 6 6 8)
38
19
Contoh Integral Ganda
I 18
1
f (1,1) 4 f (1.5,1) f (2,1)
4 f (1, 2) 16 f (1.5, 2) 4 f (2, 2)
15.3333
39
Tugas:
Turunkan pendekatan integral dua-dimensi dengan:
• Aturan Gauss-Legendre, n=2
• Aturan Gauss-Legendre, n=3
40
20