Thursday, May 27, 2021

Given y'=-y with y(0)=1 determine the value of y at x=0.01,0.02 by Eule's method.

Given y'=-y with y(0)=1 determine the value of y at x=0.01,0.02 by Eule's method.

Solution
             
        Given,    dy/dx=-y.        ,.  Y(0)=1
      Compare,   dy/dx=f(x,y). ,.  Y(xo)=yo
   With.    


f(x,y)=-y. ,.    Xo=0    ,        yo=1
                   X1=0.01 ,.        y1=?
                   X2=0.02 ,.        y2=?


To find y(0.01)=y1
           
h = x1 - xo       
h  = 0.01 - 0     
 h = 0.01           

f(x,y) =  - y
f(0,1) = - 1

    y1=y(0.01)= yo + h  f(xo,yo)
                       = 1 + 0.01 f(0,1)
                       = 1+ 0.01 (-1)
                        =  1 - 0.01
                   y1 = 0.99


To find y(0.02) = y2

h = x2 - x1
h = 0.02 - 0.01
h = 0.01

f(x, y).     = - y
f(X1,y1) =  f(0.01,0.99)
f(X1,y1) = - 0.99


   y2 = y (0.02) = y1 + h f( X1,X2)
                         = 0.99 +0.01  (0.01,0.99)
                          = 0.99 + 0.01(-0.99)
                    y2  = 0.9801


No comments:

Post a Comment