Professional Documents
Culture Documents
Finite Difference
Finite Difference
+ +
' '
+
'
+ =
!
) (
) (
! 2
) (
) ( ) )( ( ) ( ) (
0
0
) (
2
0
0 0 0 0
n
x x
x f
x x
x f x x x f x f x f
n
n
... ) (
!
) (
.... ) (
! 2
) ( ' '
) (
! 1
) ( '
) ( ) (
2
+ + + + + =
n
n
a x
n
a f
a x
a f
a x
a f
a f x f
n
n
i
n
i i i i
R
n
x
x f
x
x f
x
x f x f x f +
A
+ +
A
' '
+
A
'
+ =
+
!
) (
! 2
) (
! 1
) ( ) ( ) (
2
1
i i
x x x = A
+1
Kesalahan yang dihasilkan dari penggunaan
suatu aproksimasi pengganti prosedur
matematika yang eksak
Contoh: approksimasi dengan deret Taylor
Kesalahan:
) 1 (
) 1 (
)! 1 (
) (
+
+
A
+
=
n
n
n
x
n
f
R
Kesalahan pemotongan
Aproksimasi orde ke nol (zero-order appr.)
) ( ) (
1 i i
x f x f ~
+
Aproksimasi orde ke satu (first-order appr.)
! 1
) ( ) ( ) (
1
x
x f x f x f
i i i
A
'
+ ~
+
Aproksimasi orde ke dua (second-order appr.)
! 2
) (
! 1
) ( ) ( ) (
2
1
x
x f
x
x f x f x f
i i i i
A
' '
+
A
'
+ =
+
Recall the Taylor Series
( ) ( ) ( )
( ) ( )
( )
f x f x f x h
f x
h
f x
h
f x
n
h R
where h step size x x
i i i
i i
n
i n
n
i i
+
+
+
+
~ + + +
+
= =
1
2 3
1
2 3
'
' '
!
' ' '
!
!
. . . . . .
Finite difference method -1
The Taylor series
+ + + + =
+
' ' '
3
' '
2
'
1
3 2
i i i i i
f
!
x
f
!
x
xf f f
A A
A
(1)
(2)
Forward
difference
+
A
+
A
+ =
A
+
x
f f
i i
A
Backward finite
difference
7
1
1 8
1
=
x
f f
i i
A
Central
difference
13
2
1 27
2
1 1
=
+
x
f f
i i
A
4
th
order finite
Central difference
12
12
8 8
2 1 1 2
=
+ +
+ +
h
f f f f
i i i i
Exercise: Calculate above four types of finite
differences under condition of f(x)=x, x=1, x=2