1
Bisection Method
Algorithm
Bisection method Steps (Rule)
Step
-
1:
Find points a and b such that a<b and f(a)
f(b)<0.
Step
-
2:
Take the interval [a,b] and
find next value x0=a+b2
Step
-
3:
If f(x0)=0 then x0 is an exact root,
else if f(a)f(x0)<0 then b=x0,
else if f(x0)
f(b)<0 then a=x0.
Step
-
4:
Repeat steps 2 & 3 until f(xi)=0 or |f(xi)|≤Accuracy
Example-1
1. Find a root of an equation f(x)=x
3
-x-1 using Bisection method
Solution:
Here x
3
-x-1=0
Let f(x)=x
3
-x-1
Here
x
0
1
2
f(x)
-1
-1
5
1st iteration :
Here f(1)=-1<0 and f(2)=5>0
Now, Root lies between 1 and 2
x0=1+22=1.5
f(x0)=f(1.5)=0.875>0
2nd iteration :
Here f(1)=-1<0 and f(1.5)=0.875>0
Now, Root lies between 1 and 1.5
x1=1+1.52=1.25
f(x1)=f(1.25)=-0.29688<0
3rd iteration :
2
Here f(1.25)=-0.29688<0 and f(1.5)=0.875>0
Now, Root lies between 1.25 and 1.5
x2=1.25+1.52=1.375
f(x2)=f(1.375)=0.22461>0
4th iteration :
Here f(1.25)=-0.29688<0 and f(1.375)=0.22461>0
Now, Root lies between 1.25 and 1.375
x3=1.25+1.3752=1.3125
f(x3)=f(1.3125)=-0.05151<0
5th iteration :
Here f(1.3125)=-0.05151<0 and f(1.375)=0.22461>0
Now, Root lies between 1.3125 and 1.375
x4=1.3125+1.3752=1.34375
f(x4)=f(1.34375)=0.08261>0
6th iteration :
Here f(1.3125)=-0.05151<0 and f(1.34375)=0.08261>0
Now, Root lies between 1.3125 and 1.34375
x5=1.3125+1.343752=1.32812
f(x5)=f(1.32812)=0.01458>0
7th iteration :
Here f(1.3125)=-0.05151<0 and f(1.32812)=0.01458>0
Now, Root lies between 1.3125 and 1.32812
x6=1.3125+1.328122=1.32031
f(x6)=f(1.32031)=-0.01871<0
8th iteration :
Here f(1.32031)=-0.01871<0 and f(1.32812)=0.01458>0
Now, Root lies between 1.32031 and 1.32812
x7=1.32031+1.328122=1.32422
f(x7)=f(1.32422)=-0.00213<0
3
9th iteration :
Here f(1.32422)=-0.00213<0 and f(1.32812)=0.01458>0
Now, Root lies between 1.32422 and 1.32812
x8=1.32422+1.328122=1.32617
f(x8)=f(1.32617)=0.00621>0
10th iteration :
Here f(1.32422)=-0.00213<0 and f(1.32617)=0.00621>0
Now, Root lies between 1.32422 and 1.32617
x9=1.32422+1.326172=1.3252
f(x9)=f(1.3252)=0.00204>0
11th iteration :
Here f(1.32422)=-0.00213<0 and f(1.3252)=0.00204>0
Now, Root lies between 1.32422 and 1.3252
x10=1.32422+1.32522=1.32471
f(x10)=f(1.32471)=-0.00005<0
Approximate root of the equation x3-x-1=0 using Bisection mehtod is 1.32471
n
a
f(a)
b
f(b)
c=a+b2
f(c)
Update
1 1 -1 2 5 1.5 0.875 b=c
2 1 -1 1.5 0.875 1.25 -0.29688 a=c
3 1.25 -0.29688 1.5 0.875 1.375 0.22461 b=c
4 1.25 -0.29688 1.375 0.22461 1.3125 -0.05151 a=c
5 1.3125 -0.05151 1.375 0.22461 1.34375 0.08261 b=c
6 1.3125 -0.05151 1.34375 0.08261 1.32812 0.01458 b=c
7 1.3125 -0.05151 1.32812 0.01458 1.32031 -0.01871 a=c
8 1.32031 -0.01871 1.32812 0.01458 1.32422 -0.00213 a=c
9 1.32422 -0.00213 1.32812 0.01458 1.32617 0.00621 b=c
10 1.32422 -0.00213 1.32617 0.00621 1.3252 0.00204 b=c
11 1.32422 -0.00213 1.3252 0.00204 1.32471 -0.00005 a=c