Vous êtes sur la page 1sur 3

Konsiderojme problemin e vleres fillestare per ekuacionin diferencial

 y(x)=f(x,y), për x  [x 0 , b] , ku
 (1)
 y(x 0 )=y0
Segmenti I = [x0, b] quhet segment i integrimit te ekuacionit diferencial.

Segmenti i integrimit [x0,b] ndahet ne N pjese me anen e rrjetit te pikave nyje

x 0 < x1 < x 2 <  < x N = b (2)

Hap i integrimit ne nyjen xi quhet madhesia hi = xi+1-xi > 0, i = 0,, N - 1. ku h = (b-x0)/N

Metoda e pikes se mesit

Nje variant i permiresuar i metodes Eiler eshte metoda e pikes se mesit

 h h 
yi 1  yi  h  f  xi  , yi  fi  per i = 0,…,N-1
 2 2 

1.Te zgjidhet problemi i vleres fillestare me metoden e pikes se mesit

y  2 y  x3e2 x , 0  x  1 , y  0   1 , h  0.2

Rishkruajme ekuacionin diferencial y  x e


3 2 x
 2 y , ku f  x, y   x3e2 x  2 y
Percaktojme nyjet e integrimit
x0  0 x1  0.2 x2  0.4 x3  0.6 x4  0.8 x5  1

Per i=0

 h h 
y1  y0  h  f  x0  , y0  f 0  ;
 2 2 
Llogarisim f 0  f  x0 , y0   x0 e
3 2 x0
 2 y0  03 e20  2  2
 3  h
h  2 x0  2   h 
y1  y0  h  x0   e  2  y0   f 0   
 2  2  


1  0.2  0 +0.1 e
3 2 0 0.1

 2 1  0.1 2    0.6802

y1  y  x1  0.2  0.6802

Per i=1

 h h 
y2  y1  h  f  x1  , y1  f1  ;
 2 2 
Llogarisim f1  f  x1 , y1   x1 e
3 2 x1
 2 y1  0.23 e20.2  2  0.6802  1.355

 3  h
h  2 x1  2   h 
y2  y1  h  x1   e  2  y1   f1   
 2  2  

0.6802  0.2  0.2 +0.1 e   2  0.6802  0.1  1.355    0.4653


3 2 0.2 0.1
 
y2  y  x2  0.4  0.4653

Per i=2

 h h 
y3  y2  h  f  x2  , y2  f 2  ;
 2 2 
Llogarisim f 2  f  x2 , y2   x2 e
3 2 x2
 2 y2  0.43 e20.4  2  0.4653  0.9018

 3  h
h  2 x2  2   h 
y3  y2  h  x2   e  2  y2   f 2   
 2  2  

0.4653  0.2  0.4 +0.1 e   2  0.4653  0.1  0.9018    0.3244


3 2 0.4 0.1
 
y3  y  x3  0.6   0.3244

Per i=3
 h h 
y4  y3  h  f  x3  , y3  f3  ;
 2 2 
Llogarisim f3  f  x3 , y3   x3 e
3 2 x3
 2 y3  0.63 e20.6  2  0.3244  0.5838

 3  h
h  2 x3  2   h 
y4  y3  h  x3   e  2  y3   f3   
 2  2  

0.3244  0.2  0.6 +0.1 e   2  0.3244  0.1  0.5838    0.2349


3 2 0.6 0.1
 
y4  y  x4  0.6  0.2349
Per i=4

 h h 
y5  y4  h  f  x4  , y4  f 4  ;
 2 2 
Llogarisim f 4  f  x4 , y4   x4 e
3 2 x4
 2 y4  0.83 e20.8  2  0.2349  0.3665

 3  h
h  2 x4  2   h 
y5  y4  h  x4   e  2  y4   f 4   
 2  2  

0.2349  0.2  0.8 +0.1 e   2  0.2349  0.1  0.3665    0.1797


3 2 0.8 0.1
 
y5  y  x5  1  0.1797

Vous aimerez peut-être aussi