Square roots computation

To my shame, I did not know how to extract a square root by hand before yesterday.  I am currently reading a french translation of Galileo’s Dialogue Concerning the Two Chief World Systems.:

Dialogue sur les deux grands systèmes du monde, by Galileo Galilei, translated from italian to french by R. Fréreux and F. de Gandt, 1992, Seuil, Paris.

The text is a conversation between three people about the pros and cons of the Ptolemaic and Copernician worldviews (spoiler: Galileo favors Copernicus).  A mathematician, Salviati, and an Aristotelician philosopher, Simplicio,  give a supposedly neutral third-party, Sagredo, arguments for and against the system of Copernicus.  There are a lot of events before and after the publication of this book that led to Galileo’s condemnation, but this was the main cause.  The text is divided into four parts, each covering a day of discussion. Anyway, during day two, Salviati has to extract a square root to compute the duration of a free fall. The translators give some explanations in a footnote, which is where I learned how to do it.  I want to explain the algorithm on an example.

Let us consider an integer chosen at random, for instance 179154. We want to find the largest integer n such that

\displaystyle    n^2\le 179154.


\displaystyle    100^2= 10\,000 < 179\,154 < 1\,000\,000 = 1\,000^2,

the integer n is between 100 and 1 000; it therefore has three digits. In practice, to find out the number of digits in the results, we cut the integer into blocks of two digits:

\displaystyle    17\,|\,91\,|\,54.

Since we find three blocks, the result will have three digits.

The result n can therefore be written as

\displaystyle    n= a \times 100 + b \times 10 +c

where a, b, and c ar the digits. The algorithm allows us to compute these digits one after the other, starting with a.

Let us first find a. It must be the greatest integer (between 1 and 9) such that

\displaystyle    (a \times 100)^2 \le 179\,154.

Since the left-hand side of the inequality above has a decimal expansion that ends with four zeros, this is the same as asking for the greatest integer such that

\displaystyle    (a \times 100)^2 \le 170\,000,

that is to say, the greatest integer such that

\displaystyle    a^2 \le 17.

We find a=4 and 17-4^2=17-16=1.

Let us now compute b. Once again, we can forget about the digits that come after and say that b is the greatest integer (between 0 and 9) such that

\displaystyle    (400+b\times 10)^2 \le 179\,154,

which is the same as the greatest integer such that

\displaystyle    (40+b)^2 \le 1\,791.

We have

\displaystyle    (40+b)^2=400^2+2\times 40\times b + b^2= 40^2 + (2\times 40 +b)\times b.

The equality 17-4^2=1 gives, when multiplied by 10, 1\,700-40^2=100. If we subtract 40^2 on both side, we get the equivalent inequality

\displaystyle    (2\times 40 +b)\times b \le 191.

We find, by trial and error, that the greatest value for which this holds is b=2. We have then 191-82\times 2 = 191-164=27, which, going backward, also gives


We now look for the last digit c. It is the greatest integer between 0 and 9 such that

\displaystyle    (42\times 10 +c)^2\le 179\,154.

We find

\displaystyle    420^2+2\times 230\times c +b^2=420^2+(2\times 420+c)\times c \le 179\,154.

We have 179\,100-420^2=2700. We find the equivalent inequality

\displaystyle    (2\times 420 +c )\times c \le 2754.

This inequality holds up to c= 3, with 2754 - 843\times 3 = 225. The final result is

\displaystyle    179\,154=423^2+225.

This was a bit long-winded. I hope it is clear enough. To conclude, we would in practice write the computations in the following way:

\displaystyle    \begin{array}{rrrcl}  17&91&54&|&4^2=16\\    -16&\, &\, &|&\,\\    1&91&\, &|&82\times 2 = 162\\    - 1&62& \, &|&\,\\    \, &27&54 &|&843\times 3 = 2\,529\\    \,&-25&29&|&\,\\    \, &\,2&25&|&\,\\    \end{array}


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s