Anda di halaman 1dari 15

Metode Numerik

Diferensiasi Numerik

Oleh : Sutrisno

Jurusan Matematika Fakultas Sains dan Matematika


Universitas Diponegoro
Semarang
A. Metode Beda Maju

 Turunan pertama f ( x) di titik x  x0 adalah

f ( x0  h)  f ( x0 )
f ( x0 )  lim
h0 h
f ( x0  h)  f ( x0 )
 Pendekatan numerik : f ( x0 ) 
h
A. Metode Beda Maju
A. Metode Beda Maju

 Ekspansi deret Taylor dari f ( x  h) di sekitar x adalah

f ( x  h)  f ( x)
f ( x)   O(h)
h
h h2
dengan O(h)  f ( x)  f ( x)  ...
2! 3!
 Rumus turunan pertama hampiran beda maju dengan error
f ( x  h)  f ( x)
O(h) adalah f ( x) 
h
A. Metode Beda Maju

 Dengan cara analog :

=
 f ( x  2h)  4 f ( x  h)  3 f ( x)
f ( x)   O(h2 )
2h
2h2
dengan O(h )  2
f ( x)  ...
3!
 Rumus turunan pertama hampiran beda maju dengan error
 f ( x  2h)  4 f ( x  h)  3 f ( x)
O(h2 ) adalah f ( x)  .
2h
B. Metode Beda Mundur

 Dengan menggunakan deret Taylor didapat:


h2 h3
f ( x  h)  f ( x)  hf ( x)  f ( x)  f ( x)  ...
2! 3!
h2 h3
f ( x  h)  f ( x)  hf ( x)  f ( x)  f ( x)  ...
2! 3!
f ( x)  f ( x  h)
f ( x)   O(h)
h
h h2
dengan O(h)  f ( x)  f ( x)  ...
2! 3!
 Rumus turunan pertama hampiran beda mundur dengan
f ( x)  f ( x  h)
error O(h) adalah f ( x)  .
h
B. Metode Beda Mundur

 Dengan menggunakan deret Taylor :


h2 h3
(*) f ( x  h)  f ( x)  hf ( x)  f ( x)  f ( x)  ...
2! 3!
4h2 23 h3
(**) f ( x  2h)  f ( x)  2hf ( x)  f ( x)  f ( x)  ...
2! 3!
Operasi 4(*) – (**) menghasilkan
3 f ( x)  4 f ( x  h)  f ( x  2h)
f ( x)   O(h2 )
2h
h2
dengan O(h )   2
f ( x)  ...
3!
 Rumus turunan pertama hampiran beda mundur dengan
3 f ( x)  4 f ( x  h)  f ( x  2h)
error O(h2 ) adalah f ( x)  .
2h
C. Metode Beda Tengah/Beda Pusat

 Dengan menggunakan deret Taylor :

 Rumus turunan pertama hampiran beda tengah dengan


f ( x  h)  f ( x  h)
error O(h2 ) adalah f ( x)  .
2h
C. Metode Beda Tengah/Beda Pusat

 Dari hasil sebelumnya :

(*)
f ( x  2h)  f ( x  2h) 1 1
(**)  f ( x)  (2h)2 f ( x)  (2h)4 f (iv) ( x)  ...
2.2h 3! 5!
Operasi 4(*) – (**) menghasilkan

=
 Rumus turunan pertama hampiran beda tengah dengan
error O(h4 ) adalah
8 f ( x  h)  8 f ( x  h)  f ( x  2h)  f ( x  2h)
f ( x)  .
12h
D. Solusi Numerik Turunan Kedua

 Diberikan deret Taylor :

 Dengan menambahkan kedua pers. di atas didapat rumus


hampiran turunan kedua dengan error

2h2 (iv)
O(h ) 
2
f ( x)  ...
4!
f ( x  h)  f ( x  h)  2 f ( x )
adalah f ( x)  2
.
h
E. Contoh Soal

Contoh 1. Taksir nilai turunan pertama dari f ( x)  x2 pada titik


x  2 dengan h  0,1.

 Hampiran beda maju :


f (2  0,1)  f (2)
O(h) : f (2)   4,1 dan
2  0,1
 f (2, 2)  4 f (2,1)  3 f (2)
O(h2 ) : f (2)  4
0, 2
 Hampiran beda mundur :
f (2)  f (1,9) 3 f (2)  4 f (1,9)  4 f (1,8)
O(h) : f (2)   3,9 dan O(h2 ) : f (2)  4
0,1 0, 2
Hampiran beda tengah/pusat :
f (2,1)  f (1,9)
O(h) : f (2)  4
0, 2
8 f (2,1)  8 f (1,9)  f (2, 2)  f (1,8)
O(h2 ) : f (2)  4
1, 2
E. Contoh Soal

Contoh 2. Taksir nilai turunan pertama dan kedua dari


f ( x)  xe x pada titik x  1 dengan h  0,1.

 Menggunakan hampiran beda tengah dengan error

O(h4 ) didapat :
8 f (1  0,1)  8 f (1  0,1)  f (1  2.0,1)  f (1  2.0,1)
f (1) 
12.0,1
 5,4365
 Taksiran nilai turunan kedua :
f (1  0,1)  f (1  0,1)  2 f (1)
f (1)  2
 8,166177
(0,1)
F. Latihan Soal

1. Diberikan data :
x f(x) b) Taksir nilai f (2) dengan
1,8 25,5337 error O(h2 )
1,9 36,9660 c) Jika rumus f sebenarnya
2 54,5981 2
adalah f ( x)  e x , hitung
2,1 82,2694 nilai eksak dari f (2) dan
2,2 126,4693 f (2) , hitung juga error
a) Taksir nilai f (2) masing-masing taksiran
dengan error O(h), pada (a) dan (b)
O(h2 ) dan O(h4 )
2. Diberikan data :
x f(x)
2 0,42298 a) Taksir nilai f (2,2) ,

2,1 0,40051 f (2,3) dan f (2,4) dengan

2,2 0,37507 error O(h4 )

2,3 0,34718 b) Taksir nilai f (2,2) ,

2,4 0,31729 f (2,3) dan f (2,4)

2,5 0,28587 dengan error O(h2 )


2,6 0,25337

Anda mungkin juga menyukai