Page 81 - Numerical methods for chemical engineering
P. 81

Newton’s method for a single equation                                 67





                                            are
                                            eads initia
                            cn vered        ess  ar t
                            stins           rit t ind


                      2
                    stin                                        ve rit
                      1
                                  ve rit




                     1                                          ve et
                                  ve et
                     2
                                  1           2
                                           initia ess
                  Figure 2.4 Update function (line) of Newton’s method for various initial guesses for f (x) = (x − 3)
                  (x − 2) (x − 1). Converged solutions are plotted as dots vs. the initial guess.


                  return the root at x = 2. This demonstrates another feature of nonlinear equations: it is
                  usually very difficult to identify all solutions, and while guess after guess may yield one of
                  some particular set of solutions, this does not guarantee that there are no other solutions
                  waiting to be found. We describe here a simple technique to search for additional solutions.
                  Let us say that we have identified the roots at x = 1 and x = 3, but want to look for
                  additional solutions. We can factor these roots out formally,

                                           f (x) = (x − 1)(x − 3)g(x)                (2.25)
                  and then apply Newton’s method to solve
                                                      f (x)
                                           g(x) =             = 0                    (2.26)
                                                 (x − 1)(x − 3)
                  Here, because f (x) is a polynomial, we can obtain g(x) analytically. In general, this is
                  not possible, and g(x) must be defined as above, in a form that behaves poorly (∼0/0) at
                  x = 1 and x = 3. Care must be taken to avoid these regions, or to provide an upper limit
                  on the allowable magnitude of g(x) to avoid numerical overflow. As Figure 2.5 shows, this
                  technique finds the third root at x = 2 from any initial guess except close to x = 1 and
                  x = 3 where the algorithm terminates without convergence.


                  Formal convergence properties of Newton’s method for a
                  single equation
                  We now consider the convergence properties of Newton’s method more formally. We have
                  seen that when the initial guess is not very close to a solution, Newton’s method behaves
   76   77   78   79   80   81   82   83   84   85   86