You are on page 1of 17

PENYELESAIAN PERSAMAAN

DIFERENSIAL ORDINER
DENGAN METODE NUMERI
Penyelesaian PD Ordiner dengan NUMERIK
Bentuk PD Ordiner
 dy d 2 y dny 
 x, y, , 2 ,........., n   0
 dx dx dx 

Penyelesaian Numerik :
- Expansi Deret Taylor
- Metode Euler
- Rhunge Kutta
- Modified Euler
- Milne
- Prediction - Corretion
* Penyelesaian dg Ekspansi Deret Taylor

Ekspansi dengan deret Taylor, utk Y pada X=X0

y ' ' ( x0)


y ( x)  y ( x0)  y ' ( x0)( x  x0)  ( x  x0) 2  ....
2!
jika x  x0  h :
y ''( x0) 2 y '''( x0) 3
y ( x)  y ( x0)  y '( x0) h  h  h
2! 3!

Peny. dg Initial Condition : x0  y 0


Contoh :
dy
Selesaikan :  x y
dx

dg IC : y ( x0)  1
x0  0
Dengan deret Taylor
x  0  y 1
Derivatif 1  y ' ( x0)  0  1  1
d  dy 
2  y ' ' ( x 0)     1  y ' ( x 0)  1  1  2
dx  dx  x 0
3  y ' ' ' ( x 0)  y ' ' ( x 0)  2
4  y iv ( x0)  y ' ' ' ( x0)  2
Dimasukkan dalam deret

2.h 2 2h 3 2h 4
y ( x1)  1  1.h     .....  error
2! 3! 4!
1 3 1 4
 1  h  h  h  h  ....  error
2

3 12
untukh  x  x0  x  0  x
1 3 1 4
y ( x)  1  x  x  x  x  ....  error
2

3 12
Jadi Peny. Dengan Tabel

x Y (numerik) Y (analitik)
0 1 1
0,1 1,1103 1,1103
0,2 1,2428 1,2429
0,3 1,3997 1,3997
0,4 1,3835 1,5836
0,5 1,7976 1,7974
2.5

2.3

2.1

1.9

1.7
Y

1.5

1.3

1.1

0.9
0 0.1 0.2 0.3 0.4 0.5
X
Metode Euler
dy
UntukPers.diff . :  f ( x, y )
dxx
Penyelesaian : y   f ( x, y) dx  c
x0
atau
x
dy
y  y 0   .dx
x0
dx
dalam bentuk umum :
xn 1
yn 1  yn   f ( x, y).dx
xn
xn 1
dy
yn 1  yn   .dx
xn
dx
yn 1  yn  yn' h  error
Jadi Pendekatan Euler
dari x0, y 0  x0  0 & y 0
x1  x0  x  0  x  diperoleh y1
y1  y0  y
 dy 
 y0    .x
 dx  xo
y0

x2  x1  x
 dy 
y2  y1    .x
 dx  xy11
:
dst
Dalam Tabel
X y
X0 0 Y0
 dy 
X1 0+Δx y1  y 0   
 dx  x0
. x
y0

 dy 
y 2  y1    . x
X2 0+2 Δx  dx  x1
y1

 dy 
yn  y n  1    . x
 dx  xn  1
xn 0+n Δx yn  1
Y
Contoh :
dy
 x  y ; Dimana y (0)  1  x(0)  0  y 0  1
dx
Dalam hal ini h= (x – x0)/N = ∆x, Diambil h=0.02, Dengan
tabel :

xn yn Y’n hy’n
0 1 1.0000 0.02
0.02 1.0200 1.0400 0.0208
0.04 1.0408 1.0808 0.0216
0.06 1.0624 1.224 0.0224
0.08 1.0848 1.1648 0.0233
0.10 1.1081
Dg 1.1003 Error = 0.0022
analitik
Runge–Kutta methods
 In numerical analysis, the Runge–Kutta
methods are an important family of implicit
and explicit iterative methods for the
approximation of solutions of ordinary
differential equations.
 These techniques were developed around
1900 by the German mathematicians C.
Runge and M.W. Kutta.
Fourth-order Runge–Kutta method
dy
 y '  f (t , y ), y (t0 )  y0
dt
 Then, the RK4 method for this problem is given by the following equations:

yn 1  yn 
1
k1  2k2  2k3  k4 
6
 where yn + 1 is the RK4 approximation of y(tn + 1), and

k1  f (tn , yn ).h
k2  f (tn 1/2 h , yn 1/2 k1 ).h
k3  f (tn 1/2 h , yn 1/2 k2 ).h
k4  f (tn  h , yn  k3 ).h
 k1 is the slope at the beginning of the interval;
 k2 is the slope at the midpoint of the interval, using slope k1 to determine the
value of y at the point tn + h / 2 ;
 k3 is again the slope at the midpoint, but now using the slope k2 to determine
the y-value;
 k4 is the slope at the end of the interval, with its y-value determined using k3.
 In averaging the four slopes, greater weight is given to the slopes at the
midpoint:

y 
1
k1  2k2  2k3  k4 
6
slope  y
h
t n 1  t n  h
given xn , yn and h  t
To calculate next points, using a same way, just changing xn and tn to xn+1 and tn+1

Example :
dy
 t  0,1 y 2 ; t 0  1,8 & y 0  0
dt
1) Δt 0,3
k1 [tn+0,1yn2]. Δt
[1,8+0,1(0)2].0,3 =0,54
k2 [(tn+ Δt/2)+0,1(yn+k1/2)2]. Δt
[(1,8+0,3/2)+0,1(0+0,54/2) 2].0,3=0,58
k3 [(tn+ Δt/2)+0,1(yn+k2/2)2]. Δt
[(1,8+0,3/2)+0,1(0+0,58/2) 2].0,3=0,59
k4 [(tn+ Δt)+0,1(yn+k3)2]. Δt
[(1,8+0,3)+0,1(0+0,59)2].0,3=0,64

Δy = 1/6 [k1+ 2k2 + 2k3 + k4]


1/6 [0,54+2. 0,58+2. 0,59+0,64) = 0,59

t1 = t0+Δt
t1 = 1,8+0,3 = 2,1

y1=y0 + Δy PR
y1=0+0,59 = 0,59
to=3 ; yo =?
Milne's Method
 A predictor-corrector method for solution of ordinary
differential equations. The third-order equations for
predictor and corrector are

 Yn+1= yn-3+ 4h/3 (2yn’ –y’n-1+ 2Y’n-2) + 0(h)5 Predictor

 Yn+1= Yn-1+ h/3 (y’n-1 + 4y’n+ y’n+1) + 0(h)5 Corrector

 Abramowitz and Stegun (1972) also give the fifth


order equations and formulas involving higher
derivatives.

You might also like