Numerical Accuracy of Bisection Method
Numerical Accuracy of Bisection Method
ISSN: 2231-6302
Available Online: http://irjs.info/
Abstract
A computer program in C++ language has been developed to calculate square roots of numbers from 1 to 25 in interval [0, 6]
using bisection method. Accuracy of bisection method has been found out in each calculation. Lowest accuracy has been
observed in the calculation of square root of 1 in the interval [0, 6] and percentage error is equal to 0.000381469700. Highest
accuracy has been observed in the evaluation of square root of 13 in the interval [0, 6] and percentage error is equal to
0.000000905160. Average percentage error of bisection method in the calculation of square roots of natural numbers from 1
to 25 has been found to be 0.000041549568 which indicates that the accuracy of bisection method can be increased by
reducing tolerance value.
Keywords: Bisection method, numerical accuracy, percentage error, Intermediate-Value theorem, algorithm.
INTRODUCTION
Intermediate-Value Theorem. Let us consider a continuous function
Numerical analysis involves the study of methods of f(x) over the interval [a, b]. If
computing numerical data. Many problems across mathematics can f(a)f(b) < 0
be reduced to linear algebra, this too is studied numerically. Then the values of f(a) and f(b) must be nonzero and each of
Numerical solutions to differential equations require the different sign. That is, if f(a) is negative, f(b) must be positive.[9-13]
determination not of a few numbers but of an entire function; in Likewise, if f(a) is positive, f(b) must be negative. In light of the
particular, convergence must be judged by some global criterion.[1-5] Intermediate-Value theorem, the intermediate-value that we seek is
The bisection method is the simplest and most robust zero, which certainly lies between the positive and negative numbers
algorithm for finding the root of a one-dimensional continuous represented by f(a) and f(b). The conclusion of the Intermediate-
function on a closed interval. The basic idea is a follows- Value theorem is that there is a point, ξ , between a and b
Suppose that f(x) is a continuous function defined over an where f(ξ)=0. That is, the solution to f(x)=0 lies somewhere between
interval [a; b] and f(a) and f(b) have opposite signs. Then by the a and b.
intermediate value theorem, there exists at least one r ε [a; b] such The bisection method checks the midpoint, c, of the interval [a,
that f(r) = 0. The method is iterative and each iteration starts by b]. If f(c) = 0, the task of finding a root is complete. If f(c) ≠ 0 , then
breaking the current interval bracketing the root into two subintervals for the same reason, there must be a root in either [a, c] if f(a)f(c) < 0
of equal length. One of the two subintervals must have endpoints of or on [c, b] if f(c)f(b) < 0.
different signs. This subinterval becomes the new interval and the This procedure defines the bisection method. At each step the
next iteration begins. Thus we can define smaller and smaller interval in which there is guaranteed to be a root of the equation is
intervals such that each interval contains r by looking at subintervals halved (bisected), and the method terminates as soon as the width of
of the current interval and choosing the one in which f(x) changes the interval containing the root is less than some error tolerance δ >
signs. This process continues until the width of the interval 0. Since the bisection method keeps a bounded interval where there
containing a root shrinks below some predetermined error tolerance. is at least one root at each step, it falls in the category of bracketing
[6-8] This method’s major drawback is that it is the slowest among all methods.[14-18]
the root finding methods. However, the method always converges An algorithmic definition of the bisection method is as follows [7]
to a solution and would be good to use as a starter for one of the Inputs: the function f(x), the initial interval [a, b] and the stopping
other methods. tolerance δ
Table1. Initial value, last value, middle point of interval and value of function at middle point of the interval in the calculation of square root of 1 by bisection method
Number of
Initial value (a) Last value (b) Middle point (c) Value of function f(x) at x=c
iterations
1 0.000000000000 6.000000000000 3.000000000000 8.000000000000
2 0.000000000000 3.000000000000 1.500000000000 1.250000000000
3 0.000000000000 1.500000000000 0.750000000000 -0.437500000000
4 0.750000000000 1.500000000000 1.125000000000 0.265625000000
5 0.750000000000 1.125000000000 0.937500000000 -0.121093750000
6 0.937500000000 1.125000000000 1.031250000000 0.063476562500
International Multidisciplinary Research Journal 2012, 2(1):01-04 3
Graph 1. Estimated value of square root of 1 by bisection method after each iteration
3.5
Estimated value of root
3
2.5
2
1.5
1
0.5
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Iteration
Similarly, the square roots of natural numbers from 2 to 25 Highest percentage error has been obtained in the calculation
have been calculated with the help of computer program to draw the of square root of 1 in the interval [0, 6] and is equal to
appropriate conclusion. 0.000381469700. It means if roots lies in the beginning of the interval
then the error in the calculated value of root of equation by bisection
CONCLUSION method is greatest. Exact value of root, value of root calculated by
bisection method and percentage error in the calculation of root by
Lowest percentage error has been obtained in the calculation bisection method is shown in Table-2. Average percentage error of
of square root of 13 in the interval [0, 6] and is equal to bisection method in the calculation of square roots of natural
0.000000905160. It means if roots lies in the middle of the interval numbers from 1 to 25 has been found to be 0.000041549568 which
then the error in the calculated value of root of equation by bisection indicates that the accuracy of bisection method can be increased by
method is least. reducing tolerance value.
Table 2. Numerical accuracy of bisection method in the calculation of roots of functions f(x) = x2 – n; n=1, 2, …., 25
REFERENCES
[11] Hart, V. G.; Howard, L. N.,1978. Austral. Math. Soc. Gaz., 5 (3):
73-89.
[1] Speck, G. P., 1977. New Zealand Math. Mag., 14(1):34-36.
[12] Speck, G. P.,1977. New Zealand Math. Mag., 14 (1): 34-36.
[2] Garey M. R., Johnson D. S., Stockmeyer L., 1976. Theoretical
[13] Franklin F.,1981. American Journal of Mathematics, 4(1/4): 275-
Computer Science, 1(3):237-267. 276.
[3] Nievergelt, Yves,1994. SIAM Rev., 36(2): 258-264.
[14] Fiduccia C. M., Mattheyses R. M.,1982. Proceedings of the 19th
[4] Bui T., 1984. IEEE FOCS, 181-191. Design Automation Conference, 175-181.
[5] Jerrum M., 1993. Sorkin G. B., IEEE FOCS, 94-103. [15] Rall L. B.,1974. SIAM Journal on Numerical Analysis, 11(1): 34-
36.
[6] Baushev A.N., Morozova E.Y,2007. Lectures notes in
engineering and computer science, 2:801-803. [16] Jorge J. More,1971. SIAM Journal on Numerical Analysis, 8(2):
325-336.
[7] Torczon, V, 1991. SIAM J. Optim., 1:123-145.
[17] McKinnon, K.I.M.,1998. SIAM J. Optim, 9:148-158.
[8] Torczon V.,1997. SIAM J. Optim, 7(1):1-25.
[9] Kazuo Murota,1982. SIAM Journal on Numerical Analysis, 19(4): [18] Kernighan B., Lin S.,1970. The Bell System Technical Journal,
793-799. 49(2):291-307.