# How do you find the square root of 13?

Sep 18, 2016

Use a Newton Raphson method to find:

$\sqrt{13} \approx \frac{842401}{233640} \approx 3.60555127547$

#### Explanation:

Since $13$ is a prime number, there is no simpler form for its square root. $\sqrt{13}$ is an irrational number somewhere between $3 = \sqrt{9}$ and $4 = \sqrt{16}$.

Linearly interpolating, a reasonable first approximation would be:

$\sqrt{13} \approx 3.6 = \frac{18}{5}$

We can get better approximations from our initial one (call it ${a}_{0}$) using a Newton Raphson method.

A typical formula used to derive a more accurate approximation for $\sqrt{n}$ would be:

${a}_{i + 1} = \frac{{a}_{i}^{2} + n}{2 {a}_{i}}$

I prefer to separate ${a}_{i}$ into numerator ${p}_{i}$ and denominator ${q}_{i}$. So ${a}_{i} = {p}_{i} / {q}_{i}$ and we can iterate using the formulae:

$\left\{\begin{matrix}{p}_{i + 1} = {p}_{i}^{2} + n {q}_{i}^{2} \\ {q}_{i + 1} = 2 {p}_{i} {q}_{i}\end{matrix}\right.$

In our example, $n = 13$, ${p}_{0} = 18$, ${q}_{0} = 5$ and we find:

$\left\{\begin{matrix}{p}_{1} = {p}_{0}^{2} + 13 {q}_{0}^{2} = 324 + 13 \cdot 25 = 649 \\ {q}_{1} = 2 {p}_{0} {q}_{0} = 180\end{matrix}\right.$

If we stopped here our approximation would be:

$\sqrt{13} \approx \frac{649}{180} = 3.60 \overline{5}$

Let's try one more iteration:

$\left\{\begin{matrix}{p}_{2} = {p}_{1}^{2} + 13 {q}_{1}^{2} = 421201 + 13 \cdot 32400 = 842401 \\ {q}_{2} = 2 {p}_{1} {q}_{1} = 233640\end{matrix}\right.$

Stopping here, we have:

$\sqrt{13} \approx \frac{842401}{233640} \approx 3.60555127547$

Using a calculator:

$\sqrt{13} \approx 3.60555127546398929311$

Sep 18, 2016

Find $\sqrt{13} \approx \frac{23382}{6485} \approx 3.60555127$ using a generalised continued fraction method.

#### Explanation:

Look for a generalised continued fraction of the form:

$\sqrt{13} = a + \frac{b}{2 a + \frac{b}{2 a + \frac{b}{2 a + \ldots}}}$

$\textcolor{w h i t e}{\sqrt{13}} = a + \frac{b}{a + \sqrt{13}}$

Multiply both ends by $\left(a + \sqrt{13}\right)$ to find:

$\textcolor{red}{\cancel{\textcolor{b l a c k}{a \sqrt{13}}}} + 13 = {a}^{2} + \textcolor{red}{\cancel{\textcolor{b l a c k}{a \sqrt{13}}}} + b$

Hence:

$b = 13 - {a}^{2}$

In order that our generalised continued fraction converges quickly choose a rational approximation $a$ slightly smaller than $\sqrt{13}$.

Note that $3 = \sqrt{9} < \sqrt{13} < \sqrt{16} = 4$ so linearly interpolating we find a good approximation:

$\sqrt{13} \approx 3.6 = \frac{18}{5}$

Note also that:

${\left(\frac{18}{5}\right)}^{2} = \frac{324}{25} < \frac{325}{25} = 13$

So let $a = \frac{18}{5}$ and $b = 13 - {a}^{2} = \frac{1}{25}$ to get:

$\sqrt{13} = \frac{18}{5} + \frac{\frac{1}{25}}{\frac{36}{5} + \frac{\frac{1}{25}}{\frac{36}{5} + \frac{\frac{1}{25}}{\frac{36}{5} + \ldots}}}$

We can truncate this continued fraction to get a rational approximation of any desired accuracy.

For example:

$\sqrt{13} \approx \frac{18}{5} + \frac{\frac{1}{25}}{\frac{36}{5}} = \frac{18}{5} + \frac{1}{180} = \frac{649}{180} = 3.60 \overline{5}$

Or:

$\sqrt{13} \approx \frac{18}{5} + \frac{\frac{1}{25}}{\frac{36}{5} + \frac{\frac{1}{25}}{\frac{36}{5}}} = \frac{23382}{6485} \approx 3.60555127$