Pre-Engineering 220 Introduction to MatLab ® & Scientific Programming j kiefer



Download 8.69 Mb.
Page25/128
Date02.05.2018
Size8.69 Mb.
#47255
1   ...   21   22   23   24   25   26   27   28   ...   128
Care must be taken that not be too small, which would cause an overflow error by the computer. This may occur if due to the finite precision of the machine. This may also give a misleading result for the convergence test of . To avoid that, we might use the relative deviation to test for convergence.


c. Compare and contrast

Both the Newton-Raphson and Secant Methods locate just one root at a time.


Newton: requires evaluation of f and of at each step; converges rapidly.
Secant: requires evaluation only of f at each step; converges less rapidly.

5. Hybrid Methods

A hybrid method combines the use in one program of two or more specific methods. For instance, we might use bisection to locate a root roughly, then use the Secant Method to compute the root more precisely. For instance, we might use bisection to locate multiple roots of an equation, then use Newton-Raphson to refine each one.




Download 8.69 Mb.

Share with your friends:
1   ...   21   22   23   24   25   26   27   28   ...   128




The database is protected by copyright ©ininet.org 2024
send message

    Main page