Chapter 1.4
Chapter 1.4
One of the first numerical methods developed to find the root of a non-linear equation
( ) was the bisection method (also called binary-search method). This method is based on
the following theorem:
THEOREM: If the function is continuous on the closed interval and if ( ) and
( ) have opposite signs, then there exists a number between and such that ( )
that is is a zero of
Remarks:
1. An equation ( ) , where ( ) is a real, continuous function has at least one root
between and if ( ) ( ) . (See Figure 1)
2. If ( ) ( ) , there may or may not be any root between and . (See Figure 2
and Figure 3)
3. If ( ) ( ) , then there may be more than one root between and . (See
Figure 4)
Thus, the theorem only guarantees one root between and .
There is a root in .
Figure 1 Figure 2
At least one root exists between two points if the If the function does not change sign between two points,
function is real, continuous, and changes sign. the roots of the equation may still exist between the two
points.
Figure 3
If the function does not change sign between two points, there may not be any root for the equation ( ) between the two
points.
Figure 4
If the function changes sign between two points, more than one root for the equation may exist between the two points
The steps to apply the bisection method to find the root of the equation ( ) are as follows:
1) Choose and as two guesses for the root such that ( ) ( ) , or in other words,
( ) changes sign between and .
2) Estimate the root, , of the equation ( ) as the midpoint between and , i.e.,
5) Compare the absolute relative approximate error with the pre-specified relative error
tolerance .
Go to Step 2 using
Yes new upper and
Is |𝜖𝑎 | 𝜖 ?
lower guesses.
No Stop the algorithm
Example 1. You are working for ‘DOWN THE TOILET COMPANY’ that makes floats for ABC
commodes. The floating ball has a specific gravity of 0.6 and has a radius of 5.5 cm. You are
asked to find the depth to which the ball is submerged when floating in water.
The equation that gives the depth x to which the ball is submerged under water is given by
Use the bisection method of finding roots of equations to find the depth (in meters) to
which the ball is submerged under water. Conduct iterations to estimate the root of the
above equation. Find the absolute relative approximate error at the end of each iteration,
with an error tolerance of . Round off your final answer to the nearest thousandths.
Figure 5
Floating Ball Problem
From the physics of the problem, the ball would be submerged between x 0 and x 2R ,
( )
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
Hence , ( ) ( ) ( ) ( ) ( )( )
So there is at least one root between and , that is, between 0 and 0.11.
Iteration 1
( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )( )
Hence the root is bracketed between and , that is, between 0.055 and 0.11. So, the lower
and upper limit of the new interval is
and
At this point, the absolute relative approximate error| 𝑎| cannot be calculated as we do not
have a previous approximation.
Iteration 2
( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )( )
Hence, the root is bracketed between and , that is, between 0.055 and 0.0825. So the lower
and upper limit of the new interval is
and
| 𝑎| | |
| 𝑎| | |
| 𝑎|
Iteration 3
( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )( )
Hence, the root is bracketed between and , that is, between 0.055 and 0.06875. So the lower
and upper limit of the new bracket is
and
| 𝑎| | |
| 𝑎| | |
| 𝑎|
Iteration 4
( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )( )
Hence, the root is bracketed between and , that is, between 0.061875 and 0.06875. So the
lower and upper limit of the new bracket is
and
| 𝑎| | |
| 𝑎| | |
| 𝑎|
( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )( )
Hence, the root is bracketed between and , that is, between 0.061875 and 0.0653125. So the
lower and upper limit of the new bracket is
and
| 𝑎| | |
| 𝑎| | |
| 𝑎|
Conclusion: With an error tolerance of , the depth to which the ball is submerged
under water is approximately 0.065 meters (to the nearest thousandths).
a) The bisection method is always convergent. Since the method brackets the root, the
method is guaranteed to converge.
b) As iterations are conducted, the interval gets halved. So one can guarantee the error
in the solution of the equation.
Drawbacks of the bisection method:
a) The convergence of the bisection method is slow as it is simply based on halving the
interval.
b) If one of the initial guesses is closer to the root, it will take larger number of
iterations to reach the root.
c) If a function f (x ) is such that it just touches the x -axis (see Figure 6) just like
( ) , it will be unable to guess the lower bound, , and upper bound, ,
such that ( ) ( ) .
*
d) For functions f (x ) where there is a singularity and it reverses sign at the
singularity, the bisection method may converge on the singularity (see Figure 7). An
example includes ( ) , where and are valid initial guesses which
satisfy ( ) ( ) .However, the function is not continuous and the theorem
that a root exists is also not applicable.
* A singularity in a function is defined as a point where the function becomes infinite. For example, for a function such as 1/ x ,
the point of singularity is x 0 as it becomes infinite.
Figure 6
f (x)
x
The equation f ( x) x 0
2
has a single root at x 0 that cannot be bracketed.
Figure 7
f (x)
1
The equation f (x ) = = 0 has no root but changes sign.
x
Images taken from http://mathforcollege.com/nm/mws/gen/03nle/mws_gen_nle_txt_bisection.pdf