Page 74 - Numerical Methods for Chemical Engineering
P. 74

Newton’s method for a single equation                                 63



                  where the truncation error is
                                           n
                                        1 d f         n
                                R n (x) =        (x − x 0 )  for some ζ ∈ [x 0 , x]  (2.13)
                                        n! dx  n   ζ
                  When |x − x 0 | is very small,
                                                      2         3
                                      |x − x 0 |   |x − x 0 |   |x − x 0 |  · · ·    (2.14)
                  and we expect that, unless the higher-order derivatives become very large at x 0 , the truncated
                  expansion should be a reasonable description of the local behavior of f (x) near x 0 . The
                  smaller the truncation order, in general, the nearer that we will have to be to x 0 for the
                  approximation to be accurate.



                  Newton’s method for a single equation

                  We now use this truncated Taylor series to develop an iterative technique for solving a non-
                  linear algebraic equation f (x) = 0 known as Newton’s method. To start Newton’s method,
                  we make an initial guess x [0]  of the solution that we hope is close to the true value x s where
                                                                             [0]
                  f (x s ) = 0. We use a Taylor series to approximate f (x) in the vicinity of x ,
                                                           2

                                  [0]    df       [0]    1 d f       [0] 2

                        f (x) = f x  +       x − x   +           x − x   + ···       (2.15)
                                       dx              2! dx  2
                                          x  [0]             x  [0]
                  At the solution, f (x s ) = 0, and the Taylor series yields
                                                         2

                                [0]    df       [0]     1 d f       [0] 2

                        0 = f x   +        x s − x  +          x s − x  + ···        (2.16)
                                     dx               2! dx  2
                                        x  [0]              x  [0]
                  Now, if x [0]  is sufficiently close to x s , then
                                                        2           3


                                     x s − x  [0]      x s − x  [0]      x s − x  [0]      ···  (2.17)
                                                              [0]
                  In this case, as long as the first derivative is nonzero at x , we obtain a reasonable approx-
                                      [1]
                  imation of the solution, x , from the rule

                                                [0]    df       [1]  [0]
                                        0 = f x   +        x  − x                    (2.18)
                                                    dx
                                                        x  [0]
                  Successive application of this rule yields Newton’s method for solving a single nonlinear
                  algebraic equation,
                                                              [k]
                                                          f x
                                            x [k+1]  = x [k]  −                      (2.19)
                                                         f  (1)  x  [k]
                  where we have used the notation f  (m) (x) for the mth derivative of f (x). The iterations are
                  stopped when the function value satisfies

                             f x  [k]        and/or    f x  [k]    ≤ δ rel f x  [0]    (2.20)
                                    ≤ δ abs
   69   70   71   72   73   74   75   76   77   78   79