Solving equations using interval bisection
Categories: numerical methods pure mathematics

The previous article discussed using numerical methods to solve equations of the form
In this article we will look at one of the simplest methods, interval bisection.
Example problem
As a simple example, we will solve the equation:
This equation has a solution
To use the technique we need to have a rough idea of where the solution is. It is useful to sketch a graph of the function:
We need to specify interval (ie a range of
The process of interval bisection proceeds as follows:
- Start with an initial interval (1 to 2 in this case).
- Divide the interval into two equal halves.
- Determine whether the solution is in the lower half or the upper half.
- Repeat step two with the selected half.
Steps 2 to 4 are repeated until a sufficiently accurate result is obtained, as described in the solving equations article. On each pass, the interval width is halved, so the approximation becomes more accurate. When the result is accurate enough, the process ends.
A graphical explanation of interval bisection
To gain an intuitive understanding of the process, we will go through a couple of iterations and show the results on a graph. This is for illustration only, you don't need to draw an accurate graph to use this method.
First iteration
The first iteration starts with an interval
We now find the midpoint of the interval:
We use this to divide the original interval in half to create 2 intervals
The solution of the equation is the point where the curve crosses the x-axis. In this case, the solution is in the lower interval
Second iteration
The second iteration starts with the new interval
The new midpoint is 1.25:
This time the solution is in the upper interval
Third iteration
The third iteration starts with the new interval
The new midpoint is 1.375:
The solution is in the upper interval
On each iteration, the width of the interval is halved, starting at 1, then 0.5, then 0.25. After 10 iterations the interval width will be about 0.00097, so we will have calculated the square root of 2 to about 3 decimal places. After 20 iterations we will know the answer to around 6 decimal places, and after 30 we will be accurate to around 9 decimal places. Although this would be tedious (but not impossible) to do manually, for a computer it would take almost no time at all.
Interval bisection by calculation
In the example above, we have relied on the fact that we have a very accurate graph of the function to determine whether the solution is in the first or second half of the interval. But is it possible to determine this by calculation alone. Of course, it is still useful to have an initial sketch graph to find a suitable starting interval.
For each iteration:
- Start with the current values of
and . - Calculate
as - Calculate the values of
, , and . - Based on the signs of
, , and , determine if the solution is in or . - Repeat with the new range.
In this case,
Here is the calculation based on
a | b | m | f(a) | f(b) | f(m) |
---|---|---|---|---|---|
1 | 2 | 1.5 | -1 | 2 | 0.25 |
Notice that
For the second iteration, we therefore start with
a | b | m | f(a) | f(b) | f(m) |
---|---|---|---|---|---|
1 | 1.5 | 1.25 | -1 | 0.25 | -0.4375 |
This time,
For the third iteration, we therefore start with
See also

Join the GraphicMaths Newletter
Sign up using this form to receive an email when new content is added:
Popular tags
adder adjacency matrix alu and gate angle answers area argand diagram binary maths cartesian equation chain rule chord circle cofactor combinations complex modulus complex polygon complex power complex root cosh cosine cosine rule countable cpu cube decagon demorgans law derivative determinant diagonal directrix dodecagon eigenvalue eigenvector ellipse equilateral triangle euler eulers formula exercises exponent exponential exterior angle first principles flip-flop focus gabriels horn gradient graph hendecagon heptagon hexagon horizontal hyperbola hyperbolic function hyperbolic functions infinity integration by parts integration by substitution interior angle inverse hyperbolic function inverse matrix irrational irregular polygon isosceles trapezium isosceles triangle kite koch curve l system line integral locus maclaurin series major axis matrix matrix algebra mean minor axis n choose r nand gate newton raphson method nonagon nor gate normal normal distribution not gate octagon or gate parabola parallelogram parametric equation pentagon perimeter permutations polar coordinates polynomial power probability probability distribution product rule proof pythagoras proof quadrilateral questions radians radius rectangle regular polygon rhombus root sech segment set set-reset flip-flop sine sine rule sinh sloping lines solving equations solving triangles square square root standard curves standard deviation star polygon statistics straight line graphs surface of revolution symmetry tangent tanh transformation transformations trapezium triangle turtle graphics uncountable variance vertical volume volume of revolution xnor gate xor gate