Solutions to Non-linear Equations
Bisection Method
Dr. Umer Farooq Ahmed
04/05/2025 Capital University of Science and Technology 1 1
Bisection Method
The Bisection Method is used to find the real root of the
equation f(x) = 0, where f(x) is nonlinear function( either
transcendental or polynomial of degree > 1)
– It is suitable for implementation on a computer.
Basis of Bisection Method:
– Assumptions
• f(x) is a continuous function in interval [a0, b0]
• f(a0) * f(b0) < 0
– The Bisection method is based on The Intermediate Value
Theorem.
04/05/2025 Capital University of Science and Technology 2
Bisection Method
Intermediate Value Theorem
– Let f(x) = 0 be the given equation whose root is to be
determined:
– If
• Function f(x) is continuous in the closed interval [a0, b0]
• if f (a0) and f(b0) have opposite signs, then there exists at least
one real root of f (x) = 0 between a0 and b0
04/05/2025 Capital University of Science and Technology 3
Bisection Method
Bisection Method Algorithm
Steps:
1.Initialization: Set (c = (a + b) / 2).
2.Evaluation: Calculate (f(c)).
3.Iteration:
•If (f(c) = 0), then (c) is a root and the algorithm terminates.
•If (f(a) x f(c) < 0), then the root lies in the interval ([a, c]). Set (b =
c).
•If (f(b) x f(c) < 0), then the root lies in the interval ([c, b]). Set (a =
c).
4.Update: Set (c = (a + b) / 2).
5.Termination: If (|b - a| < \epsilon), then (c) is an approximation of
the root with an error less than (\epsilon), and the algorithm
terminates. Or if the maximum number of iterations are rached.
Otherwise, return to step 2.
04/05/2025 Capital University of Science and Technology 4
Basis of
Bisection Method Bisection
Method
c=(a+b)/2
f(a)>0
f(c)>0
a c b
f(b)<0
5
Basis of
Bisection Method Bisection
Method
Guaranteed to converge to a root if one exists within the
bracket.
a=c
f(a)>0
a c b
f(c)<0
f(b)<0
6
Bisection
Bisection Method
Method
Slowly converges to a root
b=c
f(b)<0
a b
c
7
Basis of Bisection Method: Example
Bisection Method is based on the Intermediate Value
Theorem
8
Basis of Bisection Method: Example
12 Chang 16
e of
sign
-34.8 17.6
1
14.0000000000 12 14 Chang 16
e of
2
15.0000000000 Iter1 sign
3 -34.8 -12.6 17.6
14.5000000000
4
14.7500000000
5
14 15 16
Chang
14.8750000000 Iter2 e of
6 sign
-12.6 1.5 17.6
14.9375000000
7
14.9062500000
Change of sign
8
14.5
14.8906250000
15
14
9
14.8984375000
10
Iter3
1.5
-5.8
-12.6
14.9023437500
04/05/2025 11 Capital University of Science and Technology 9
Example
04/05/2025 Capital University of Science and Technology 10
Example
04/05/2025 Capital University of Science and Technology 11
Example
04/05/2025 Capital University of Science and Technology 12
Example
04/05/2025 Capital University of Science and Technology 13
Advantages
Always convergent
The root bracket gets halved with each iteration - guaranteed.
04/05/2025 Capital University of Science and Technology 14
Drawbacks
Slow convergence
If one of the initial guesses is close to the root, the
convergence is slower
04/05/2025 Capital University of Science and Technology 15
Drawbacks
One drawback of the bisection method is that it applies only to roots of f()about which f (x)
changes sign. In particular, double roots can be overlooked; one should be careful to examine
f(x) in any range where it is small, so that repeated roots about which f (x) does not change sign
are otherwise evaluated
f(x)
xu x
x
f x
Figure 4 If the function changes sign between two points,
f x 0
more than one root for the equation may exist between the
two points.
04/05/2025 Capital University of Science and Technology 16
Drawbacks
If a function f(x) is such that it just touches the x-axis it will be
unable to find the lower and upper guesses.
f(x)
f x x 2
17
Drawbacks
Function changes sign but root does not exist
1
f(x)
f x
x
x
18