In the method of bisection, we approximate a solution of the equation f(x) = 0, where f(x) is a continuous function, by means of a successive reduction of intervals that contain the solution.
Let f(x) be a continuous function, and let
and
be in the
domain of f(x), where
, such that
,
, and
and
have opposite signs. Then, as
we have seen, there is some
between
and
such that
. There may be several such values, but let us assume that
is unique in this respect. Without any previous knowledge of
f(x), we can make no conclusions about the location of
with
respect to
and
, other than the fact that
lies in the
interval
. If we choose some point
between
and
, then this solution
must lie either in the interval
, or in the interval
. We can determine which
interval by considering the value of
. If
, then
our solution is
, and no additional work must be done to
find
. However, if
, then our solution
will
lie in the interval whose endpoints yield opposite signs when evaluated
by f(x). Thus
lies in
if
and
have
opposite signs, and
lies in
if
and
have opposite signs. Since
is the unique solution to f(x) = 0
on
, then only one of the two intervals will be such that
f(x) yields opposite signs when evaluated at the endpoints. We have
now found a subinterval of
which contains
--let us
denote it as
. We then proceed in the same manner with this
subinterval,
, to enclose
on a smaller subinterval,
. We continue this until we find a subinterval
,
containing
, such that every point in the subinterval lies within
a given distance of
. To maximize the effectiveness of the choice
of
for each i,
, since we have no previous
knowledge of f(x), we take
to be the midpoint of the interval
,
thus bisecting
into two smaller subintervals.
Example 1 Let us employ the method of bisection to approximate the positive solution of the equation
Here we can actually solve our equation to obtain the solutions
, the value that we seek to approximate being
, to ten decimal places. For this problem our
function
, which is continuous over the set of all real
numbers. To apply the bisection method, we need initial upper and lower
bounds for the solution. Note that f(1) = -1 and f(2) = 2, which
implies that we can take
and
as our initial bounds.
The following table illustrates the rate of convergence of the bisection
method for the positive solution of the equation
with the
initial bounds on the solution being
and
.
Choosing
as our final approximation, we see
that it took more than thirty steps in order to obtain an approximation
to the solution that is accurate to nine decimal places.
Let us now consider the issue of how many times we must apply the
method of bisection until we have reduced our interval
to
one in which our approximation lies within a given distance
of the solution
.
After n - 1 applications of the bisection method, we reduce the
interval
to the
subinterval
. Note
that in bisecting the
subinterval
,
we obtain some subinterval
whose width is 1/2 of the width
of the previous subinterval. Thus the intervals are being reduced at a
linear rate of 1/2, with
By induction, we see that this implies that the
subinterval
has width
The midpoint,
, of the
subinterval is a distance of
away from either endpoint of the subinterval, and so
it must lie at most
units away from the solution
.
Therefore
The implications here are that, since
, in
order to gain an additional three decimal places of accuracy using the
bisection method, one must make about ten additional iterations. Thus
we see that the bisection method converges slowly, at a linear rate,
although it does converge. For n to be such that
is within
of
,
we need
Thus if we take
then (1) will be satisfied and we will find an approximation
that is within
of
if
However, it is not necessary to know n beforehand in order to be able to determine when to terminate a bisection procedure. It is sufficient to continue the bisection method until n is found such that
Since
must lie between
and
, it must also lie within
of either
or
.
Example 2 In Example 1 we employed the bisection method
to approximate the positive solution of
to nine decimal
places of accuracy. Thus we found
such that
Here our original interval was [1,2], implying
and
, and
. Therefore, by
(2), we know that
will satisfy (3) for
any value of n such that
Since n must be an integer, we see that we need no more than 31
iterations to give us an approximation that is within
of the solution. Note that the magnitude of the
error in the
approximation is given by
whereas the magnitude of the error in the
approximation
is
Thus, for this example, the estimate that we would need at most 31
iterations in order to approximate the solution to within
turned out to be exact.
Example 3 In this example we shall use the bisection method to approximate the values of x for which
Since a significant amount of work is involved for each decimal place of accuracy, we shall limit our approximation to three places of accuracy.
Note that the natural logarithm function,
, is increasing over
all of its domain
. Thus, for x > e, the natural logarithm
function satisfies
. Since
for all x, this implies that (4) can hold only for values
of x in the interval (0,e]. The function
is decreasing
in this interval, and since
is increasing over this interval,
we see that there is at most one value of x for which (4)
holds. Let us denote
. Then any solution of
(4) is also a solution of f(x) = 0. Note that
, whereas
. Thus we see
that f(x) = 0 has a unique solution on [1,e].
Therefore, taking
,
, and
for
each n, we obtain the following values
To three decimal places,
. Therefore the
approximate value of x that satisfies (4) is x = 1.303.
The method of bisection will always produce an approximation of a root of a continuous function f(x) provided one can find values a and b, in the domain of f(x), such that f(a) < 0 and f(b) > 0. However, as we have seen, the major drawback of this method is that it converges rather slowly. Because of this, the method of bisection is commonly utilized for the purpose of reducing the size of the interval on which a root of a given function is known to exist, and then an alternative method of root approximation is utilized to bring the approximation to within the desired amount of accuracy.