A Better Root Finding Method Using False Position and Inverse Quadratic Interpolation Method
A Better Root Finding Method Using False Position and Inverse Quadratic Interpolation Method
---------------------------------------------------------------------***---------------------------------------------------------------------
Abstract - A root-finding algorithm is for finding roots of Sometimes, a method is more suited to a sequential
continuous functions. A root of a function f is a number x approach than a parallelized approach. Here, we are
such that f(x) = 0. As roots of a function are not exactly discussing about a method that is obtained from Brent-
computable or expressible in closed form, root-finding Dekker but involves False Position Method, IQI Method
algorithms provide approximations to roots, expressed and Bisection Method. Using False Postion in place of
either as floating point numbers or as small isolating Secant Method makes the fzero more efficient and fast
intervals. The efficiency of such algorithms depends on the converging. Although, Secant is faster than False Position,
number of iterations they take to reach the root of the when combined with IQI, False Position reaches zero of
functions. There is always a need to develop a better root the function faster than the Secant. Thus, giving us a
finding algorithm whose efficiency is better than the known method that converges in at least half the time taken by
algorithms. A better version similar to the structure of Brent-Dekker. We state that this modified method could
Brent- Dekker that involves False Position, Inverse be more efficient than Brent-Dekker root finding
Quadratic Interpolation and Bisection Methods is discussed algorithm.
here. Instead of using the conditions prescribed by Brent in
his algorithm, we consider only one condition where the 1.1 Bisection Method
solution c generated in an iteration needs to be in the
interval (a, b) else Bisection is used. This modified version The Bisection Method is also called as Interval Halving
takes a smaller number of iterations in almost all the cases Method, Binary search method or Dichotomy method. It is
thereby taking less execution time than Brent-Dekker based on Bolzano's theorem for continuous functions.
method. Bolzano's Theorem: If a function f(x) is continuous on
an interval [a, b] and f(a)*f(b)<0, then a value c ϵ (a, b)
Key Words: Secant Method, Root-Finding Algorithms, exist for which f(c)=0.
Brent-Dekker Method, Inverse Quadratic Interpolation, f(a)*f(b)<0 means that they both have opposite signs.
Bisection Method, False Postion Method. The x value for which the plot is crossing the x-axis is the
root of the equation f(x)=0. The closeness of this root to
1.INTRODUCTION the real root depends on the tolerance we set for the
algorithm. Bisection is easy to implement and very robust.
A function f(x), when continuous contain root(s), maybe But this method is relatively slow.
real root(s), which is called as root(s) of the function or For a given function, f(x), Bisection Method works as
zero(s) of the function. Such zero of a function can be follows:
found out using root finding algorithms. One such method 1. Choose a and b for which f(a)*f(b)<0.
is Brent-Dekker method. This method uses a combination 2. A midpoint c is calculated as the average of a and b,
of Secant, Inverse Quadratic Interpolation and Bisection c=(a+b)/2.
Methods. This method is added as fzero in Python 3. Evaluate f(c).
libraries. Secant method is a linear interpolation method. 4. If f(c)=0, we found the root. Return it. Else, step 5.
Although it is a relatively fast when compared to other 5. If f(c)*f(a)>0 replace a with c.
methods, it converges slowly in short steps than directly 7. If f(c)*f(b)>0 replace b with c.
reaching to zero of the function. Sometimes, secant may 8. Goto step 2 or end if the MAX iterations are reached or
diverge instead of converging to zero when a wrong initial tolerance is satisfied [1].
interval is given. Combining it with IQI seems to make the 1.2 Secant Method
whole method fast converging and never diverging but
this method can still be developed in terms of its Secant method is considered most effective in finding
convergence and execution time. the root of a non-linear equation. This falls under open
© 2020, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 1
International Research Journal of Engineering and Technology
(IRJET) e-ISSN: 2395-0056
bracket type. This method uses two initial guesses and decreasing intervals determined by the method contains a
finds the root of a function through interpolation solution, and the limit of the iterates is a solution.
approach. At successive iteration, two of the most recent The following data provides a rough outline of how the
guesses are used to find the next approximation. Although method works. The method builds upon an earlier method
this method is faster than many other methods, its of T. J. Dekker and is the basis of MATLAB’s fzero routine.
convergence is not always guaranteed. At each iteration, Brent-Dekker’s method first tries a step
The Secant Method works as follows: of the secant method or IQI. If this step is unsatisfactory,
1. Get initial guess values a, b and tolerance e. which usually means too long, too short, or too close to an
2. evaluate f(a), f(b). endpoint of the current interval, then the step reverts to a
3. c= b−(f(b)∗(b−a))/(f(b)−f(a)). bisection step. This reverting step guards the method from
4. Goto step 2 or end if f(c)=0 or |c-b| < e [2]. making huge number of steps with very less increase in
the root value. IQI is efficient and finds the root if it exists.
1.3 Inverse Quadratic Interpolation But, IQI is time consuming and the conditions for the
selection of bisection method increases the number of
In this method let us say there are three points xn–2, iterations required than necessary. Although Brent-
xn–1, and xn as initial values. The function will be Dekker method is efficient and robust, there always exists
evaluated at each of these points resulting in yn–2 = f(xn– a better method [4].
2), yn–1 = f(xn–1), and yn = f(xn), respectively. Assuming 2. A Better Root-Finding Method (Modified
that f has an inverse quadratic function g, then xn–2 = Version of Brent-Dekker)
g(yn–2), xn–1 = g(yn–1), and xn = g(yn), and so on. This
process is done by computing a parabola that goes This Modified version of Brent-Dekker uses False Position
through these three given points and taking the and IQI with Bisection method. The efficiency and utility of
intersection of the parabola with the x-axis as the new root this method is discussed under Results and Discussion section.
estimate. Fitting the points with a parabola in y, we have: False Position is a technique to find zeros of a function. It is
similar to Secant method but uses a smaller number of function
evaluations than Secant method. It takes a smaller number of
steps to converge to root of the equation than Secant method. It
converges faster than secant method. Combining it with IQI
and reducing the number of conditions as in actual Brent-
Dekker method to just one condition for selecting IQI (select
Figure 1 Lagrange Polynomial IQI only if the last two found roots have a difference of less
This form is also called a Lagrange polynomial. than half the tolerance) makes this method more efficient and
Setting y = 0, the new root estimate, xn+1, will be robust than Brent-Dekker method.
computed as follows: Here is the pseudo code of this method:
1. Read initial interval [a,b]
2. Read tolerance 2t;
3. if f(a) < f(b): swap(a,b)
Figure 2 Modified Polynomial with y = 0 4. c:=a, fc:=fa
However, it cannot compute complex roots because it
will always cross the x-axis. Also, if the three initial guess 5. repeat
values chosen are very far from the root, then this method 6. if fa!= fc && fb!=fc && (b-a)<t*b: \\IQI
will not converge [3].
7. s=((fb * fa) / ((fc - fb) * (fc - fa)) * c) + ((fc * fa) / ((fb
- fc)*(fb - fa))*b)+((fc * fb) / ((fa - fc) * (fa - fb)) * a)
1.4 Brent-Dekker Method
8. else: //False Position
This is a hybrid method that combines bisection, secant 9. s=a+fa*(a-b)/(fb-fa)
and IQI methods with some additional features that make
it completely robust and usually very efficient. It is an 10. if s is not in [a,b]: //Bisection
enclosure method that begins with an initial interval 11. s=(a+b)/2, fs:=f(s), c:=b
across which the function f changes sign and, as the
12. if fs*fb:
iterations proceed, determines a sequence of nested
intervals that share this property and decrease in length. If 13. a:=b, fa:=fb
f is continuous on the initial interval, then each of the
© 2020, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 2
International Research Journal of Engineering and Technology
(IRJET) e-ISSN: 2395-0056
14. else: The graph showing the above details of execution times for
different test cases is as follows:
15. fa:=fa/2, b:=s, fb:=fs
16. until abs(b-a)
17. b is the required approximate solution
This method provided a great reduction in the number of steps
when compared to the original Brent-Dekker method on a
variety of polynomial functions.
Table -1: Test cases, interval used and root value in the
interval using matlab fzero method.
The below table provides a view point on how much In this paper, we have seen how Bisection, Secant and
execution time the modified better root-finding method Inverse Quadratic Interpolation methods work and why
and the actual fzero method have taken to get to the result they might be inefficient in certain ways. We have also
on a standard i5 8th Gen Processor with 8 GB RAM. seen the working of Brent-Dekker based fzero method and
tested it for root values on some polynomial functions. We
Table -2: Modified brent-dekker version vs actual results have also seen how the modified better root finding
from Table-1 algorithm works and the time it takes to attain the roots in
a much less time and with much better efficiency. One
Modified Brent-Dekker vs fzero method cannot predict which algorithm is always better but it is
Execution Time safe to say that the method presented in this paper is
(micro sec) almost always efficient in finding the roots than other
Function Modified Fzero methods discussed.
Better ( Brent-
Version Dekker REFERENCES
Method)
0.5e^x - 5x + 2 37 57 [1] https://x-engineer.org/undergraduate-
engineering/advanced-mathematics/numerical-
–2x^4 + 2x^3 – 16x^2 – 60x + 100 24 204 methods/the-bisection-method-for-root-finding/
((e^x)*cos(x))-(x*sin(x)) 124 340 [2] I. K. Argyros, S. K. Khattri, “On the Secant Method”,
x^5−5x+3 43 170 Journal of Complexity, 2013.
x3−0.926x2+0.0371x+0.043 38 86 [3] Mark James B. Magnaye, “The Inverse Quadratic
Interpolation Method for Finding the Root(s) of a
(-9+(sqrt(99+(2*x)-(x*x))) 93 172 Function”, University of Batangas Graduate School.
+cos(2*x)) [4] Richard P. Brent, “Algorithms for Minimization
sin(cosh(x)) 140 196 Without Derivatives”, Prentice-Hall Inc., Englewood
Cliffs, New Jersy, 1973.
exp(-exp(-x))-x 39 50
© 2020, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 3