4

How can I find the square root of a number without using a calculator?

amWhy
  • 210,739
Fabricio
  • 421
  • 1
  • 6
  • 10
  • 2
    Here is an algorithm that can be done by hand: http://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Decimal_.28base_10.29 – Ayman Hourieh Jun 16 '13 at 13:25
  • @AymanHourieh: there is a similar method for computing cube roots (and higher). I used these algorithms to implement square and cube roots for a numerics package when I worked at Apple. – robjohn Jun 16 '13 at 15:34

2 Answers2

5

Newton's method says that $$ x_{k+1}=\frac{n+x_k^2}{2x_k} $$ converges to $\sqrt{n}$.

robjohn
  • 353,833
4

One approach: find a perfect square close to your number. E.g. for $23$, we could take $25$. Now write (for this example) $\sqrt{23} = 5 \sqrt{23/25} = 5 \sqrt{1 - 2/25}.$ Now if we want to compute $\sqrt{1 - x}$ where $|x| < 1$, there is the binomial series:

$$\sqrt{1 - x} = 1 - \dfrac{1}{2} x - \dfrac{1}{8} x^2 + \cdots.$$

In our examples this gives $\sqrt{1 - 2/25} = 1 - \dfrac{1}{25} - \dfrac{1}{1250} + \cdots,$ giving $\sqrt{23} = 5 - \dfrac{1}{5} - \dfrac{1}{250} + \cdots \sim 4.796,$ which isn't a bad approximation.


Another approach is to define the sequence $x_{n+1} = (x_n + A/x_n)/2$, where $A$ is the number whose square root you are trying to compute. (Here you start with $x_0$ some reasonable ball-park estimate to $\sqrt{A}$.) Then $x_n$ will converge to $\sqrt{A}$. (This is a special case of Newton's method, applied here to find a root of $x^2 - A = 0$.)

In the case of $A = 23$, we might take $x_0 = 5$, then $x_1 = 4.8$, and $x_2 \sim 4.796$ again.

Matt E
  • 127,227