Babylonian Algorithm for Computing Square Roots

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

The Babylonian algorithm is an ancient method for approximating the square root of a given number through a sequence of rationals. In spite of its longevity, this method is still the most popular, effective and simplest technique for this purpose.

[more]

Let be the number whose square root is to be approximated. Start by taking a rectangle of base and height , and an initial guess of such that . (Clearly, this can be obtained by setting and .) Then, calculate the midpoint of and to get the first estimate of . This method attempts to "square" the rectangle by equalizing its side lengths.

Repeating this process for some , we obtain the recursive formula:

.

The sequence is bounded and monotone, and therefore convergent. The Babylonian method is actually a particular case of the Newton–Raphson iteration, and consequently, it converges quadratically; that is, the number of accurate digits in the approximation nearly doubles after each iteration. More specifically, we have:

.

This Demonstration gives numerical estimations to the square roots of 2, 3, 5, 7, 11 up to 50 decimals using the Babylonian algorithm and illustrates the convergence process by plotting connected red dots for the sequential approximations. The actual value of the square root is represented in the plot by a solid black line.

[less]

Contributed by: Allan Zea (November 2016)
Suggested by: Dr. Jean Carlos Liendo
Open content licensed under CC BY-NC-SA


Snapshots


Details



Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.
Send