Bisection Method
Rules
1) Choose 2 real number a & b , such that f(a)*f(b)<0
2) Define root , c= (a+b)/2
3) Find f(c)
4) If f(a)*f(c) 0 , then set b=c else a=c return to step 1 until finding the root
method twice
b=c if Negative
a=c if Positive
Example
F(X)=x^3 - 2x - 5=0
Find the root of this function using the bisection method in the interval [1,3]
Here a=1,b=3
f(a)=f(1)=1^3-2*1-5 =-6
f(b)=f(3)=3^3-2*3-5=16
f(a)*f(b)<0
1st Iteration
a b f(a) f(b) c=(a+b) / 2 f(c)
1 3 -6 16 2 -1
c=(a+b)/2=(1+3)/2=4/2=2
f(c)=f(2)=2^3-2*2-5=-1
1st Iteration
a b f(a) f(b) c=(a+b) / 2 f(c)
1 3 -6 16 2 -1
c=(a+b)/2=(1+3)/2=4/2=2 so here f(a)*f(c)= ( -6 ) * ( -1 ) = 6 which is positive so
f(c)=f(2)=2^3-2*2-5=-1 new value a=c
2nd Iteration
a b f(a) f(b) c=(a+b) / 2 f(c)
1 3 -6 16 2 -1
2 3 -1 16 2.5 5.625
c=(a+b)/2=(2+3)/2=5/2=2.5 f(a)=f(2)=2^3-2*2-5=-1
f(c)=f(2.5)=(2.5)^3-2*(2.5)-5=5.625 f(b)=f(3)=(3)^3-2*(3)-5=16
2nd Iteration
a b f(a) f(b) c=(a+b) / 2 f(c)
1 3 -6 16 2 -1
2 3 -1 16 2.5 5.625
so here f(a)*f(c)= ( -1 ) * ( 5.625 ) = -5.625 which is negative so
b=c
3rd Iteration
a b f(a) f(b) c=(a+b) / 2 f(c)
1 3 -6 16 2 -1
2 3 -1 16 2.5 5.625
2 2.5 -1 5.625 2.25 1.891
a b f(a) f(b) c=(a+b) / 2 f(c)
1 3 -6 16 2 -1
2 3 -1 16 2.5 5.625
2 2.5 -1 5.625 2.25 1.891
2 2.25 -1 1.891 2.125 0.346
a b f(a) f(b) c=(a+b) / 2 f(c)
1 3 -6 16 2 -1
2 3 -1 16 2.5 5.625
2 2.5 -1 5.625 2.25 1.891
2 2.25 -1 1.891 2.125 0.346
2 2.125 -1 0.346 2.0625 -0.351
a b f(a) f(b) c=(a+b) / 2 f(c)
1 3 -6 16 2 -1
2 3 -1 16 2.5 5.625
2 2.5 -1 5.625 2.25 1.891
2 2.25 -1 1.891 2.125 0.346
2 2.125 -1 0.346 2.0625 -0.351
2.0625 2.125 -0.351 0.346 2.0937 -0.00894
Answer:2.0937