Page 80 - Numerical Analysis Using MATLAB and Excel
P. 80

Summary


               2.4 Summary

               • Newton’s (or Newton−Raphson) method can be used to approximate the roots of any linear or
                   non−linear equation of any degree. It uses the formula

                                                                 fx ) (
                                                                    n
                                                     x n +  1  =  x –  --------------- )
                                                              n
                                                                 f ' x (
                                                                     n
                   To apply Newton’s method, we must begin with a reasonable approximation of the root value.
                   In all cases, this can best be done by plotting fx()   versus  . x
               • We can use a spreadsheet to approximate the real roots of linear and non−linear equations but
                  to approximate all roots (real and complex conjugates) it is advisable to use MATLAB.
               • The MATLAB the while end loop evaluates a group of statements an indefinite number of
                   times and thus can be effectively used for root approximation.

               • For approximating real roots we can use Excel’s Goal Seek feature. We use Goal Seek when
                   we know the desired result of a single formula, but we do not know the input value which sat-
                   isfies that result. Thus, if we have the function y =  f x() , we can use Goal Seek to set the
                   dependent variable   to the desired value (goal) and from it, find the value of the indepen-
                                      y
                   dent variable   which satisfies that goal.
                                x
               • For repetitive tasks, such as finding the roots of polynomials, it is prudent to construct a tem-
                  plate (model spreadsheet) with the appropriate formulas and then enter the coefficients of the
                  polynomial to find its real roots.
               • The Bisection (or interval halving) method is an algorithm for locating the real roots of a
                   function. The objective is to find two values of x, say x 1   and x 2 , so that fx ) (  1   and fx ) (  2   have

                   opposite signs, that is, either fx (  1 )  >  0  and fx ) (  2  <  0 , or fx ) (  1  < 0  and fx ) (  2  >  0 . If any of these
                   two conditions is satisfied, we can compute the midpoint x  of the interval x ≤  1  x ≤  x 2  with
                                                                          m
                                                             x +  x
                                                               1
                                                        x m  =  ----------------- 2
                                                                2
               • We can use the Bisection Method with MATLAB to approximate one of the roots by specify-
                  ing a number of iterations using a for end or by specifying a tolerance using a while end loop
                  program.

               • We can use an Excel spreadsheet to construct a template that approximates a real root of a
                  function with the bisection method. This requires repeated use of the IF function which has
                  the =IF(logical_test,value_if_true,value_if_false)








               Numerical Analysis Using MATLAB® and Excel®, Third Edition                              2−27
               Copyright © Orchard Publications
   75   76   77   78   79   80   81   82   83   84   85