Computers in Civil Engineering 53:081 Spring 2003 Lecture #7 Roots of Equations: Open Methods
Lecture Outline Open Methods The Newton-Raphson Algorithm The Secant Algorithm
Newton-Raphson Algorithm Graphical Derivation xi+1 xi From figure: (Newton-Raphson Formula)
Derivation from Taylor Series Which can be rearranged as: (same result as geometrical one)
Newton-Raphson Algorithm Properties Quadratic convergence (Single Roots) Number of correct decimal places doubles with each iteration (single root) Linear convergence (Multiple Roots) Some problem cases exist Slow or no convergence Oscillation Both function and its derivative must be evaluated: Inconvenient May not be so easy
Example: f(x) = e-x-x f(x) x Stopping Criteria: 1.0 0.5 0.0 0.2 0.4 0.6 0.8 1.0 -0.5 -1.0 x Stopping Criteria:
Convergence Newton-Raphson Bisection Iteration xr |t|% |t|% 1 0.50000 11.8 11.8 2 0.56631 0.147 32.2 3 0.56714 0.00002 10.2 4 0.56714 < 10-8 0.819
Newton-Raphson Pitfalls f(x) x3 x1 x2 x f(x) x1 x3 x4 x2 x
Secant Algorithm Motivation: Inconvenient/difficult to evaluate f '(x) analytically in Newton-Raphson algorithm: Solution: Approximate f '(x) with a backward finite divided difference: Substituting in (1) yields the secant algorithm:
Secant Algorithm xi+1 xi-1 xi xi+1 xi Secant Algorithm Use approximate f '(x) at xi Two initial estimates required xi+1 xi-1 xi Newton-Raphson Algorithm Use true f '(x) at xi xi+1 xi
Multiple Roots Multiple roots occur where the function is tangent to the axis. In other words, where
Multiple Roots (continued) At even multiple roots: no sign change => can’t use bracketing methods. At multiple roots f(x) and f '(x) are zero. Newton-Raphson: Secant: Both formulas contain derivative (or its estimate) in denominator. This could result in division by zero as the solution converges very close to the root.
Next: Systems of Nonlinear Equations (Read the Textbook!)