3.03: Bisection Methods for Solving a Nonlinear Equation
( \newcommand{\kernel}{\mathrm{null}\,}\)
Lesson 1: Background of Bisection Method
Learning Objectives
After successful completion of this lesson, you should be able to
1) articulate the background to the bisection method
Introduction
One of the first numerical methods developed to find the root of a nonlinear equation f(x)=0 was the bisection method (also called the binary-search method). The procedure is based on the following theorem.
Theorem
An equationf(x)=0, where f(x) is a real continuous function, has at least one root between xl and xu if f(xl)f(xu)<0 (See Figure 3.3.1.1).
Note that if f(xl)f(xu)>0, there may or may not be any root between xl and xu (Figures 3.3.1.2 and 3.3.1.3). If f(xl)f(xu)<0, then there may be more than one root between xl and xu (Figure 3.3.1.4). So the theorem only guarantees one root between xl and xu.
Since the method is based on finding the root between two points, the technique falls under bracketing methods.
Since the root is bracketed between two points, xl and xu, one can find the midpoint xm between xl and xu. We hence get two new intervals xl and xm, and xm and xu.




Is the root now between xl and xm or between xm and xu? Well, one can find the sign of f(xl)f(xm), and if f(xl)f(xm)<0 then the new bracket is between xl and xm; otherwise, it is between xm and xu. So, you can see that you are halving the interval. As one repeats this process, the width of the interval [xl,xu] becomes smaller and smaller, and you can zero on to the root of the equation f(x)=0.
Audiovisual Lectures
Title: Bisection Method - Introduction
Summary: Learn what the bisection method of solving nonlinear equations is based on.
Lesson 2: Bisection Method Algorithm
Learning Objectives
After successful completion of this lesson, you should be able to
1) write the algorithm for the bisection method of solving a nonlinear equation.
What is the bisection method, and what is it based on?
One of the first numerical methods developed to find the root of a nonlinear equation f(x)=0 was the bisection method (also called the binary-search method). The procedure is based on the following theorem.
An equationf(x)=0, where f(x) is a real continuous function, has at least one root between xl and xu if f(xl)f(xu)<0 (See Figure 3.3.2.1).

Bisection method
Since the method is based on finding the root between two points, the technique falls under the category of bracketing methods.
Since the root is bracketed between two points, xl and xu, one can find the mid-point, xm between xl and xu. This gives us two new intervals xl and xm, and xm and xu.
Is the root now between xl and xm or between xm and xu? Well, one can find the sign of f(xl)f(xm), and if f(xl)f(xm)<0 then the new bracket is between xl and xm, otherwise, it is between xm and xu. So, you can see that you are literally halving the interval. As one repeats this process, the width of the interval [xl,xu] becomes smaller and smaller, and you can zero into the root of the equation f(x)=0. The algorithm for the bisection method is given as follows.
Algorithm for the bisection method
The steps to apply the bisection method to find the root of the equation f(x)=0 are
Choose xl and xu as two guesses for the root such thatf(xl)f(xu)<0, or in other words, f(x) changes sign between xl and xu.
Estimate the root xm of the equation f(x)=0 as the mid-point between xl and xu as
xm=xl+ xu2
Now check the following.
If f(xl)f(xm)<0, then the root lies between xl and xm; then xl=xl and xu=xm.
If f(xl)f(xm)>0, then the root lies between xm and xu; then xl=xm and xu=xu.
If f(xl)f(xm)=0; then the root is xm. Stop the algorithm if this is true.
Find the new estimate of the root
xm=xl+ xu2
Find the absolute relative approximate error as
|∈a|=|xnewm−xoldmxnewm| ×100
where
xnewm=estimated root from the present iteration
xoldm=estimated root from the previous iteration
Compare the absolute relative approximate error |∈a| with the pre-specified relative error tolerance ∈s. If |∈a|>∈s, then go to Step 3, else stop the algorithm. Note one should also check whether the number of iterations is more than the maximum number of iterations allowed. If so, one needs to terminate the algorithm and notify the user about it.
Audiovisual Lectures
Title: Bisection Method - Algorithm
Summary: Learn the algorithm of the bisection method of solving nonlinear equations of the form f(x)=0.
Lesson 3: Application of Bisection Method
Learning Objectives
After successful completion of this lesson, you should be able to:
1) apply the bisection method to solve for roots of a nonlinear equation.
Applications
In the previous lesson, you learned the theory of the bisection method of solving a nonlinear equation. In this lesson, we apply the algorithm of the bisection method to solve a nonlinear equation.
Use the bisection method to find the root of the nonlinear equation
x3=20
Use initial lower and upper guesses of 1 and 4, respectively.
Conduct three iterations to estimate the root of the equation.
Find the absolute relative approximate error at the end of each iteration.
Find the number of significant digits that are at least correct at the end of each iteration.
Solution
Rewrite the equation x3=20 in the form f(x)=0 that gives
f(x)=x3−20=0
Check if the function changes the sign between the two initial guesses, xl and xu. The initial guesses are given as xl=1 and xu=4
f(xl)=f(1)=13−20=−19
f(xu)=f(4)=43−20=44
Hence
f(xl)f(xu)=f(1)f(4)=(−19)(44)<0
This change in sign tells us that the initial bracket of [1,4] given to us is valid.
Iteration 1
xl=1, xu=4
The estimate of the root is
xm=xl+xu2=1+42=2.5
Iteration 2
Find the value of the function at the midpoint from the previous iteration and use it to determine the new bracket.
f(xm)=f(2.5)=(2.5)3−20=−4.375
f(xl)f(xm)=f(1)f(2.5)=(−19)(−4.375)>0
Since f(xl)f(xm)>0, the root does not lie between xl and xm, but between xm and xu, that is, 2.5 and 4.
xl=2.5, xu=4
The estimate of the root is
xm=xl+xu2=2.5+42=3.25
The absolute relative approximate error |εa| at the end of Iteration 2 is
|εa|=|xnewm−xoldmxnewm|×100=|3.25−2.53.25|×100=23.1%
None of the significant digits are at least correct in the estimated root of the equation because the absolute relative approximate error is greater than 5%.
Iteration 3
Find the value of the function at the midpoint from the previous iteration and use it to determine the new bracket.
f(xm)=f(3.25)=(3.25)3−20=14.3281
f(xl)f(xm)=f(2.5)f(3.25)=(−4.375)(14.3281)<0
Since f(xl)f(xm)<0, the root does lie between xl and xm, that is, 2.5 and 3.25.
xl=2.5,xu=3.25
The estimate of the root is
xm=xl+xu2=2.5+3.252=2.875
The absolute relative approximate error |εa| at the end of Iteration 3 is
|ϵa|=|xnewm−xoldmxnewm|×100=|2.875−2.52.875|×100=13.0%
Still, none of the significant digits are at least correct in the estimated root of the equation as the absolute relative approximate error is greater than 5%.
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 the water.
The equation that gives the depth x to which the ball is submerged underwater is given by
x3−0.165x2+3.993×10−4=0
Use the bisection method of finding roots of equations to find the depth x to which the ball is submerged underwater. Conduct three iterations to estimate the root of the above equation. Find the absolute relative approximate error at the end of each iteration, and the number of significant digits at least correct at the end of each iteration.
Solution
From the physics of the problem, the ball would be submerged somewhere between x=0 and x=2R,
where
R=radius of the ball,
that is
0≤x≤2R
0≤x≤2(0.055)0≤x≤0.11

Let’s us assume
xl=0, xu=0.11
Check if the function changes sign between xl and xu.
f(xl)=f(0)=(0)3−0.165(0)2+3.993×10−4=3.993×10−4
f(xu)=f(0.11)=(0.11)3−0.165(0.11)2+3.993×10−4=−2.662×10−4
Hence
f(xl)f(xu)=f(0)f(0.11)=(3.993×10−4)(−2.662×10−4)<0
So, there is at least one root between xl and xu, that is between 0 and 0.11.
Iteration 1
The estimate of the root is
xm=xl+xu2=0+0.112=0.055
f(xm)=f(0.055)=(0.055)3−0.165(0.055)2+3.993×10−4=6.655×10−5
f(xl)f(xm)=f(0)f(0.055)=(3.993×10−4)(6.655×10−4)>0
Hence the root is bracketed between xm and xu, that is, between 0.055 and 0.11. So, the lower and upper limit of the new bracket is
xl=0.055, xu=0.11
At this point, the absolute relative approximate error |ϵa| cannot be calculated as we do not have a previous approximation.
Iteration 2
The estimate of the root is
xm=xl+xu2=0.055+0.112=0.0825
f(xm)=f(0.0825)=(0.0825)3−0.165(0.0825)2+3.993×10−4=−1.622×10−4
f(xl)f(xm)=f(0.055)f(0.0825)=(6.655×10−5)×(−1.622×10−4)<0
Hence, the root is bracketed between xl and xm, that is, between 0.055 and 0.0825. So, the lower and upper limit of the new bracket is
xl=0.055, xu=0.0825
The absolute relative approximate error |ϵa| at the end of Iteration 2 is
|ϵa|=|xnewm−xoldmxnewm|×100=|0.0825−0.0550.0825|×100=33.33%
None of the significant digits are at least correct in the estimated root of xm=0.0825 because the absolute relative approximate error is greater than 5%.
Iteration 3
xm=xl+xu2=0.055+0.08252=0.06875
f(xm)=f(0.06875)=(0.06875)3−0.165(0.06875)2+3.993×10−4=−5.563×10−5
f(xl)f(xm)=f(0.055)f(0.06875)=(6.655×105)×(−5.563×10−5)<0
Hence, the root is bracketed between xl and xm, that is, between 0.055 and 0.06875. So the lower and upper limit of the new bracket is
xl=0.055, xu=0.06875
The absolute relative approximate error |ϵa| at the ends of Iteration 3 is
|ϵa|=|xnewm−xoldmxnewm|×100=|0.06875−0.08250.06875|×100=20%
Still, none of the significant digits are at least correct in the estimated root of the equation as the absolute relative approximate error is greater than 5%.
Seven more iterations were conducted, and these iterations are shown in Table 3.3.3.1.
Iteration | xl | xu | xm | |ϵa|% | f(xm) |
---|---|---|---|---|---|
1 | 0.00000 | 0.11 | 0.055 | −−− | 6.655×10−5 |
2 | 0.055 | 0.11 | 0.0825 | 33.33 | −1.622×10−4 |
3 | 0.055 | 0.0825 | 0.06875 | 20.00 | −5.563×10−5 |
4 | 0.055 | 0.06875 | 0.06188 | 11.11 | 4.484×10−6 |
5 | 0.06188 | 0.06875 | 0.06531 | 5.263 | −2.593×10−5 |
6 | 0.06188 | 0.06531 | 0.06359 | 2.702 | −1.0804×10−5 |
7 | 0.06188 | 0.06359 | 0.06273 | 1.370 | −3.176×10−6 |
8 | 0.06188 | 0.06273 | 0.0623 | 0.6897 | 6.497×10−7 |
9 | 0.0623 | 0.06273 | 0.06252 | 0.3436 | −1.265×10−6 |
10 | 0.0623 | 0.06252 | 0.06241 | 0.1721 | −3.0768×10−7 |
At the end of the 10th iteration,
|ϵa|=0.1721%
Hence the number of significant digits at least correct is given by the largest value of m for which
|ϵa|≤0.5×102−m
0.1721≤0.5×102−m
0.3442≤102−m
log(0.3442)≤2−m
m≤2−log(0.3442)=2.463
So
m=2
The number of significant digits at least correct in the estimated root of 0.06241 at the end of the 10th iteration is 2.
Lesson 4: Advantages and Pitfalls of Bisection Method
Learning Objectives
After successful completion of this lesson, you should be able to
1) enumerate the advantages of the bisection method and the reasoning behind them.
2) list the drawbacks of the bisection method and the reason behind them.
Advantages of the bisection method
a) The bisection method is always convergent. Since the technique brackets the root, the procedure 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 bisection method
a) The convergence of the bisection method is slow as it is based on halving the interval.
b) If one of the initial guesses is closer to the root, it will take a larger number of iterations to reach the root.
c) If a function f(x) is such that it just touches the x-axis (Figure 3.3.4.1) such as
f(x)=x2=0
it will be unable to find the lower guess, xl, and upper guess, xu, such that
f(xl)f(xu)<0
d) For functions f(x) where there is a singularity, and it reverses the sign at the singularity, the bisection method may converge on the singularity (Figure 3.3.4.2). An example includes
f(x)=1x
where xl=−2, xu=3 are valid initial guesses which satisfy
f(xl)f(xu)<0
However, the function is not continuous, and the theorem that a root exists is also not applicable.
_%253Dx2%253D0.png?revision=1)
_%253D1x%253D0.png?revision=1)
Audiovisual Lecture
Title: Bisection Method: Advantages and Drawbacks
Summary: This video discusses the advantages and drawbacks of the bisection method - a numerical method to find roots of a nonlinear equation.
Multiple Choice Test
(1). The bisection method of finding roots of nonlinear equations falls under the category of a(n) _________ method.
(A) open
(B) bracketing
(C) random
(D) graphical
(2). If f(a)f(b)<0 for a real continuous function f(x), then in the domain of [a,b] for f(x)=0, there is (are)
(A) one root
(B) an undeterminable number of roots
(C) no root
(D) at least one root
(3). Assuming an initial bracket of [1,5], the second (at the end of 2 iterations) iterative value of the root of te−t−0.3=0 using the bisection method is
(A) 0
(B) 1.5
(C) 2
(D) 3
(4). To find the root of f(x)=0, a scientist is using the bisection method. At the beginning of an iteration, the lower and upper guesses of the root are xl and xu. At the end of the iteration, the absolute relative approximate error in the estimated value of the root would be
(A) |xuxu+xl|
(B) |xlxu+xl|
(C) |xu−xlxu+xl|
(D) |xu+xlxu−xl|
(5). For an equation like x2=0, a root exists at x=0. The bisection method cannot be adopted to solve this equation in spite of the root existing at x=0 because the function f(x)=x2
(A) is a polynomial
(B) has repeated zeros at x=0
(C) is always non-negative
(D) has a slope equal to zero at x=0
(6). The ideal gas law is given by
pv=RT
where p is the pressure, v is the specific volume, R is the universal gas constant, and T is the absolute temperature. This equation is only accurate for a limited range of pressure and temperature. Vander Waals came up with an equation that was accurate for larger ranges of pressure and temperature given by
(p+av2)(v−b)=RT
where a and b are empirical constants dependent on a particular gas. Given the value of R=0.08, a=3.592, b=0.04267, p=10 and T=300 (assume all units are consistent), one is going to find the specific volume, v, for the above values. Without finding the solution from the Vander Waals equation, what would be a good initial guess for v?
(A) 0
(B) 1.2
(C) 2.4
(D) 3.6
For complete solution, go to
http://nm.mathforcollege.com/mcquizzes/03nle/quiz_03nle_bisection_solution.pdf
Problem Set
(1). Find the estimate of the root of x2−4=0 by using the bisection method. Use initial guesses of 1.7 and 2.4. Conduct three iterations, and calculate the approximate error, true error, absolute relative approximate error, and absolute relative true error at the end of each iteration.
- Answer
-
Iteration # Root Estimate Approx Error True Error Abs Rel Approx Error Abs Rel True Error 1 2.05 −−− −0.05 −−− 2.5% 2 1.875 −0.175 0.125 9.33% 6.25% 3 1.9625 0.0875 0.0375 4.45% 1.875%
(2). You are working for DOWN THE TOILET COMPANY that makes floats for ABC commodes. The 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 will get submerged when floating in the water.
The equation that gives the depth x (unit of x is meters) to which the ball is submerged under water is given by
x3−0.165x2+3.993×10−4=0
Solving it exactly would require some effort. However, using numerical techniques such as the bisection method, we can solve this equation and any other equation of the form f(x)=0. Solve the above equation by the bisection method and do the following. Use initial guesses of x=0 and x=0.11.
a) Conduct three iterations.
b) Calculate the absolute relative approximate error at the end of each step.
c) Find the number of significant digits at least correct at the end of each iteration.
d) How can you use the knowledge of the physics of the problem to develop initial guesses for the bisection method?
- Answer
-
a) 0.055,0.0825,0.06875
b) n/a,33.333%,20.00%
c) n/a,0,0
d) Since the diameter is 0.11 m, initial guesses of 0 and 0.11 are reasonable starting values
(3). The velocity of a body is given by the following equation
v(t)=te−t+1t
where
t is given in seconds and v is given in m/s.
Find the time when the velocity of the body will be 0.35 m/s. Use bisection method and conduct three iterations. Use initial bracketing guess of [1,8]. Show all steps in calculating the estimated root, absolute relative approximate error and the velocity of the body for each iteration. Also, tabulate your answers as iteration number, estimated root, absolute relative approximate error, and velocity of the body.
- Answer
-
Iteration Estimated Root |ϵa|% v(t) (m/s) 1 4.500 − 0.27221 2 2.750 63.663 0.53944 3 3.6250 24.138 0.37247
(4). Enumerate the drawbacks of the bisection method of solving nonlinear equations.
(5). The velocity of a body is given by
v=5e−t+4+sin(t),
where
v is given in m/s,
t is given in s.
Derive the nonlinear equation that you will need to solve to find when the acceleration of the body would be 1.54 m/s2. Find the solution of the equation by using three iterations of the bisection method.
- Answer
-
The equation has no real roots. Note the question asks when acceleration is 1.54 m/s2
(6). To solve the equation f(x)=0, an engineer is using the bisection method. He starts with an initial valid bracket of [2,7]. Find the maximum possible absolute true error in his estimate of the root at the end of two iterations. Show your reasoning clearly for your answer.
- Answer
-
1.25
(7). Estimate the next guess for the root of x2−16=0 by using a modified bisection method as explained below. The initial bracket of [1,8] is found as a valid bracket. In the case of bisection method, the root estimated at the end of the first iteration is the midpoint between 1 and 8. Instead, in the modified bisection method, the root estimated at the end of the first iteration would be the point where the straight line drawn from the function at x=1 to the function at x=8 crosses the x -axis. What is this estimate of the root?
- Answer
-
2.667