0% found this document useful (0 votes)
5 views6 pages

Inter

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views6 pages

Inter

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

International Journal of Scientific Research in ____________________________ Research Paper.

Computer Science and Engineering


Vol.10, Issue.3, pp.07-12, June (2022) E-ISSN: 2320-7639

A Study on the Numerical Accuracy and Efficiency of the Bisection


Method in Finding Square Roots of Positive Real Numbers
H. Rahman1*, K.C. Roy2, S.K. Das3, S.A. Hossain4
1,2,3,4
Department of Applied Mathematics, Gono Bishwabidyalay, Dhaka 1344, Bangladesh
*
Corresponding Author: [email protected]; [email protected], Tel.: +880-1721-013475

Available online at: www.isroset.org


Received: 20/May/2022, Accepted: 15/Jun/2022, Online: 30/Jun/2022
Abstract—Calculating square roots of positive real numbers play a vital role in scientific and engineering computing. From
the daily-life used calculators to the computer software used as a calculator often use the square root function. However,
finding the real roots of algebraic and transcendental equations is one of the most exciting topics in numerical computation.
There are several methods, such as the Bisection, Secant, Iteration, and Newton-Raphson’s methods, to do that. The
speciality of the Bisection method is its robustness and needs no stability criterion. Although it convergences slowly, it
always convergences. In this study, we assessed the numerical accuracy through the root mean square error (RMSE) value
for this method by applying it to finding square roots of some positive real numbers. Also, we calculated the computational
time and number of iterations to convergence to an exact root with the error tolerance of 0.000001 for assessing the
method’s efficiency. The method’s RMSE value obtained in our study is of order 10 -7, indicating its reasonably acceptable
accuracy level. We got this accuracy within 23 iterations in each case, and the computational time is a tiny fraction of a
millisecond; these indicate the excellent efficiency level of the method. Our inquiry has found the method reasonably
acceptable, efficient, and robust.

Keywords—Bisection method; Square root; Algebraic and transcendental equations; Numerical computation of zeros; Root
mean square error; Accuracy; Rate of convergence; Efficiency

I. INTRODUCTION It should be mentioned that calculating the square roots of


positive real numbers is essential in scientific and
Numerical analysis is the combination of theoretical and
engineering computing and many other fields. The square
computational inquiry into computer solutions to
root function is often used in various applications, ranging
mathematical problems [1]. It is the study of numerical
from everyday calculators to computer software used as a
data computation techniques [1]. In many cases, this
calculator. Finding real roots of algebraic and
requires constructing a series of approximations[2-5];
transcendental equations, on the other hand, is one of the
hence, the issues include the pace of convergence, the
fascinating issues in numerical computing. There are a
accuracy of the response, and the efficacy of the numerical
variety of methods for doing this, including the Bisection,
methods [6]. The primary areas of theoretical interest in
Secant, Iteration, and Newton-Raphson’s methods [16, 17].
numerical analysis are global or local error bounds and
The Bisection method is distinguished by its robustness,
methods’ stability and convergence rates [5, 6]. The
which eliminates the requirement for a stability condition.
purpose of numerical analysis is to develop effective
Also, the method might serve as a baseline for other
numerical methods for approximating solutions to many
methods like Newton-Raphson’s method.
mathematical problems and examining their accuracy and
stability characteristics [1]. Thus, numerical analysis is In addition, the Bisection method has been used in various
essential in every discipline of research and engineering. fields of mathematical, statistical, and engineering
sciences. Alpaslam Ersoz and Mehmet Kurban [7] used
Numerical methods have been used in electrical
bisection method successfully to implement on an
engineerings, such as system theory, automatic control,
electrical circuit element. Shengwen Xu, Xuefeng Wang
and electrical equipment design. Numerical methods are
and Lei Wang [8] propose the use of the bisection method
important to solve complicated heat transfer problems. It is
to get the efficiency of the Dynamic-Capability analysis,
important to Data Scientists. In complicated geometry of
which is expected to be improved. Vishai V Mehte and
structural engineering problems, numerical methods give
Durgesh Chandrakar [9] also suggested implying the
the most acceptable solution to design the figure. These
bisection method in electrical circuits. The author in [12]
methods are useful for determining the adequate
implemented the method to solve the multidimensional
population size and locating and computing periodic orbits
problem in a fashion extending the typical case. Some
in the molecular system. One can refer to [7-15].
more studies can be found in [18-25].

© 2022, IJSRCSE All Rights Reserved 7


Int. J. Sci. Res. in Computer Science and Engineering Vol.10, Issue.3, Jun 2022

However, it can be noted that the Bisection method always second step, it falls inside an interval of size ( b  a ) / 2 .
convergences although the method is sluggish to
Finally, the solution must fall inside an interval of size
convergence. Besides convergency, accuracy is also an
important property for a numerical method [1]. b(n)  a (n)  ( b  a ) / 2n 1 at the nth iteration. Thus, if
the tolerance for inaccuracy is  , then we can ensure that
In this study, therefore, we examined the numerical
accuracy of the Bisection method by calculating the root n  log 2 (b  a) /    1 iterations will fall under the
mean square error (RMSE) value when it was used to tolerance. The method’s avoidance of dependency on the
determine the square roots of certain positive real numbers. function’s derivatives is another significant advantage. As
Additionally, we determined the computing time and the a result, it may be used to locate the roots of functions that
number of iterations necessary to reach an exact root in are not smooth. While an advantage in certain
order to evaluate the method's efficiency. Our investigation circumstances, the Bisection method is slower than other
found the method reasonably acceptable, efficient, and methods that employ the function’s curvature to find the
robust. root.

The rest of the paper is organized as follows. Section II III. ALGORITHM


discusses the Bisection method and its features. Section III
presents the Algorithm of the Bisection method. Then, The Bisection method’s algorithm is offered for use in
Section IV deals with the simulation outcomes. Finally, the developing a computer program in a suitable programming
conclusion and future scope are presented in Section V. language. The following is the algorithm:

II. THE BISECTION METHOD AND ITS FEATURES Algorithm 1: The algorithm for the Bisection method is
given below.
The Bisection method [16, 17] requires repetitive halves of
Step 1 INPUT:: interval's endpoints a, b;
subintervals of [a, b] and identifies the subinterval that tolerance tol.
contains the root at each step. This method is most Step 2 IF (f(a) == 0) THEN OUTPUT ("The
effective when we have merely an interval containing the root is a") & STOP.
root. It also works when there are several roots in the IF (f(b) == 0) THEN OUTPUT ("The
interval. However, we consider that the root of this root is b") & STOP.
problem is unique. IF (f(a)*f(b) < 0) THEN GO TO Step 3.
IF (f(a)*f(b) > 0) THEN OUTPUT
The Bisection method is based on the following theorem: ("There is no real root in the interval [a,
“If a function f (x) is continuous between a and b , and b]") & STOP.
f (a). f (b)  0 then there exist at least one root between a Step 3 set i = 1;
ar(i) = (a + b)/2; %ar is approximated root
and b .”
IF (f(ar(i)) == 0) THEN GO TO Step 9.
IF (f(ar(i))*f(a) < 0) THEN a = ar(i);
Let, f (a). f (b)  0 . Then, the first approximation is
ELSE SET b = ar(i).
x0  (a  b) / 2 . In this case, we have the following two Step 4 SET i = i + 1;
possibilities: (i) f ( x0 )  0 and (ii) f ( x0 )  0 . ar(i) = (a + b)/2;
IF (f(ar(i)) == 0) THEN GO TO Step 9.
Now, if case (i) occurs, then x0 is the root at the equation Step 5 WHILE (|ar(i) – ar(i – 1)| > tol) DO
f ( x)  0 , and the process is terminated. If case (ii) occurs, Steps 6-8.
Step 6 IF(f(ar(i))*f(a) < 0) THEN a =
then the root either lies between x0 and a or between x0 ar(i);
and b according to as f ( x0 ) f (a)  0 or f ( x0 ) f (b)  0 . ELSE SET b = ar(i).
So, we have the second approximation, Step 7 SET i = i + 1;
x a x b ar(i) = (a + b)/2;
x1  0 or x1  0 . Step 8 IF (f(ar(i) == 0) THEN GO TO
2 2
Step 9.
Similarly, the process of the Bisection method is repeated Step 9 OUTPUT ("The root is ar(i)");
until the root is obtained with the desired accuracy. STOP.

There are two significant benefits to this method. The first We have developed a MATLAB program using the given
is its extreme robustness. In a certain number of iterations, algorithm for computer implementation. Then, the program
it is guaranteed to obtain an approximated root within a was implemented to obtain the approximated square roots
specified level of accuracy. It should be noted that, the of some positive real numbers to test their accuracy and the
solution falls inside an interval of size b  a at the method’s efficiency. In the next section, the process of
beginning of the process. If the solution is not found, in the implementation of the MATLAB program is detailed.

© 2022, IJSRCSE All Rights Reserved 8


Int. J. Sci. Res. in Computer Science and Engineering Vol.10, Issue.3, Jun 2022

IV. RESULTS AND DISCUSSION necessary to reach the corresponding exact root of the
following equation.
The simulation was run using the MATLAB software on a x2  n  0 , (2)
computer with the Windows 8.1 Pro 64-bit operating where n 1, 4, 9,16, and 25.
system with eight gigabytes RAM and the Intel Core i5-
4570 CPU @ 3.20 GHz hardware configuration. We have
We considered the interval [0, 7] because the square roots
considered the following function for implementing the
of the adopted numbers are in the interval. Also, the
MATLAB program to test the accuracy of the
approximated roots were calculated with the error
approximated real square roots of the positive real numbers
tolerance of 0.000001. The values of the square roots of
1, 4, 9, 16, and 25, obtained by the Bisection method.
the adopted numbers obtained by the Bisection method
f ( x)  x 2  n , (1) after each iteration have been shown in Figs. 1-5.
where n 1, 4, 9,16, and 25. The methods efficiency was
tested by the computing time and the number of iterations

Figure 1. Estimated values of the square root of 1 after each iteration.

Figure 2. Estimated values of the square root of 4 after each iteration.

© 2022, IJSRCSE All Rights Reserved 9


Int. J. Sci. Res. in Computer Science and Engineering Vol.10, Issue.3, Jun 2022

Figure 3. Estimated values of the square root of 9 after each iteration.

Figure 4. Estimated values of the square root of 16 after each iteration.

Figure 5. Estimated values of the square root of 25 after each iteration.

© 2022, IJSRCSE All Rights Reserved 10


Int. J. Sci. Res. in Computer Science and Engineering Vol.10, Issue.3, Jun 2022

Figures 1-5 show that the Bisection method requires 23 efficiency level of the method. Our inquiry has found the
iterations for estimating the square root with the desired method fairly acceptable, efficient, and robust.
error tolerance in each case. Table 1 presents the exact and
approximated values of the roots, errors between them, and Further, the robustness, efficiency, and numerical accuracy
elapsed time in calculating the square roots of 1, 4, 9, 16, of the Bisection method can be tested in finding real nth
and 25 by the Bisection method. roots of positive real numbers because these nth root finding
functions are used less or more in scientific and engineering
Table 1. The exact and approximated values, errors between computing.
them, and elapsed time in calculation of the square roots of 1, 4,
9, 16, and 25 by the Bisection method ACKNOWLEDGMENT
The exact Approximated
Equation value of value of the Error Time (ms)
the root root The first and second authors, respectively, wish to thank
2
x 1  0 1 1.0000003576 -3.5763e-07 0.0055 Professor Gour Chandra Paul and Professor Jogendra Nath
2 Pk., Department of Mathematics, University of Rajshahi,
x  4 0 2 1.9999998808 1.1921e-07 0.0019
Rajshahi 6205, Bangladesh, for constructive discussions on
2
x  9 0 3 2.9999994040 5.9605e-07 0.0013 the paper when it was being prepared.
x 2  16  0 4 4.0000005960 -5.9605e-07 0.0013
REFERENCES
x 2  25  0 5 5.0000001192 -1.1921e-07 0.0016

[1] Hafijur Rahman, Abul Khair, Nigar Sultana, “A Competitive


The last column of Table 1 presents the elapsed time given Study on the Euler and Different Order Runge-Kutta Methods
in milliseconds to calculate the square roots of the with Accuracy and Stability,” International Journal of Scientific
mentioned numbers. It is found that the elapsed times are Research in Mathematical and Statistical Sciences, Vol.9,
Issue.1, pp.21-25, 2022.
minimal, which can be neglected. Thus, the efficiency of [2] Gour Chandra Paul, Farjana Bilkis, Md Emran Ali, Mrinal
the Bisection method can be considered very high in terms Chandra Barman, “Settling time of solid grains in gaseous giant
of the elapsed time and number of iterations that need protoplanets,” Planetary and Space Science, Vol.200, Issue.1,
convergence to an exact root. pp. 105212, 2021.
[3] Gour Chandra Paul, Shahinur Khatun, Md Nuruzzaman,
Dipankar Kumar, Md Emran Ali, Farjana Bilkis, Mrinal
Moreover, the RMSE value is calculated, following [1],
Chandra Barman, “Solving protoplanetary structure equations
with the errors presented in the second last column of using Adomian decomposition method,” Heliyon, Vol.7,
Table 1. It is to be noted here that the accuracy of the Issue.10, pp.e08213, 2021.
approximated solutions obtained by any numerical method [4] Bachir Nour Kharrat, George A Toma, “Development of
is inversely proportional to the RMSE value [1]. The Homotopy Perturbation Method for Solving Nonlinear
calculated RMSE value for the Bisection method to Algebraic Equations,” International Journal of Scientific
Research in Mathematical and Statistical Sciences, Vol.7,
compute the square roots of 1, 4, 9, 16, and 25 with six Issue.2, pp.47-50, 2020.
decimal places accuracy is 4.16380147 852253  10 -7 , [5] Gour Chandra Paul, Sukumar Senthilkumar, Hafijur Rahman,
which is of order 10-7. The small order of the RMSE value “On the implementation of novel RKARMS (4,4) algorithm to
study the structures of initial extrasolar giant
indicates the Bisection method's accuracy level, which is
protoplanets,” Heliyon, Vol.6, Issue.1, pp. e02865, 2020.
acceptable in scientific computing. [6] Richard L Burden, J Douglas Faires, “Numerical Analysis,”
Cengage Learning, USA, 2011.
In this work, we have tested the accuracy and efficiency, [7] Alpaslan Ersöz, Mehmet Kurban, “Algorithmic Approach And
two essential criteria for studying numerical methods, of An Application For Bisection Method Using,” Conference
the Bisection method in finding square roots of positive Paper, pp.1-5, 2013.
[8] Shengwen Xu, Xuefeng Wang, Lei Wang, Bo Li, “Application
real numbers. The method is found effective in calculating of bisection method and controller gains database method in
square roots of positive real numbers. dynamic station-keeping capability analysis,” International
Conference on Offshore Mechanics and Arctic Engineering,
V. CONCLUSION AND FUTURE SCOPE Vol.56475, Issue.1, pp.V001T01A057, 2015.
[9] Vishal V Mehtre1, Durgesh Chandrakar, “Review Paper on
The robustness, efficiency, and numerical accuracy of the Detailed Analysis of Bisection Method and Algorithm for
Solving Electrical Circuits,” International Journal for Research
Bisection method, the simplest and common one among the in Applied Science & Engineering Technology, Vol.7, Issue.11,
existing root-finding methods, in finding square roots of pp.-959-964, 2019.
positive real numbers have been examined. We assessed the [10] Gauri Thakur, J K Saini, “Comparative Study of Iterative
numerical accuracy through the RMSE value for the Methods for Solving Non-LinearEquations,” Journal of
method. Also, we calculated the computational time and University of Shanghai for Science and Technology, Vol.23,
Issue.27, pp.858-866, 2021.
number of iterations to convergence to an exact root with
[11] Qani Yalda, “Numerical Solution of Nonlinear Equations in
the error tolerance of 0.000001 for assessing the method’s Maple,” International Journal for Research in Applied Sciences
efficiency. The found RMSE value indicates the method’s and Biotechnology, Vol.8, Issue.4, pp.34-37, 2021.
fairly acceptable accuracy level. In addition, the iteration [12] Graham R Wood, “The bisection method in higher dimensions,”
numbers and the elapsed time indicate the excellent Mathematical Programming, Vol.55, Issue.1, pp. 319-337,
1992.

© 2022, IJSRCSE All Rights Reserved 11


Int. J. Sci. Res. in Computer Science and Engineering Vol.10, Issue.3, Jun 2022

[13] Patricio Basso, “Iterative methods for the localization of the Kanak Chandra Roy was born in 5
global maximum,” SIAM Journal on Numerical Analysis, October, 1981 in Kurigram District,
Vol.19, Issue.4, pp. 781-792, 1982.
Bangladesh. He received his B.Sc.
[14] Bruno O Shubert, “A sequential method seeking the global
maximum of a function,” SIAM Journal on Numerical Analysis, degree in Mathematics from University
Vol.9, Issue.3, pp. 379-388, 1972. of Rajshahi, Rajshahi 6205,
[15] John E Dennis Jr, Robert B Schnabel, “Numerical methods for Bangladesh in 2005 and M.Sc. in
unconstrained optimization and nonlinear equations,” SIAM, Apllied Mathematics in 2006 from the
USA, 1996. same University. He is pursuing his
[16] Steven C Chapra, Raymond P Canale, “Numerical Methods for
Engineers,” McGraw-Hill New York, USA, 2015.
Master of Philosophy in Mathematics from the same
[17] S S Sastry, “Introductory Methods of Numerical Analysis,” PHI univesity. He is currently working as Sinior Lecturer in
Learning Pvt. Ltd., India, 2012. Department of Applied Mathematics, Gono
[18] A Eiger, Kris Sikorski, Frank Stenger, “A bisection method for Bishwabidyalay (University), Dhaka 1344, Bangladesh. He
systems of nonlinear equations,” ACM Transactions on has published one research paper in a reputed international
Mathematical Software, Vol.10, Issue.4, pp. 367-377, 1984. journal including Thomson Reuters (SCI & Web of
[19] Graham R Wood, “Multidimensional bisection applied to global
optimisation,” Computers & Mathematics with Applications, Science) and two research papers in other reputed national
Vol.21, Issue.6, pp. 161-172, 1991. and international journals. His research interests include
[20] Charles Harvey, Frank Stenger, “A two-dimensional analogue to numerical analysis and travelling wave solution. He has
the method of bisections for solving nonlinear equations,” twelve years of teaching experience.
Quarterly of Applied Mathematics, Vol.33, Issue.4, pp. 351-368,
1976.
Swapon Kumar Das was born in 15
[21] Baker Kearfott, “An efficient degree-computation method for a
generalized method of bisection,” Numerische Mathematics, May, 1995 in Magura District,
Vol.32, Issue.2, pp. 109-127, 1979. Bangladesh. He received his B.Sc.
[22] Ralph Baker Kearfott, “Computing the degree of maps and a degree in Applied Mathematics from
generalized method of bisection,” The University of Utah., Gono Bishwabidyalay (University),
Utah, 1977. Dhaka 1344, Bangladesh in 2021 and
[23] Krzysztof Sikorski, “A three-dimensional analogue to the
method of bisections for solving nonlinear equations,”
currently pursuing M.Sc. in
Mathematics of Computation, Vol.33, Issue.146, pp. 722-738, Mathematics from Jahangirnagar
1979. University, Dhaka 1342, Bangladesh. His research interests
[24] Krzysztof Sikorski, “Bisection is optimal,” Numerische include numerical analysis and computational
Mathematics, Vol.40, Issue.1, pp. 111-117, 1982. mathematics. He has six months of teaching experience.
[25] Krzysztof Sikorski, G M Trojan, “Asymptotic Optimality of the
Bisection Method,” Columbia University, USA, 1984.
Dr Sheikh Anwar Hossain was born
in 20 June, 1961 in Faridpur District,
Bangladesh. He received his B.Sc.
AUTHORS PROFILE degree in Mathematics from
Hafijur Rahman was born in 1 July, University of Dhaka, Dhaka 1000,
1993 in Chuadanga District, Bangladesh in 1986 and M.Sc. in
Bangladesh. He received his B.Sc. Mathematics in 1988 from the same
degree in Mathematics from University University. He recived his Master of
of Rajshahi, Rajshahi 6205, Philosophy in Mathematics from Bangladesh University of
Bangladesh in 2016 and M.Sc. in Pure Engineering and Technology, Dhaka 1000, Bangladesh in
Mathematics in 2017 from the same 2010. He also recived his Ph.D. in Mathematics from
University. He is currently working as Jahangirnagar University, Dhaka 1342, Bangladesh in
Assistant Lecturer in Department of Applied Mathematics, 2017. He is currently working as Associate Professor in
Gono Bishwabidyalay (University), Dhaka 1344, Department of Applied Mathematics, Gono
Bangladesh since 2020. He has published two research Bishwabidyalay (University), Dhaka 1344, Bangladesh
papers in reputed international journals, one of them since 2022. He has published five research papers in
including Thomson Reuters (SCI & Web of Science), and reputed international journals, two conference papers, and
two conference papers. His research interests include fuzzy seven research papers in national level journals. He is also
mathematics and logic, image enhancement and a co-author of 4 books on Mathematics. His research
restoration, numerical analysis, and observational interests include numerical analysis and computational
astronomy. He has two years of teaching experience and mathematics. He has 29 years of teaching experience.
five years of research experience.

© 2022, IJSRCSE All Rights Reserved 12

You might also like