Secant method is considered to be the most effective approach to find the root of a non-linear function. It is a generalized from the Newton-Raphson method and does not require obtaining the derivatives of the function. So, this method is generally used as an alternative to Newton Raphson method.
The programming effort for Secant Method in C is a bit tedious, but it’s the most effective of all other method to find the root of a function. Here, at each iteration, two of the most recent approximations of the root are utilized to find out the next approximation. Also, in secant method, it is not mandatory that the interval should contain the root.
The secant method is faster than the bisection method as well as the regula-falsi method. The rate of convergence is fast; once the secant method converges, its rate of convergenceis 1.62, which is quite high. Although convergence is not guaranteed in this method, this method is the most economical one giving definitely rapid rate of convergence at low cost.
Secant method falls under open bracket type. The programming effort may be a tedious to some extent, but the secant method algorithm and flowchart is easy to understand and use for coding in any high level programming language.
This method uses two initial guesses and finds the root of a function through interpolation approach. Here, at each successive iteration, two of the most recent guesses are used. That means, two most recent fresh values are used to find out the next approximation.
Features of Secant Method:
- No. of initial guesses – 2
- Type – open bracket
- Rate of convergence – faster
- Convergence – super linear
- Accuracy – good
- Approach – interpolation
- Programming effort – tedious
Secant Method Algorithm:
- Get values of x0, x1 and e
*Here x0 and x1 are the two initial guesses
e is the stopping criteria, absolute error or the desired degree of accuracy*
- Compute f(x0) and f(x1)
- Compute x2 = [x0*f(x1) – x1*f(x0)] / [f(x1) – f(x0)]
- Test for accuracy of x2
If [ (x2 – x1)/x2 ] > e, *Here [ ] is used as modulus sign*
then assign x0 = x1 and x1 = x2
goto step 4
goto step 6
- Display the required root as x2.