Skip to main content

Section 7.1 Root Finding: Two Pre–Calculus Approaches

Subsection 7.1.1 The Bisection Method

The Bisection Method is what nearly everyone would think of first when faced with an approximation problem. It sounds very complicated when written out in words and symbols, as we’re about to do, but it is really quite simple. It will help if you do the computations along with us, rather than just reading them.

Example 7.1.1. \(\sqrt{2}\) via Bisection.

For the sake of having a definite problem to work with suppose we want to compute a decimal approximation to \(\sqrt{2}\text{.}\) The Bisection Method works like this: First pick two numbers, one less than \(\sqrt{2}\text{,}\) and one greater than \(\sqrt{2}\text{,}\) In this example we’ll choose \(1\) and \(2\text{.}\)
Next, we take the midpoint of the interval \([1,2]\) as our first approximation to \(\sqrt{2}\text{.}\) We’ll call this \(r_1\text{.}\) The midpoint is the average of the endpoints so in this example \(r_1 = \frac{1+2}{2}=\frac{3}{2}\text{.}\) Since \(\sqrt{2}\) and \(\frac32\) are both in the bracketing interval \([1,2]\) we see that the distance between \(\sqrt{2}\) and \(\frac32\) is less than \(1\text{,}\) the length of the interval.
Now \(\sqrt{2}\) must either be in the interval \([1,3/2]\) or \([3/2,2]\text{.}\) We need to decide which one. Since \(2\lt\frac94=\left(\frac32\right)^2\) we see that \(\sqrt{2}\lt\frac32\) so that \(\sqrt{2}\) must be in the interval \([1,3/2]\text{.}\)
We take our next approximation to be the midpoint of the (smaller) interval \([1,3/2]\text{.}\) Thus, \(r_2=\frac{1+\frac32}{2}= \frac54=1.25\text{.}\) Since \(\left(\frac54\right)^2\le2\) (confirm this) we have \(\sqrt{2}\) bracketed by
\begin{equation*} \frac54\le\sqrt{2} \le\frac32. \end{equation*}
This is really the whole idea. If we are approximating a number, \(\alpha\text{,}\) we begin by bracketing \(\alpha\) between two known numbers, say \(a\) and \(b\text{.}\) We take the average of these, \(r_1=\frac{a+b}{2}\text{,}\) as our first approximation of \(\alpha\text{.}\) We know that \(r_1\) is within \(\abs{b-a}\) (the length of the interval \([a,b]\)) of \(\alpha\text{.}\) If this is sufficiently accurate we use \(r_1\) as our approximation.
If not we determine if \(\alpha\) is in the first half–interval, \(\left[a, \frac{a+b}{2}\right]\) or the second, \(\left[\frac{a+b}{2},b\right]\text{,}\) and repeat the process, finding a new approximation \(r_2\) in an interval half the length of the first.
The Bisection Method generates a sequence of approximations, \(r_1, r_2, r_3, \ldots\) of the root we seek. In our example we have \(r_1=\frac32, r_2=\frac54\) and so on. At each step the new approximation is the midpoint of an interval whose length is one–half of the length of the previous interval. So our approximations can be made as close to the target as we would like.

Problem 7.1.2. Bisection Method.

This problem refers to Example 7.1.1.
(a)
Show that the next two iterations are \(r_3=\frac{11}{8}=1.375\) and \(r_4=\frac{23}{16}=1.4375\text{.}\)
(b)
The starting interval matters.
  1. For this example take the initial interval to be \([1,10]\) and compute \(r_1,r_2, r_3\) and \(r_4\text{.}\)
  2. Now take the initial interval to be \([1/4,3/4]\) and compute \(r_1,r_2, r_3\) and \(r_4\text{.}\)
If you had to do these computations with paper and pencil would you use \([1,2]\text{,}\) \([1,10]\text{,}\) or \([1/4,3/4]\) as your starting interval? Explain
Although we couched it as a purely arithmetic computation, when we compute \(\sqrt{2}\) it should be clear that we found the positive root of the function \(f(x)=x^2-2.\) In fact the Bisection Method can be used to find the roots of any continuous function.

Problem 7.1.3. Bisection Method.

Notice that for each of the functions below \(f(4)\gt0\text{.}\) Find the largest positive integer \(r_1\) such that \(f(r_1)\lt 0\text{.}\) This says that a positive root for the function lies in the interval \([r_1, 4]\text{.}\) Use the Bisection Method to compute the next four approximations, \(r_2, r_3, r_4\) and \(r_5\text{.}\)
(a)
\(f(x)=x^2-5\)
(b)
\(f(x)=x^2-10\)
(c)
\(f(x)=x^3-7\)
(d)
\(f(x)=x^9-11\)
(e)
\(f(x)=x^5-x^2-8\)
(f)
\(f(x) = x^3+3x^2-17x+6\)
The Bisection Method is simple, very general, and it always works. But, even in ideal circumstances, it is not an efficient algorithm. Despite all of our high–speed computational technology this is a drawback. We’d like something more efficient.

Subsection 7.1.2 The Babylonian Method for Square Roots

As early as \(1600\) BC, the ancient Babylonians
 3 
https://mathshistory.st-andrews.ac.uk/HistTopics/Babylonian_mathematics/
were using the approximation \(\sqrt{2}\approx17/12\approx 1.41667,\) which is within \(3/1000\) of the correct value. As with much ancient mathematics we don’t really know how the Babylonians obtained this kind of accuracy. However Heron of Alexandria
 4 
https://mathshistory.st-andrews.ac.uk/Biographies/Heron/
(circa 10 AD –70 AD) described a method which may be the same as the Babylonian method. The method he described is as follows.
As with the Bisection Method we begin by making a guess for \(\sqrt{2}.\) We’ll label our first guess \(r_1\) as before. Just as with the Bisection Method we’d like to have \(\sqrt{2}\) bracketed between two numbers. Problem 7.1.4 shows how to do that.

Problem 7.1.4. Babylonion (Heron’s) Method.

Show that if \(r_1 \lt \sqrt{2}\) then \(\frac{2}{r_1} \gt \sqrt{2}\text{,}\) and that if \(r_1 \gt \sqrt{2}\) then \(\frac{2}{r_1} \lt \sqrt{2}\text{.}\)
Here we will let \(r_1=1\) be our guess and notice that \(r_1\lt\sqrt{2}\text{.}\) In light of Problem 7.1.4 we see that \(\frac{2}{r_1}=\frac{2}{1}\gt\sqrt{2}\) so, as before, we have \(\sqrt{2}\) somewhere in the interval \([1,2]\text{.}\) Also as before, we take the average of these two numbers to get our second approximation,
\begin{equation*} r_2 = \frac12\left(r_1+\frac{2}{r_1}\right) = \frac12\left(1+\frac21\right) = \frac32. \end{equation*}
In the Bisection Method we needed to determine if this was less than or greater than \(\sqrt{2}\text{.}\) In the Babylonian algorithm it doesn’t matter for \(\sqrt{2}\) will always be between \(r_2\) and \(\frac{2}{r_2}\) (by Problem 7.1.4). We average these together to get our third approximation,
\begin{equation*} r_3=\frac12\left(r_2+\frac{2}{r_2}\right)=\frac12\left(\frac32+\frac{2}{\frac32}\right)=\frac12\left(\frac32+\frac43\right)=\frac{17}{12}. \end{equation*}
This is the Babylonian approximation which we mentioned earlier is within \(1/1000\) of the correct value.
It’s pretty remarkable that we can get such a good approximation of \(\sqrt{2}\) with so little arithmetic. If we were to apply the algorithm again, we would get an even closer approximation.

Problem 7.1.5. Babylonion (Heron’s) Method.

Compute \(r_4\text{.}\) You should get an approximation within \(3/1000000\) of the correct value. Do you?

Problem 7.1.6. Babylonion (Heron’s) Method.

Write down the Babylonian method, as described by Heron, as a step-by-step algorithm.
(a)
Choose an initial guess and then use your algorithm to compute an approximation of \(\sqrt{5}\text{.}\)
(b)
Approximate \(\sqrt{10}\) using the Babylonian method.

Problem 7.1.7. Babylonion (Heron’s) Method.

(a)
Suppose you wanted to use the Babylonian algorithm to approximate \(\sqrt{4}\) and started with an initial guess of \(2\text{.}\) What would happen?
Yes, we know this is \(2\) is already the square root of \(4\text{.}\) We’re making a point. Work with us here.
(b)
What would happen in the general case for \(\sqrt{N^2}\) if you ever got \(r_n=N\text{?}\)
Again, no one knows how the Babylonians discovered this algorithm, but some interesting questions arise from it: What about \(\sqrt[3]{2}?\) Is there some similar algorithm that approximates cube roots? Fourth roots? Fifth? Two hundred and eighty–seventh roots?
Of course the answer to all of these questions is yes, otherwise we wouldn’t have asked. But to see why we’ll have to step away from Heron and the Babylonians for a bit.