Professional Documents
Culture Documents
Bisection Method Final
Bisection Method Final
BISECTION METHOD
The bisection method is a bracketing method and starts with two initial
guesses say x0 and x1 such that x0 and x1 brackets the root
i.e. f(x0)f(x1)<0
The bisection method is based on the fact that if f(x) is a real and
continuous function, and for two initial guesses x0 and x1 brackets the
root such that: f(x0)f(x1)<0 then there exists at least one root
between x0 and x1.
x2 = (x0 + x1)/2
And then the process is repeated until we find the root within the desired
accuracy.
CSC3203 Numerical Computing Week-2
1. start
6. Calculate f(x0)f(x2)
a. if f(x0)f(x2) < 0 then x0 = x0 and x1 = x2
b. if f(x0)f(x2) > 0 then x0 = x2 and x1 = x1
c. if f(x0)f(x2) = 0 then goto (8)
8. Display x2 as root.
9. Stop
Example 1:
Solution:
Step x0 x1 x2 f(x2)
1 1 2 1.5 0.875
2 1 1.5 1.25 -0.296875
3 1.25 1.5 1.375 0.224609
4 1.25 1.375 1.3125 -0.051514
5 1.3125 1.375 1.34375 0.082611
6 1.3125 1.34375 1.328125 0.014576
7 1.3125 1.328125 1.320313 -0.018711
8 1.320313 1.328125 1.324219 -0.002128
9 1.324219 1.328125 1.326172 0.006209
10 1.324219 1.326172 1.325195 0.002037
11 1.324219 1.325195 1.324707 -0.000047
The value of f(x2) after 9 iterations is less than our defined tolerance
(0.0072393 < 0.01). This means that the value that approximates best
the root of the function f is the last value of x2 = 3.1611328.
Check:
By solving our quadratic equations in a classic way, we can check our
result:
10 − x2 =0
x² = 10
x = √10
x = ±3.16227766
CSC3203 Numerical Computing Week-2
The rate of convergence of the Bisection method is linear and slow but
it is guaranteed to converge if the function is real and continuous in an
interval bounded by given two initial guesses.
The accuracy of the bisection method is very good and this method is
more reliable than other open methods like Secant, Newton Raphson
method, etc.
*****