Tujuan Formula Diferensiasi Numerik

2 Pengembangan Deret Tylor untuk mendapatkan formula diferensial numerik dilakukan dengan memanipulasi koefisien-koefisien suku deret kemudian dilanjutkan dengan operasi penjumlahan atau pengurangan untuk mendapatkan formulasi yang dikehendaki. Berikut adalah contoh penurunan formula Diferensial-Pusat 3 Titik DP3 dengan deret Tylor : Penyusunan kembali persamaan 1.5 diperoleh persamaan : Formula pendekatan turunan pertama berdasarkan persamaan 1.6 adalah: dengan kesalahan pemotongan suku = Diferensial-pusat berarti nilai absis yang akan dicari turunannya berada di pusat atau ditengah-tengah lihat Gambar 1. Penurunan formula diferensial numerik melalui metode ekspansi Lagrange dilakukan dengan menurunkan langsung persamaan 1.2 sesuai dengan orde turunannya. Ekspansi Lagrange biasanya digunakan untuk menurunkan formula diferensial- ke depan forward atau diferensial ke belakang backward. ......... x f h x f h x hf x f h x f       3 3 2 3 2 ......... x f h x f h x hf x f h x f       3 3 2 3 2 1.5 ......... x f h x hf h x f h x f       3 2 3 2 2 x-h x x+h fx x fx fx+h fx-h Gambar 1. Diferensial-Pusat 3 Titik Titik yang dicari nilai turunannya 1.6 ........ x f h h h x f h x f x f       3 3 2 1.7 h h x f h x f x f 2     ........ x f h  3 3 3 Tabel 1 menunjukkan formula diferensial numerik untuk orde satu sampai orde empat yang diperoleh dengan pengembangan deret Tylor maupun deret Lagrange. Tabel 1. Formula diferensial numerik a. Diferensial Pertama b. Diferensial orde tinggi DP3 Tititik 3 Pusat Difrensial 2 h h fx fx 2 h fx x f      DP5 Tititik 5 Pusat l Diferensia 2 12h 2h fx h fx 16 fx 30 h fx 16 2h fx x f           DD3 Titik 3 Depan ke l Diferensia 2h 2h fx h fx 4 fx 3 x f       DB3 Titik 3 Belakang ke l Diferensia 2h 2h fx h fx 4 fx 3 x f      2 h fx 2 h fx 5 2h fx 4 3h fx x f         2 h 3h fx 2h 4fx h 5fx 2fx x f        DP5 Titik 5 Pusat l Diferensia 12h 2h fx h fx 8 h fx 8 2h fx x f         DP3 Titik 3 Pusat l Diferensia 2h h fx h fx x f     3 8h 3h - fx h x f h x f h fx 2h fx 3h fx x 3 f             2 8 13 13 8 3 2h 4h x h x f h fx h fx fx x 3 f           3 3 14 2 24 18 5 3 2h 4h x h x f h fx h - fx fx x 3 f         3 3 14 2 24 18 5 4 6h 3h - fx h x f h x f x f h fx 2h fx 3h fx x 4 f              2 12 39 56 39 12 4 h 5h 2fx - 4h x f h x f h fx h fx - fx x 4 f          11 3 24 2 26 14 3 4 h 5h 2fx - 4h x f h x f h fx h - fx - fx x 4 f         11 3 24 2 26 14 3 4

1.3. Contoh Kasus Kasus 1 :

Suatu gerak osilasi teredam ringan mempunyai persamaan gerak : dengan xt simpangan dalam cm dan t waktu dalam detik. Tentukan kecepatan dan percepatan gerak osilator setiap kenaikan 0,01 detik dari 0 sampai 10 detik. Nyatakan hasilnya dalam bentuk grafik vt vs t dan at vs t. Gambarkan pula grafik simpangannya sebagai fungsi waktu dalam satu layar. Gunakan metode diferensial pusat 5 titik DP5. Penyelesaian :  Formulasi numerik : Simpangan  xt = fx ; Kecepatan  vt = f’x ; Percepatan  at = f ’’ x  Algoritma :

a. definisikan fungsi xt dengan perintah inline

b. beri nilai waktu awal t o = 0, waktu akhir t a = 10 dan kenaikkan waktu h = 0,01 c. beri nilai rentang waktu t = t o : h : t a d. untuk nilai t = t o : h : t a hitunglah : vt, at dan xt e. tampilkan nilai t, vt, at dan xt dalam bentuk matriks kolom f. buat grafik hubungan antara xt vs t , vt vs t dan at vs t dalam satu layar dengan perintah subplot  Diagram Alir :  Listing Program : t cos e t x t ,  4 5 5   2 12 2 16 30 16 2 12 2 8 8 2 h h t x h t x t x h t x h t x t a h h t x h t x h t x h t x t v                   Definisikan fungsi x to = 0; ta = 10; h = 0.01 t = to : h : ta Untuk t = to : h : ta hitung: v, a dan xt Tampilkan [ t’ v’ a’ xt’ ] MULAI Buat Grafik : xt vs t; v vs t dan a vs t AKHIR 5 x=inline5exp-0.5t.cos2pit,t; t0=0; ta=10; h=0.01; t=t0:h:ta; v=xt-2h-8xt-h+8xt+h-xt+2h.12h; a=-xt-2h+16xt-h-30xt+16xt+h-xt+2h.12h.2; xt=xt; [t xt v a] subplot1,3,1,plott,xt,b xlabeltdetik ylabelxcm grid on subplot1,3,2,plott,v,r xlabeltdetik ylabelvcmdet grid on subplot1,3,3,plott,a,k xlabeltdetik ylabelacmdet2 grid on  Keluaran Program Angka-angka : 0.0000 ……………… ……………… ……………… ……………… ……………… ……………… ……………… 9.9700 0.0336 0.0235 -1.3581 9.9800 0.0338 0.0099 -1.3511 9.9900 0.0338 -0.0035 -1.3390 10.0000 0.0337 -0.0168 -1.3216 Grafik : Kasus 2 : 2 4 6 8 10 -4 -3 -2 -1 1 2 3 4 5 tdetik x c m 2 4 6 8 10 -30 -20 -10 10 20 30 tdetik v c m d e t 2 4 6 8 10 -200 -150 -100 -50 50 100 150 200 tdetik a c m d e t2