Presentation is loading. Please wait.

Presentation is loading. Please wait.

SOLVING NONLINEAR EQUATIONS. SECANT METHOD MATH-415 Numerical Analysis 1.

Similar presentations


Presentation on theme: "SOLVING NONLINEAR EQUATIONS. SECANT METHOD MATH-415 Numerical Analysis 1."— Presentation transcript:

1 SOLVING NONLINEAR EQUATIONS. SECANT METHOD MATH-415 Numerical Analysis 1

2 by Lale Yurttas, Texas A&M University 2 Nonlinear Equation Solvers Bracketing Bisection False Position (Regula-Falsi ) GraphicalOpen Methods Newton Raphson Secant All Methods are iterative

3 by Lale Yurttas, Texas A&M University 3 Nonlinear Equation Solvers Bracketing Bisection False Position (Regula-Falsi ) Graphical Open Methods Newton Raphson Secant All Methods are iterative

4 The Secant Method Basic idea: most nonlinear functions can be approximated by a set of straight lines over small intervals: 4

5 The Secant Method The secant method reduces finding a root of a nonlinear equation to finding a point where some linear equation determined by the approximating linear function has a root as close as possible to the root we are looking for 5

6 The Secant Method 6 Requires two initial estimates of x : x o, x 1. However, because f(x) is not required to change signs between estimates, it is not classified as a “bracketing” method Convergence is not guaranteed for an arbitrary chosen x o.

7 The Secant Method 7 … … …

8 The Secant Method: Preliminaries The secant method should be used to find a root of f(x)=0 A root should be estimated first. It can be done by plotting a graph of f(x) and choosing an initial interval close to a point where f(x)=0 8

9 The Secant Method: Algorithm Determine  - the tolerance value to ensure the appropriate true or approximate accuracy of a solution Determine x 0 and x 1 close enough to the projected root If then swap x 0 and x 1 Step 1. Set Step 2 (true error). If, then stop and x 2 is a root, else go to Step 1 Alternative Step 2. If, then stop and x 2 is a root, (approximate error) else go to Step 1 9

10 The Secant Method: Analysis The secant method converges faster than the bisection method However, if the function is far from linear near the root, the successive iterations can fly off to points far from the root:

11 by Lale Yurttas, Texas A&M University 11 Nonlinear Equation Solvers Bracketing Bisection False Position (Regula-Falsi ) GraphicalOpen Methods Newton Raphson Secant All Methods are iterative

12 by Lale Yurttas, Texas A&M University 12 Nonlinear Equation Solvers Bracketing Bisection False Position (Regula-Falsi ) Graphical Open Methods Newton Raphson Secant All Methods are iterative

13 The False Position Method The method of false position takes care of bracketing a root Unlike the bisection method, this method determines its step taking not the midpoint between the two x-values, but taking the intersection point of a line between the pair of x-values and the x-axis 13

14 14 The False-Position Method (Regula-Falsi) If a real root is bounded by x 0 and x 1 of f(x)=0, then we can approximate the solution by doing a linear interpolation between the points [x 0, f(x 0 )] and [x 1, f(x 1 )] to find the x 2 value such that L(x 2 )=0, where L(x) is the linear approximation of f(x)

15 The False Position Method : Preliminaries The false position method should be used to find a root of f(x)=0 A root should be estimated first. It can be done by plotting a graph of f(x) and narrowing an interval around a point where f(x)=0. Then the initial values x o, x 1 should be chosen such that f(x o ), f(x 1 ) are of opposite sign 15

16 The False Position Method: Algorithm Determine  - the tolerance value to ensure the appropriate true or approximate accuracy of a solution Determine x 0 and x 1 close enough to the projected root such that Step 1. Set Step 2. If, then set else set Step 3(true error). If, then stop and x 2 is a root, else go to Step 1 Alternative Step 3. If, then stop and x 2 is a root, (approximate error) else go to Step 1 16

17 The False Position Method: Analysis The false position method converges faster than the bisection method, but may yield to the secant method The false position method always converges for a single root with a high accuracy, while the secant method may fly off to points far from the root As well as the bisection method, the false position method cannot work if a root cannot be bracketed 17

18 Secant and False Position: Comparison 18

19 Which method is better? There is no best method. All of them have advantages and disadvantages. Bisection  the number of iterations can be exactly predicted from a desired accuracy, but it yields to the secant and false positions methods in speed of convergence Secant  the fastest method in general, but may fly off a root False position  faster than bisection, but they both do not work when a root cannot be bracketed 19


Download ppt "SOLVING NONLINEAR EQUATIONS. SECANT METHOD MATH-415 Numerical Analysis 1."

Similar presentations


Ads by Google