Anda di halaman 1dari 26

METODE NUMERIK

DIFERENSIASI NUMERIK

http://maulana.lecture.ub.ac.id

Apersepsi

Diferensiasi Numerik

Pendekatan Konsep Diferensiasi

Diferensiasi Numerik

Jenis-Jenis Metode Diferensiasi

Metode Euler
Metode Runge-Kutta
Metode Taylor
Metode Adam
Metode Milne
Metode Adam-Moulton
Metode modifikasi Euler
Diferensiasi Numerik

Metode Euler

Menghitung persamaan differensial melalui


taksiran langsung dari slope xi diberi turunan
pertama.

y i 1 y i f x i , y i h

Diferensiasi Numerik

Metode Euler (Ex.)


dy
x y
Selesaikan persamaan differensial
dx

pada interval x = 0 s/d x = 1, h = . Pada


saat x = 0, nilai y = 1. Hitung kesalahan
sebenarnya!

Diferensiasi Numerik

Metode Euler (Ex.)

Untuk x = 0
y=1
Untuk x = 0,25
yi+1 = yi + f(xi, yi).h
= 1 + f(0,1).0,25
= 1 0 1 0,25
=1
Untuk x = 0,5
yi+1 = yi + f(xi, yi).h
= 1 + f(0,25;1).0,25
= 1 0,25 1 0,25
= 1,0625
Diferensiasi Numerik

Metode Euler (Ex.)

Untuk x = 0,75
yi+1 = yi + f(xi, yi).h
= 1,0625 + f(0,5;1,0625).0,25
= 1,0625 0,5 1,0625 0,25
= 1,1914
Untuk x = 1
yi+1 = yi + f(xi, yi).h
= 1,1914 + f(0,75;1,1914).0,25
= 1,1914 0,75 1,1914 0,25
= 1,3961
Diferensiasi Numerik

Metode Euler (Ex.)


x
y
0
1
0,25
1
0,5 1,0625
0,75 1,1914
1 1,3961

Diferensiasi Numerik

Metode Euler (Ex.)

Nilai eksak
dy
x y dy x y dx
dx

dy
y
y

x.dx 0

dy x dx 0

dy x dx 0
1 2
2 y x C
2
Diferensiasi Numerik

10

Metode Euler (Ex.)

Pada saat x = 0; y = 1
2 1

1 2
0 C C 2
2

Persamaan
1 2
2 y x 2
2

Diferensiasi Numerik

11

Metode Euler (Ex.)

Untuk x = 0,25
1
2

2 y 0,25 2
2
2 y 2,0325
y 1,015625
y 1,0315

Diferensiasi Numerik

12

Metode Euler (Ex.)

Untuk x = 0,5
1
2
2 y 0,5 2
2
y 1,0625
y 1,1289

Diferensiasi Numerik

13

Metode Euler (Ex.)

Untuk x = 0,75
1
2
2 y 0,75 2
2
y 1,140625
y 1,3010

Diferensiasi Numerik

14

Metode Euler (Ex.)

Untuk x = 1
1 2
2 y 1 2
2
y 1,25
y 1,5625

Diferensiasi Numerik

15

Metode Euler (Ex.)


x

yEuler ysebenarnya

0
1
0,25
1
0,5 1,0625
0,75 1,1914
1 1,3961

1
1,0315
1,1289
1,3010
1,5625

t
0%
3,0538 %
5,8818 %
8,4243 %
10,6496 %

y Euler y sebenarnya
y sebenarnya
Diferensiasi Numerik

100%
16

Metode Heun

Untuk memperbaiki Metode Euler, digunakan


Metode Heun dengan cara perbaikan dari
perkiraan nilai slopenya.
Perbaikan perkiraan slope tersebut, ditempuh
melalui nilai turunan dari slope-nya pada titik
awal. Kemudian mencari turunan slope-nya
pada titik akhir dan nilai tersebut dirataratakan.
Diferensiasi Numerik

17

Metode Heun
Langkah-langkah Metode Heun:

1.
2.

Mencari slope awal = f(xi, yi)


Slope awal pada no.1 digunakan untuk
o
ekstrapolasi nilai y , dengan rumus
i1

y i 1 y i f x i , y i h

Diferensiasi Numerik

18

Metode Heun
o

3.

Persamaan prediktor (y ) digunakan untuk


i1
|
mencari slope akhir (sebut dengan y ), dengan
i1
rumus
|

y i 1
4.

f x i 1; y i 1

Mencari slope rata-rata (sebut dengan y )


o

f x i , y i f x i 1 , y i 1

y
2
Diferensiasi Numerik

19

Metode Heun
5.

Slope rata-rata ini yang sebenarnya digunakan


untuk mengekstrapolasikan yi ke yi+1
yi+1 = yi + (slope rata-rata).h

y i 1

f x i , y i f x i 1 , y i 1

h
yi
2

Diferensiasi Numerik

20

Metode Heun (Ex.)


dy
x y
Selesaikan persamaan differensial
dx

pada interval x = 0 s/d x = 1, h = . Pada


saat x = 0, nilai y = 1. Hitung kesalahan
sebenarnya!

Diferensiasi Numerik

21

Metode Heun (Ex.)

22

Metode Heun (Ex.)

23

Metode Heun (Ex.)

24

Metode Heun (Ex.)

25

Metode Heun (Ex.)


x
0

yHeun ysebenarnya
1

0%

0,25 1,0313

1,0315

0,01939 %

0,5 1,1284

1,1289

0,0443 %

0,75 1,3001

1,3010

0,06918 %

1,5625

0,1088 %

1,5608

Diferensiasi Numerik

26

Anda mungkin juga menyukai