Lec 5 Bisection Method
Lec 5 Bisection Method
Numerical Methods
Atifa Kanwal
atifa.kanwal@seecs.edu.pk
Office # 303, Faculty Block, SEECS, NUST
1. Bisection Method
If a function changes
sign over an interval
then the function
value at the
midpoint is
evaluated. The
location of the root
is then determined
as lying at the
midpoint of the
subintervals within
which the sign
change occurs.
Algorithm
1. Choose lower and upper guesses for the root
such that the function changes sign over the
interval. i.e,
Error bound
Error bound
If result is correct to at least significant digits
then
Instructions about Calculations in this
course
If calculations has to perform up to decimal
places then truncate the result after nth
decimal place(dp). Do not round off.
If not mentioned in the question, perform
exam.
Example 1:
Show that has root in the interval . Use bisection method
to determine approximation to the root that is accurate to
at least within .
Solution:
1 1 2 1.5 0.018(+ve)
Example 2:
Determine the number of iterations necessary to achieve an
approximation with accuracy to the solution of lying in the
interval .
Advantages of Bisection Method
Advantages:
It is always convergent.
Drawbacks:
Convergence is generally slow.
𝑓 ( 𝑏1 )
𝑝1
𝑎1 𝑏1
𝑓 ( 𝑝1 )
𝑓 ( 𝑎1 )
Derivation of Formula
Let and be initial approximation such that . Equation of
the straight line by joining and is,
Or
Algorithm
1. Choose lower and upper guesses for the root such
that
2. An estimate of the root is determined by or
3. Make the following evaluations to determine in which
subinterval the root lies.
a. If then root lies in then set and and repeat step 2.
b. If then root lies in then set and and repeat step 2.
c. If the is root of the equation .
Example 3
You are designing a spherical tank to hold water for a small
village in a developing country. The volume of liquid it can hold
can be computed as
,
,
.
Drawbacks:
In some cases convergence is slow.