Presentation is loading. Please wait.

Presentation is loading. Please wait.

Secant Method Another Recursive Method. Secant Method The secant method is a recursive method used to find the solution to an equation like Newton’s Method.

Similar presentations


Presentation on theme: "Secant Method Another Recursive Method. Secant Method The secant method is a recursive method used to find the solution to an equation like Newton’s Method."— Presentation transcript:

1 Secant Method Another Recursive Method

2 Secant Method The secant method is a recursive method used to find the solution to an equation like Newton’s Method. The idea for it is to follow the secant line to its x -intercept and use that as an approximation for the root. This is like Newton’s Method (which follows the tangent line) but it requires two initial guesses for the root. The big advantage of the secant method over Newton’s Method is that it does not require the given function f(x) to be a differential function or for the algorithm to have to compute a derivative. This can be a big deal in other languages since many derivatives can only be estimated. The recursive function h(x,y) depends on two parameters x and y the x -coordinates of two points on the function. x y f(x) f(y) h(x,y) x n-1 xnxn f(x n-1 ) f(x n ) x n+1 =h(x n-1,x n )

3 To get x n+1 from x n and x n-1 we write out the equation of the secant line and using the points x n and x n-1. We then plug in the point ( x n+1,0) and solve for x n+1. equation of secant substitute ( x n+1,0) solve for x n+1 x n+1 =h(x n-1,x n ) The equation above gives the recursively defined sequence for x n. This is what is used for the Secant Method. The halting condition is usually given by the Standard Cauchy Error.

4 Here are some examples of how you apply the secant method. nxnxn h(x n-1,x n ) 00 112 221.33333 3 1.4 nxnxn h(x n-1,x n ) 00 11-3 2 1.8 3 1.95868

5 Problems With the Secant Method The number of iterations required can not be determined before the algorithm begins. The algorithm will halt (program termination by division by zero if not checked for) if a horizontal secant line is encountered. The secant method will sometimes find an extraneous root.


Download ppt "Secant Method Another Recursive Method. Secant Method The secant method is a recursive method used to find the solution to an equation like Newton’s Method."

Similar presentations


Ads by Google