Babylonian method of computing square roots
1 Description
To compute the square root of a number which lies between 0 and 2, one may use a method of successive approximations which involves only the operations of squaring and averaging. The basis of method is the binomial identity:
Write the number whose square root is to be computed as . Write the square root of the number as . By definition, one has
Using the binomial identity,
Cancelling,
Moving terms from one side to the other,
Dividing by 2,
Even though appears alone on one side of the equation, we cannot use it directly to obtain because also appears on the other side. However, if lies between and , then is smaller than and is even smaller. So, as a first approximation, the occurrence of on the right hand side can be ignored. One then obtains a second approximation to as . To obtain a third approximation to , one can substitute the second approximation into the right hand side. One can continue this process of substituting the preceding approximation into the right hand side and computing the next approximation forever. In symbols, this procedure may be described as follows:
As we shall see, this procedure converges to the correct value of in the limit as .
2 Examples
To illustrate this, consider . Since , it is the case that so the recursion is as follows:
The first few approximations look as follows:
Hence, the eighth approximation for is . Squaring this, we see that it agrees with to five decimal places. To be sure, the Babylonians would have written their numbers is base 60 rather than base 10 as we do, yet the calculation of given above is substantially the same as was carried out centuries ago by ancient scholars on clay tablets.
As it shall be seen, this method requires that the number whose square root is to be computed lie between 0 and 2 in order to converge. However, with a few simple hacks, it is possible to use it to compute the square roots of numbers which lie outside of this range. One possibility is to compute the square root of the reciprocal of the number. For example, one can take the reciprocal of the result obtained above to obtain 1.41421 as a value for .
However, this is not so good a strategy for computing the square roots of large numbers — the reciprocal of a large number is a small number, and will turn out that the method takes a long time to converge. A better strategy is to divide the number in question by a perfect square to obtain a number in the suitable range.
How this works can be illustrated by computing . The perfect sqare is close to . So, instead of computing , consider . Once this has been computed, one can multiply by to obtain the answer because . In this case, , the recursion looks like
and the approximations go as follows:
Subtracting from 1 and multiplying by 3, one obtains 3.16227 as a value for , which is good to 5 decimal places.
3 Convergence
Having shown that how this method works, it is now time to make sure that it really does work. As a first step, it will be shown that, if lies between and , then all approximations lie between and as well. By definition lies in the required range, since it is defined to be 0. Suppose that lies in the range. Then, by definition,
Since both and lie between and , it follows that their average must lie in the same range.
To show convergence, the recursion will subtracted from a shifted version of itself like so:
The right hand side, being a difference of squares, may be factored.
For ease of explanation, define the quantity . In terms of this entity, the above equation may be written as
The proof will now proceed differently for the cases of positive and negative. (The in-between case is trivial.) If is positive, then it readily follows from the recursion that is positive for all . Hence, is also positive for all . Now, , so is positive. Since the product of two positive quantities is positive, it follows by induction that is positive for all . By definition, this means that for all . Since we know that is less that for all and bounded increasing sequences converge, it follows that the sequence is convergent.
If is negative, then it can be shown that lies between and for all . This is trivially true for . Assume that it is true for a particular value of . Then is positive and smaller than . Hence, lies between and , so , which equals , lies between and .
Consequently, will lie between and . By the recursion for , one therefore has
from which it follows that
By definition of , one has
If lies between and , then is smaller than in absolute value, so it follows from Cauchy’s criterion that the sequence converges.
It is not enough that the sequence converges; it must converge to the right value. This, however, is easily checked. Take the limit of both sides of the recursion:
Defining , it follows that
Reading the algebraic argument at the beginning of this entry backwards, one sees that is indeed the square root of as it is supposed to be.
Title | Babylonian method of computing square roots |
---|---|
Canonical name | BabylonianMethodOfComputingSquareRoots |
Date of creation | 2013-03-22 15:16:45 |
Last modified on | 2013-03-22 15:16:45 |
Owner | rspuzio (6075) |
Last modified by | rspuzio (6075) |
Numerical id | 9 |
Author | rspuzio (6075) |
Entry type | Algorithm |
Classification | msc 00A05 |
Classification | msc 01A17 |
Related topic | BombellisMethodOfComputingSquareRoots |