Zeros of Nonlinear Equations:
Computational Comparisons
Test your code using three test function examples given below, but your programs should be fairly general and NOT tailored to these examples.
^{*}A programming language system (like C or Fortran or their variants) may be substituted for the MATLAB system if preferred.
with absolute tolerance tolabs = 0.5e - 7 for all subroutines and tolrel = 10*deps where deps is the double precision machine epsilon (found for Computer Problem#1) for the relative tolerance scale. Iteration limit is kmax = 80 (i.e., abort current function case with message if k > kmax) and the Tolerance Lower Limit for Derivative, |f'(x)| > told, Divide Check is told = 0.5E - 10.
for all iterates displaying 5 significant digits. The item (f'(xold)) is only used for the Newton's method. Give the starting value for both xnew and f(xnew) for the appropriate comparison method. Here, kfeval is total number of function evaluations for current test function. The abs(xnew-xold) and f(xnew) items of the table should be printed in e-notation, because errors should almost always be in e-notation.
Email Comments or Questions (MCS 471 only, please) to hanson A T uic edu