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

68    Mathematics









                   as  long  as  there  are  sufficient  powers  of  x  in  the  denominator  to  cancel  any
                   nearby poles. Bulirsch and Stoer [16] give a Neville-type algorithm that performs
                   rational  function  extrapolation  on  tabulated  data








                   starting with  Ri = yi and returning  an estimate  of  error,  calculated  by  C  and D
                   in  a manner  analogous  with Neville’s algorithm  for polynomial  approximation.
                     In  a  high-order  polynomial,  the  highly  inflected  character  of  the  function
                   can  more  accurately  be  reproduced  by  the  cubic spline function.  Given  a  series
                   of  xi(i = 0,  1, . . ., n) and corresponding  f(xi), consider  that  for  two  arbitrary
                   and adjacent  points  xi and xi+j, the  cubic  fitting  these  points  is


                     Fi(x)  = a,  + aix + a2x2 + a,x3
                           (x, I x I Xi+J

                     The  approximating cubic  spline function  g(x) for  the  region  (xo I I xn) is
                                                                              x
                   constructed  by  matching  the first  and  second derivatives (slope and curvature)
                   of  Fi(x) to  those  of  Fi-l(x), with  special  treatment  (outlined below) at  the  end
                   points,  so that  g(x) is  the  set  of  cubics  Fi(x), i  = 0,  1, 2,  . . ,, n  - 1, and  the
                   second  derivative  g“(x) is  continuous  over  the  region.  The  second  derivative
                   varies  linearly  over  [x,,xn] and at  any  x (x, 5  x I x,+,)

                                     x - x,
                      g”( x) = g”( x, ) + - [g”(xi+l) - g”(x, )I
                                    X~+I - Xi
                   Integrating  twice  and  setting  g(xi) =  f(xi) and  g(xCl) =  f(xi+l), then  using  the
                   derivative  matching  conditions

                     Fi(xi)  = F;+,(xi) and  F:(xi)  = FY-l(xi)
                   and  applying  the  condition  for  i  =  [l, n  - 11  finally  yields  a  set  of  linear
                   simultaneous  equations  of  the  form
   74   75   76   77   78   79   80   81   82   83   84