Está en la página 1de 12

Rezolvarea ecuatiilor diferentiale de ordinul I

 dy ( x)
 y   f ( x, y )
 dx
 y ( x A )  y A

Domeniul de calcul x  [ x A , xB ]
Rezolvarea ecuatiilor diferentiale de ordinul I
Runge Kutta ordin II
K1  f ( xi , yi ) h
y i 1  yi   K1  K 2 
K 2  f  xi  h, yi  hK1  2

Metoda Ralston
K1  f ( xi , yi )
1 2 
y i 1  yi  h  K1  K 2 
 3 3  3 3 
K 2  f  xi  h, yi  hK1 
 4 4 
Runge Kutta ordin IV
K1  f ( xi , yi )
 h h 
K 2  f  xi  , yi  K1 
h
 2 2  y i 1  yi   K1  2 K 2  2 K 3  K 4 
 h h  6
K 3  f  xi  , yi  K 2 
 2 2 

K 4  f  xi  h, yi  hK 3 
Rezolvarea ecuatiilor diferentiale de ordinul I
Aplicatie

dy
 f ( x, y )  y  sin( x) x  [ x A , xB ]
dx
y ( x A )  ysa ( x A )

Sa se determine in punctele xi valorile lui yi pentru:


- Runge Kutta ordin II
- metoda Ralston
- Runge Kutta ordin IV.

Punctele sunt distribuite unifom pe intervalul [xA,xB] pentru i=1..N cu


N=3
Formule de calcul
Ecuatiilor diferentiale de ordinul I – formule de calcul

Pasul grilei de calcul h

xB  x A
h  ...
N 1
Calculul coordonatelor xi din grila de calcul xi  x A  (i  1)  h
x1  xA  (1  1)  h  x A  ...
x2  x A  (2  1)  h  ...
x3  x A  (3  1)  h  xB  xN  ...
Rezolvarea ecuatiilor diferentiale de ordinul I
Metoda Runge Kutta ordin II - calcul
K1  f ( xi , yi ) h
y i 1  yi   K1  K 2 
K 2  f  xi  h, yi  hK1  2

Notatie: yi 1  y RK 2i1

Punctul de start x1 si y1 este dat y 1  y RK 21  ...

Punctul x2 si y2 (i=1):

K1  f ( xi , yi ) K1  f ( x1 , y RK 21 )  ...
K 2  f  xi  h, yi  hK1  
K 2  f x1  h, y RK 21  hK1  ... 
h h
y i 1  y RK 2i1  yi   K1  K 2  y 2  y RK 22  yRK 21   K1  K 2   ...
2 2
Rezolvarea ecuatiilor diferentiale de ordinul I
Metoda Runge Kutta ordin II - calcul

Punctul x3 si y3 (i=2):

K1  f ( xi , yi ) K1  f (...  ...
K 2  f  xi  h, yi  hK1  K 2  f (...  ...

h
y i 1  y RK 2i1  yi   K1  K 2  y 3  y RK 23  y RK 22  ...  ...
2
Rezolvarea ecuatiilor diferentiale de ordinul I
Metoda Ralston - calcul
K1  f ( xi , yi )
1 2 
y i 1  yi  h  K1  K 2 
 3 3  3 3 
K 2  f  xi  h, yi  hK1 
 4 4 
Notatie: yi 1  y Ri1

Punctul de start x1 si y1 este dat

Punctul x2 si y2 (i=1):

K1  f ( xi , yi ) K1  f ( x1 , y R1 )  ...
 3 3   3 3 
K 2  f  xi  h, yi  hK1  K 2  f  x1  h, yR1  hK1   ...
 4 4   4 4 
1 2  1 2 
y i 1  y Ri1  yi  h  K1  K 2  y 2  y R2  yR1  h  K1  K 2   ...
3 3  3 3 
Rezolvarea ecuatiilor diferentiale de ordinul I
Metoda Runge Kutta ordin II - calcul

Punctul x3 si y3 (i=2):

K1  f ( xi , yi ) K1  f (...  ...
K 2  f  xi  h, yi  hK1  K 2  f (...  ...

1 2  y 3  y R3  y R2  ...  ...
y i 1  y Ri1  yi  h  K1  K 2 
3 3 
Rezolvarea ecuatiilor diferentiale de ordinul I
Metoda Runge Kutta ordin IV - calcul
K1  f ( xi , yi )
 h h 
K 2  f  xi  , yi  K1 
 2 2 
h
 h h  y i 1  yi   K1  2 K 2  2 K 3  K 4 
K 3  f  xi  , yi  K 2  6
 2 2 
K 4  f  xi  h, yi  hK 3  Notatie: yi 1  y RK 4i1

Punctul de start x1 si y1 este dat y 1  y RK 41  ...

Punctul x2 si y2 (i=1):

K1  f ( xi , yi ) K1  f ( x1 , y RK 41 )  ...
K 2  f  xi  h, yi  hK1  
K 2  f x1  h, y RK 41  hK1  ... 
h h
y i 1  y RK 4i1  yi   K1  2 K 2  2 K 3  K 4  y 2  y RK 22  yRK 21   K1  K 2   ...
6 2
Rezolvarea ecuatiilor diferentiale de ordinul I
Metoda Runge Kutta ordin IV - calcul

Punctul x2 si y2 (i=1):

K1  f ( xi , yi ) K1  f ( x1 , yRK 41 )  ...
 h h   h 
K 2  f  xi  , yi  K1  K 2  f  x1  h, yRK 41  K1   ...
 2 2   2 
 h h   h h 
K 3  f  xi  , yi  K 2  K 3  f  x1  , y RK 41  K 2   ...
 2 2   2 2 

K 4  f  xi  h, yi  hK 3 

K 4  f xi  h, y RK 41  hK 3  ... 

h h
y i 1  y RK 4i1  yi   K1  2 K 2  2 K 3  K 4  y 2  y RK 42  yRK 41   K1  2 K 2  2 K 3  K 4 
6 6
Rezolvarea ecuatiilor diferentiale de ordinul I
Metoda Runge Kutta ordin IV - calcul

Punctul x3 si y3 (i=2):

K1  f ( xi , yi )
K1  f ( x2 , yRK 42 )  ...
 h h 
K 2  f  xi  , yi  K1  K 2  f (...  ...
 2 2 
 h h  K 3  f (...  ...
K 3  f  xi  , yi  K 2 
 2 2  K 4  f (...  ...

K 4  f  xi  h, yi  hK 3 

h
y i 1  y RK 4i1  yi   K1  2 K 2  2 K3  K 4  y 3  y RK 43  ...
6

También podría gustarte