×   HOME JAVA NETPLOT OCTAVE Traži ...
  matematika2
Bernoullijeva diferencijalna jednadžba     DIFERENCIJALNE JEDNADŽBE     Opće rješenje diferencijalne jednadžbe


Eulerova metoda

a)
Eulerovom metodom s korakom $ 0.5$ izračunajte približne vrijednosti za

$\displaystyle y_{i}=y\left( x_{i}\right) ,\quad i=1,2,3,4,$    

gdje je $ \displaystyle y\left( x\right) $ rješenje problema početnih vrijednosti

$\displaystyle y^{\prime }=1+3x-2y,\quad
y\left( 1\right)=2.
$

b)
Eulerovom metodom s korakom $ \displaystyle0.2$ izračunajte približnu vrijednost $ \displaystyle y\left( 1\right) $ , ako je $ \displaystyle y\left( x\right) $ rješenje problema početnih vrijednosti

$\displaystyle y^{\prime }=x+y^{2},\quad y\left( 0\right)=0.
$

Rješenje.

a)
Vrijedi

$\displaystyle F\left( x,y\right)$ $\displaystyle =1+3x-2y$    
$\displaystyle x_{0}$ $\displaystyle =1,\quad y_{0}=2.$    

Za korak $ \displaystyle h=0.5$ vrijedi

$\displaystyle x_{0}=1,\quad x_{1}=1.5,\quad x_{2}=2,\quad x_{3}=2.5,\quad x_{4}=3.$    

Formula za Eulerovu metodu [*][M2, poglavlje 5.4] daje:

$\displaystyle y_{1}$ $\displaystyle =y\left( x_{1}\right) =y\left( 1.5\right) =y_{0}+0.5\left(
 1+3x_{0}-2y_{0}\right) =2+0.5\left( 1+3\cdot 1-2\cdot 2\right) =2$    
$\displaystyle y_{2}$ $\displaystyle =y\left( 2\right) =y_{1}+0.5\left( 1+3x_{1}-2y_{1}\right)
 =2+0.5\left( 1+3\cdot 1.5-2\cdot 2\right) =2.75$    
$\displaystyle y_{3}$ $\displaystyle =y\left( 2.5\right) =y_{2}+0.5\left( 1+3x_{2}-2y_{2}\right)
 =2.75+0.5\left( 1+3\cdot 2-2\cdot 2.75\right) =3.5$    
$\displaystyle y_{4}$ $\displaystyle =y\left( 3\right) =y_{3}+0.5\left( 1+3x_{3}-2y_{3}\right)
 =3.5+0.5\left( 1+3\cdot 2.5-2\cdot 3.5\right) =4.25.$    

b)
Vrijedi

$\displaystyle F\left( x,y\right)$ $\displaystyle =x+y^{2}$    
$\displaystyle x_{0}$ $\displaystyle =0,y_{0}=0$    

Za korak $ \displaystyle h=0.2$ vrijedi

$\displaystyle x_{0}=0,\quad x_{1}=0.2,\quad x_{2}=0.4,\quad x_{3}=0.6,\quad x_{4}=0.8,\quad x_{5}=1.$    

Koristeći formulu za Eulerovu metodu [*][M2, poglavlje 5.4], dobivamo

$\displaystyle y_{1}$ $\displaystyle =y_{0}+0.2\left( x_{0}+y_{0}^{2}\right) =0+0.2\left( 0+0^{2}\right)
 =0$    
$\displaystyle y_{2}$ $\displaystyle =y_{1}+0.2\left( x_{1}+y_{1}^{2}\right) =0+0.2\left(
 0.2+0^{2}\right) =0.04$    
$\displaystyle y_{3}$ $\displaystyle =y_{2}+0.2\left( x_{2}+y_{2}^{2}\right) =0.04+0.2\left(
 0.4+0.04^{2}\right) =0.12032$    
$\displaystyle y_{4}$ $\displaystyle =y_{3}+0.2\left( x_{3}+y_{3}^{2}\right) =0.12032+0.2\left(
 0.6+0.12032^{2}\right) =0.2432153$    
$\displaystyle y_{5}$ $\displaystyle =y_{4}+0.2\left( x_{4}+y_{4}^{2}\right) =0.2432153+0.2\left(
 0.8+0.2432153^{2}\right) =0.415046$    
  $\displaystyle = y\left( 1\right) .$    


Bernoullijeva diferencijalna jednadžba     DIFERENCIJALNE JEDNADŽBE     Opće rješenje diferencijalne jednadžbe