Page 146 - Excel for Scientists and Engineers: Numerical Methods
P. 146

CHAPTER 6                  DIFFERENTIATION                           I23



               Concerning the Choice of Ax
               for the Finite-Difference Method

                   In preceding sections, the x + Ax used for the calculation of the derivatives
               was calculated by multiplying x by  1.00000001. Thus Ax is a "scaled" increment.
               An  alternative  approach  would  have  been  to  use  a  constant  Ax  of,  e.g.,
               0.0000000 1. Either approach has its advantages and disadvantages.
                   The constant-increment method eliminates the need to handle the case of x = 0
               separately.  However,  the  method  fails  when  x is  very  large,  e.g.,  10'.  The
                scaled-increment  method  handles  a wide  range  of x  values,  but  fails  in  some
               special cases, such as for sin x when x = 1000.
                   You should be aware of these  limitations when  using the dydx and d2ydx2
                custom functions.
   141   142   143   144   145   146   147   148   149   150   151