Blended Root Finding Algorithm Outperforms Bisection and Regula Falsi Algorithms
Abstract
:1. Introduction
2. Background
2.1. Bisection Method
Algorithm 1: Bisection Method |
1. Input: f and [a, b], ∈, maxIterations |
2. Output: root r, bracketing interval [ak, bk] |
3. //initialize |
4. k = 1; [ak, bk] = [a, b] |
5. repeat |
6. //compute the mid-point |
7. |
8. if f(ak)·f(rk) < 0, |
9. ak+1 = ak; bk+1 = rk |
10. elseif f(rk)·f(b1) < 0, |
11. ak+1 = rk; bk+1 = bk |
12. endif |
13. r = rk |
14. k = k+1; |
15. until |f(r)| < ∈ or k > maxIterations |
2.1.1. Advantages of the Bisection Method
2.1.2. Drawbacks of the Bisection Method
2.2. False Position (Regula Falsi) Method
Algorithm 2: False Position Method |
1. Input: f and [a, b], ∈, maxIterations |
2. Output: root r, bracketing interval [ak, bk] |
3. //initialize |
4. r0 = a; r1 = b |
5. k = 1; [ak, bk] = [a, b] |
6. repeat |
7. //compute the secant line -point |
8. rk = ak − |
9. if f(ak)·f(rk) < 0, |
10. ak+1 = ak; bk+1 = rk |
11. elseif f(rk)·f(b1) < 0, |
12. ak+1 = rk; bk+1 = bk |
13. endif |
14. r = rk |
15. k = k+1; |
16. until |f(r)| < ∈ or k > maxIterations |
2.2.1. Justification
2.2.2. Advantages of the False Position Method
2.2.3. Drawbacks of the False Position Method
2.3. Newton–Raphson Method
2.3.1. Advantages of the Newton–Raphson Method
2.3.2. Disadvantages of the Newton–Raphson Method
2.4. Secant Method, Modified Secant Method
Advantages and Shortcomings
2.5. Genetic Algorithms and Swarm Intelligence
2.6. Effectiveness and Efficacy of Root Approximation Iterations
2.6.1. Methods for Root-Error Calculation for Termination Criterion
2.6.2. Stopping Criteria for Halting Condition
3. Blended Algorithm
Algorithm 3: Blended Bisection and False Position |
1. Input: f and [a, b], ∈, maxIterations |
2. Output: root r, bracketing interval [ak+1, bk+1] |
3. //initialize |
4. k = 0; a1 = a, b1 = b |
5. repeat |
6. //compute the mid point |
7. mk = , and ∈m = |f(mk)| |
8. //compute the secant line point, |
9. sk = ak − and ∈s = |f(sk)| |
10. if |f(mk)| < |f(sk)|, |
11. // f(mk) is closer to zero, Bisection method determines bracketing interval [bak+1, bbk+1] |
12. rk = mk |
13. ∈a = ∈m |
14. if f(ak)·f(rk) < 0, |
15. bak+1 = ak; bbk+1 = rk |
16. else |
17. bak+1 = rk; bbk+1 = bk |
18. endif |
19. else |
20. // f(sk) is closer to zero, False Position method determines bracketing interval [fak+1, fbk+1] |
21. rk = sk |
22. ∈a = ∈s |
23. if f(ak)·f(rk) < 0, |
24. fak+1 = ak; fbk+1 = rk |
25. else |
26. fak+1 = rk; fbk+1 = bk |
27. endif |
28. //Since the root is bracketed by both [bak+1, bbk+1] and [fak+1, fbk+1] |
29. [ak+1, bk+1] = [bak+1, bbk+1] ∩ [fak+1, fbk+1] |
30. // outcome: iteration complexity, root, and error of approximation |
31. iterationCount = k |
32. r = rk |
33. error = ∈a = |f(r)| |
34. k = k + 1 |
35. until |f(r)| < ∈ or k > maxIterations |
4. Complexity Issue
5. Discussions
5.1. Empirical Testing Evidence
5.2. Experiments Using MATLAB
6. Conclusions
Funding
Acknowledgments
Conflicts of Interest
References
- Datta, B.N. Lecture Notes on Numerical Solution of Root Finding Problems. 2012. Available online: www.math.niu.edu/~dattab (accessed on 15 January 2019).
- Calhoun, D. Available online: https://math.boisestate.edu/~calhoun/teaching/matlab-tutorials/lab_16/html/lab_16.html (accessed on 13 June 2019).
- Thinzar, C.; Aye, N. Detection the storm movement by sub pixel registration approach of Newton Raphson method. Int. J. E Educ. E Bus. E Manag. E Learn. 2014, 4, 28–31. [Google Scholar]
- Ali, A.J.M. The application of numerical approximation methods upon digital images. Am. J. Signal Process. 2017, 7, 39–43. [Google Scholar] [CrossRef]
- Bruck, H.A.; McNeill, S.R.; Sutton, M.A.; Peters, W.H. Digital image correlation using Newton-Raphson method of partial differential correction. Exp. Mech. 1989, 29, 261–267. [Google Scholar] [CrossRef]
- Cofaru, C.; Philips, W.; van Paepegem, W. Pixel-level robust digital image correlation. Opt. Express 2013, 21, 29979–29999. [Google Scholar] [CrossRef] [PubMed]
- Chapra, S.C.; Canale, R.P. Numerical Methods for Engineers, 7th ed.; McGraw-Hill Publishers: Boston, MA, USA, 2015. [Google Scholar]
- Autar, K.K.; Egwu, E. Numerical Methods with Applications. 2008. Available online: http://www.numericalmethods.eng.usf.edu (accessed on 20 February 2019).
- Wolfram Mathematica. Available online: http://www.efunda.com/math/num_rootfinding-cfm (accessed on 15 February 2014).
- Charles, A.; Cooper, W.W. Non-linear power of adjacent extreme points methods in linear programming. Econometrica 2008, 25, 132–153. [Google Scholar] [CrossRef]
- Young, H.D.; Freedman, R.A. University Physics with Modern Physics, 11th ed.; Addison Wesley: Boston, MA, USA, 2004. [Google Scholar]
- Srivastava, R.B.; Srivastava, S. Comparison of numerical rate of convergence of bisection, Newton and secant methods. J. Chem. Biol. Phys. Sci. 2011, 2, 472–479. [Google Scholar]
- Iwetan, C.N.; Fuwape, I.A.; Olajide, M.S.; Adenodi, R.A. Comparative study of the bisection and Newton methods in solving for zero and extremes of a single-variable function. J. NAMP 2012, 21, 173–176. [Google Scholar]
- Ehiwario, J.C.; Aghamie, S.O. Comparative study of bisection, Newton-Raphson and secant methods of root-finding problems. IOSR J. Eng. 2014, 4, 2278–8719. [Google Scholar]
- Sivanandam, S.; Deepa, S. Genetic algorithm implementation using matlab. In Introduction to Genetic Algorithms; Springer: Berlin/Heidelberg, Germany, 2008; pp. 211–262. [Google Scholar] [CrossRef]
- Moazzam, G.; Chakraborty, A.; Bhuiyan, A. A robust method for solving transcendental equations. Int. J. Comput. Sci. Issues 2012, 9, 413–419. [Google Scholar]
- Harder, D.W. Numerical Analysis for Engineering. Available online: https://ece.uwaterloo.ca/~dwharder/NumericalAnalysis/10RootFinding/falseposition/ (accessed on 11 June 2019).
- Mathews, J.H.; Fink, K.D. Numerical Methods Using Matlab, 4th ed.; Prentice-Hall Inc.: Upper Saddle River, NJ, USA, 2004; ISBN 0-13-065248-2. [Google Scholar]
- Nayak, T.; Dash, T. Solution to quadratic equation using genetic algorithm. In Proceedings of the National Conference on AIRES-2012, Vishakhapatnam, India, 29–30 June 2012. [Google Scholar]
Method | Iterations | AppRoot | Error | LowerB | UpperB |
---|---|---|---|---|---|
Bisection | 19 | 2.0000019 | 0.0000057 | 1.999996 | 2.000002 |
FalsePosititon | 15 | 1.9999984 | 0.0000048 | 1.999998 | 4 |
Secant | 6 | 2.0000001 | 0 | na | na |
NewtonRaphson | 5 | 2 | 0 | na | na |
Hybrid | 2 | 2 | 0 | 1.916667 | 2.05 |
Defining Function | Interval | Reference |
---|---|---|
x2 − 3 | [1, 2] | Harder |
x2 − 5 | [2, 7] | Srivastava |
x2 − 10 | [3, 4] | Harder |
x2 − x − 2 | [1, 4] | Moazzam |
x2 + 2x − 7 | [1, 3] | Nayak |
x2 + 5x + 2 | [−6, 0] | Sivanandam |
x3 − 2 | [0, 2] | Harder |
xex − 7 | [−1, 1] | Calhun |
x − cosx | [0, 1] | Ehiwario |
xsin(x) − 1 | [0, 2] | Mathew |
4x4 + 3x3 + 2x2 + x + 1 | [−6, 0] | Sivanandam |
Blended DEMO | |||||
---|---|---|---|---|---|
Hybrid Method for function x2 − x − 2 | |||||
Continuity Interval = [1.00, 4.00] | ErrorTolerance = 0.0000100 | ||||
Iterations | Root | FunctionValue | |||
2 | 2 | 0 | |||
Itera | AppRoot | Error | Lbound | Ubound | |
1 | 1.5 | 1.25 | 1.5 | 2.5 | |
2 | 2 | 0 | 1.916667 | 2.5 | |
Hybrid Root = 2.0000000, FunctionValue = 0.0000000, Error = 0.0000000 | |||||
Elapsed time is 0.697339 seconds. |
BISECTION DEMO | |||||
---|---|---|---|---|---|
Bisection Method for function x2 − x − 2 | |||||
Continuity Interval = [1.000, 4.000] | ErrorTolerance = 0.0000100 | ||||
Iterations | Root | FunctionValue | |||
19 | 2 | 0.00001 | |||
Itera | AppRoot | Error | Lbound | Ubound | |
1 | 2.5 | 1.75 | 1 | 2.5 | |
2 | 1.75 | 0.6875 | 1.75 | 2.5 | |
3 | 2.125 | 0.390625 | 1.75 | 2.125 | |
4 | 1.9375 | 0.183594 | 1.9375 | 2.125 | |
5 | 2.03125 | 0.094727 | 1.9375 | 2.03125 | |
6 | 1.984375 | 0.046631 | 1.984375 | 2.03125 | |
7 | 2.007812 | 0.023499 | 1.984375 | 2.007812 | |
8 | 1.996094 | 0.011703 | 1.996094 | 2.007812 | |
9 | 2.001953 | 0.005863 | 1.996094 | 2.001953 | |
10 | 1.999023 | 0.002929 | 1.999023 | 2.001953 | |
11 | 2.000488 | 0.001465 | 1.999023 | 2.000488 | |
12 | 1.999756 | 0.000732 | 1.999756 | 2.000488 | |
13 | 2.000122 | 0.000366 | 1.999756 | 2.000122 | |
14 | 1.999939 | 0.000183 | 1.999939 | 2.000122 | |
15 | 2.000031 | 0.000092 | 1.999939 | 2.000031 | |
16 | 1.999985 | 0.000046 | 1.999985 | 2.000031 | |
17 | 2.000008 | 0.000023 | 1.999985 | 2.000008 | |
18 | 1.999996 | 0.000011 | 1.999996 | 2.000008 | |
19 | 2.000002 | 0.000006 | 1.999996 | 2.000002 | |
Bisection Root = 2.0000019, FunctionValue = 0.0000057, Error = 0.0000057 | |||||
Elapsed time is 0.260100 seconds. |
FALSE POSITION DEMO | |||||
---|---|---|---|---|---|
False Position Method for function x2 − x − 2 | |||||
Initial [Guesse0, Guess1] = [1.00, 4.00] | ErrorTolerance: 0.0000100 | ||||
Iterations | Root | FunctionValue | |||
15 | 1.999998 | −0.000005 | |||
Itera | AppRoot | Error | Lbound | Ubound | |
1 | 1.5 | 1.25 | 1.5 | 4 | |
2 | 1.777778 | 0.617284 | 1.777778 | 4 | |
3 | 1.906977 | 0.270416 | 1.906977 | 4 | |
4 | 1.962085 | 0.112307 | 1.962085 | 4 | |
5 | 1.984718 | 0.045612 | 1.984718 | 4 | |
6 | 1.993869 | 0.018357 | 1.993869 | 4 | |
7 | 1.997544 | 0.007361 | 1.997544 | 4 | |
8 | 1.999017 | 0.002947 | 1.999017 | 4 | |
9 | 1.999607 | 0.001179 | 1.999607 | 4 | |
10 | 1.999843 | 0.000472 | 1.999843 | 4 | |
11 | 1.999937 | 0.000189 | 1.999937 | 4 | |
12 | 1.999975 | 0.000075 | 1.999975 | 4 | |
13 | 1.99999 | 0.00003 | 1.99999 | 4 | |
14 | 1.999996 | 0.000012 | 1.999996 | 4 | |
15 | 1.999998 | 0.000005 | 1.999998 | 4 | |
FalsePosition Root = 1.9999984, FuncValue = −0.0000048, Error = 0.0000048 | |||||
Elapsed time is 0.263154 seconds. |
NEWTON_RAPHSON DEMO | |||||
---|---|---|---|---|---|
NewtonRaphson Method for function = x2 − x − 2 | |||||
Initial Guess = 1.000000; ErrorTolerance = 0.00001 actual iterations = 5 | |||||
Iteration | AppRoot | Error | |||
1 | 3 | 4 | |||
2 | 2.2 | 0.64 | |||
3 | 2.011765 | 0.035433 | |||
4 | 2.000046 | 0.000137 | |||
5 | 2 | 0 | |||
Newton-Raphson Root = 2.0000000, FuncValue = 0.000000, Error = 0.0000000 | |||||
Elapsed time is 0.189108 seconds. |
SECANT DEMO | |||||
---|---|---|---|---|---|
Secant Method for function x2 − x − 2 | |||||
Initial Guess0: 1.000000, Guess1: 4.000000; | ErrorTolerance: 0.000010 | ||||
Iteration | AppRoot | Error | |||
1 | 1.5 | 1.25 | |||
2 | 1.777778 | 0.617284 | |||
3 | 2.04878 | 0.148721 | |||
4 | 1.996165 | 0.011491 | |||
5 | 1.999939 | 0.000184 | |||
6 | 2 | 0 | |||
Secant Root = 2.0000001, FunctionValue = 0.0000002, Error = 0.0000002 | |||||
Elapsed time is 0.597723 seconds. |
© 2019 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Sabharwal, C.L. Blended Root Finding Algorithm Outperforms Bisection and Regula Falsi Algorithms. Mathematics 2019, 7, 1118. https://doi.org/10.3390/math7111118
Sabharwal CL. Blended Root Finding Algorithm Outperforms Bisection and Regula Falsi Algorithms. Mathematics. 2019; 7(11):1118. https://doi.org/10.3390/math7111118
Chicago/Turabian StyleSabharwal, Chaman Lal. 2019. "Blended Root Finding Algorithm Outperforms Bisection and Regula Falsi Algorithms" Mathematics 7, no. 11: 1118. https://doi.org/10.3390/math7111118
APA StyleSabharwal, C. L. (2019). Blended Root Finding Algorithm Outperforms Bisection and Regula Falsi Algorithms. Mathematics, 7(11), 1118. https://doi.org/10.3390/math7111118