Page 96 - Standard Handbook Of Petroleum & Natural Gas Engineering
P. 96

Numerical  Methods   85

                   therefore

                          1
                     AY  = 2    +By,)

                   and


                     YI  =  YO   + 'Y
                     Another improvement  on the basic  Euler method is  to approximate the slope
                   in  the middle  of  the interval by  the average of  the slopes at the end points, or





                   This form is  a closed-type formula since it  does not allow direct steps from xi to
                   xirl, but  uses  the basic  Euler's  method  to  estimate yitl, thus











                     The Runge-Kutta  method  takes  the  weighted  average  of  the  slope at  the  left
                   end point of  the interval  and at some intermediate point. This method  can be
                   extended to  a fourth-order procedure with  error 0   AX)^  and is  given  by





                   where  Ayo  = f(xi, y,)Ax













                   Runge-Kutta formulas of  the sixth and eighth orders are also available, but less
                   commonly  used.
                     If  two  values  of  yi+l are calculated, yi+l by  using  one step between  xi and xi+l
                   with Ax,  and  y,,,  by  taking two steps with Ax/2,  the estimate of the truncation
                   error is
   91   92   93   94   95   96   97   98   99   100   101