Wednesday, 11 July 2012

Secant Method (Open Method)


Secant Method
The secant method requires two initial points x0 and x1 which are both reasonably close to the
solution x_. Preferably the signs of y0 = f(x0) and y1 = f(x1) should be different. Once x0 and x1
are determined the method proceeds by the following formula:
xi+1 = xi
xi xi1
yi yi1




Example: Suppose f(x) = x4 5 for which the true solution is x_ = p4 5. Plotting this function reveals that the solution is at about 1.25. If we let x0 = 1 and x1 = 2 then we know that the root is in between x0 and x1. Next we have that y0 = f(1) = 4 and y1 = f(2) = 11.  Plugin x2 = 19/15 into f(x) we obtain y2 = f(19/15) _ −2.425758.... In the next step we would
use x1 = 2 and x2 = 19/15 in the formula (6.1) to find x3 and so on.
Below is a program for the secant method. Notice that it requires two input guesses x0 and x1, but it does not require the derivative to be input. COSTS OF SECANT & NEWTON METHODS

The Newton method
xn+1 = xn
f (xn)
f 0(xn) , n= 0, 1, 2, ...
requires two function evaluations per iteration, that of f (xn) and f 0(xn). The secant method
xn+1 = xnf (xn)÷f (xn) f (xn1)
xn xn1 , n= 1, 2, 3...
requires 1 function evaluation per iteration, following the initial step. For this reason, the secant method is often faster in time, even though more iterates are needed with it than with Newton’s method to attain a similar accuracy.

Advantages
  • It converges at faster than a linear rate, so that it is more rapidly convergent than the bisection method.
  • It does not require use of the derivative of the function, something that is not available in a number of applications.
  • It requires only one function evaluation per iteration, as compared with Newton’s method which requires two.
  •  

Disadvantages
  • It may not converge.
  • There is no guaranteed error bound for the computed iterates.
  • It is likely to have difficulty if f 0(α) = 0. This means the x-axis is tangent to the graph of y = f (x)
  • at x = α.
  • Newton’s method generalizes more easily to new methods for solving simultaneous systems of nonlinear equations.

No comments:

Post a Comment