Komputasi 10
Komputasi 10
Diferensiasi
Komputasi Statistika
(Sesi 10)
Pokok Differencing
01
Bahasan Numerical Differentiation
Metode Interpolasi
02 Numerical Differentiation
Ekstrapolasi Richardson
04 Diferensiasi Numerik
Metode Differencing
Diferensiasi Numerik
Metode Differencing
Definisi
Merupakan metode aproksimasi yang diturunkan dari Ekspansi
Deret Taylor
● Backward
● Centered
Metode Differencing
> # Metode Differencing
> # Forward Differencing
Contoh 1 > ff = function(x, h, f)
(f(x+h)-f(x))/h
> # Backward Differencing
Tentukan turunan pertama > fb = function(x, h, f) (f(x)-
dari fungsi berikut (untuk f(x-h))/h
> # Centered Differencing
x=3) > fc = function(x, h, f)
(f(x+h)-f(x-h))/(2*h)
> x = 3
f1 = 4X2 + 3X + 6 > h = 0.01
f2 = 3X3 + 2X2 + 3X + 5
f3 = log(X)
Metode Interpolasi
Diferensiasi Numerik
Metode Interpolasi
Definisi
Merupakan Interpolasi Lagrange Polinomial
Dengan
• l’(x) adalah fungsi pengganda lagrange dari
•
Metode Interpolasi
Untuk n=1 dan k=0
Prosedur Interpolasi menghasilkan turunan pertama
Dengan x1 = x0 + h
dengan
dengan
Metode Undetermined Coefficient
> #
Contoh 1
f1 = 4X2 + 3X + 6
f2 = 3X3 + 2X2 + 3X + 5
f3 = log(X)
Fungsi Differensiasi
Didalam R
Fungsi Diferensiasi dalam R
Fungsi deriv dan D
● Input untuk fungsi ini adalah objek bertipe expression
Contoh 2
f1 = 4X2 + 3X + 6
f2 = 3X3 + 2X2 + 3X + 5
f3 = log(X)
Hatur Nuhun
bertho@unpad.ac.id