# How do you find the square root of 33?

Aug 30, 2016

Use an algorithm to find:

sqrt(33) = [5;bar(1,2,1,10)] = 5+1/(1+1/(2+1/(1+1/(10+1/(1+1/(2+...))))))

$\approx 5.744562646538$

#### Explanation:

$33 = 3 \cdot 11$ has no square factors, so $\sqrt{33}$ cannot be simplified.

It is an irrational number a little less than $6$, since ${6}^{2} = 36$.

To find a rational approximation, I will find a continued fraction expansion for $\sqrt{33}$ then truncate it.

$\textcolor{w h i t e}{}$
To find the simple continued fraction expansion of $\sqrt{n}$, use the following algorithm:

${m}_{0} = 0$
${d}_{0} = 1$
${a}_{0} = \left\lfloor \sqrt{n} \right\rfloor$

${m}_{i + 1} = {d}_{i} {a}_{i} - {m}_{i}$

${d}_{i + 1} = \frac{n - {m}_{i + 1}^{2}}{d} _ i$

${a}_{i + 1} = \left\lfloor \frac{{a}_{0} + {m}_{i + 1}}{d} _ \left(i + 1\right) \right\rfloor$

Stop when ${a}_{i} = 2 {a}_{0}$, marking the end of the repeating part of the continued fraction.

The continued fraction expansion is then:

[a_0; a_1, a_2, a_3,...]= a_0 + 1/(a_1 + 1/(a_2 + 1/(a_3 + ...)))

$\textcolor{w h i t e}{}$
In our example, $n = 33$ and $\left\lfloor \sqrt{n} \right\rfloor = 5$, since ${5}^{2} = 25 < 33 < 36 = {6}^{2}$.

So:

$\left\{\begin{matrix}{m}_{0} = 0 \\ {d}_{0} = 1 \\ {a}_{0} = \left\lfloor \sqrt{33} \right\rfloor = \textcolor{b l u e}{5}\end{matrix}\right.$

$\left\{\begin{matrix}{m}_{1} = {d}_{0} {a}_{0} - {m}_{0} = 5 \\ {d}_{1} = \frac{n - {m}_{1}^{2}}{d} _ 0 = \frac{33 - {5}^{2}}{1} = 8 \\ {a}_{1} = \left\lfloor \frac{{a}_{0} + {m}_{1}}{d} _ 1 \right\rfloor = \left\lfloor \frac{5 + 5}{8} \right\rfloor = \textcolor{b l u e}{1}\end{matrix}\right.$

$\left\{\begin{matrix}{m}_{2} = {d}_{1} {a}_{1} - {m}_{1} = 8 - 5 = 3 \\ {d}_{2} = \frac{n - {m}_{2}^{2}}{d} _ 1 = \frac{33 - 9}{8} = 3 \\ {a}_{2} = \left\lfloor \frac{{a}_{0} + {m}_{2}}{d} _ 2 \right\rfloor = \left\lfloor \frac{5 + 3}{3} \right\rfloor = \textcolor{b l u e}{2}\end{matrix}\right.$

$\left\{\begin{matrix}{m}_{3} = {d}_{2} {a}_{2} - {m}_{2} = 6 - 3 = 3 \\ {d}_{3} = \frac{n - {m}_{3}^{2}}{d} _ 2 = \frac{33 - 9}{3} = 8 \\ {a}_{3} = \left\lfloor \frac{{a}_{0} + {m}_{3}}{d} _ 3 \right\rfloor = \left\lfloor \frac{5 + 3}{8} \right\rfloor = \textcolor{b l u e}{1}\end{matrix}\right.$

$\left\{\begin{matrix}{m}_{4} = {d}_{3} {a}_{3} - {m}_{3} = 8 - 3 = 5 \\ {d}_{4} = \frac{n - {m}_{4}^{2}}{d} _ 3 = \frac{33 - 25}{8} = 1 \\ {a}_{4} = \left\lfloor \frac{{a}_{0} + {m}_{4}}{d} _ 4 \right\rfloor = \left\lfloor \frac{5 + 5}{1} \right\rfloor = \textcolor{b l u e}{10}\end{matrix}\right.$

Having reached a value $\textcolor{b l u e}{10}$ which is twice the first value $\textcolor{b l u e}{5}$, this is the end of the repeating pattern of the continued fraction, and we have:

sqrt(33) = [5;bar(1,2,1,10)]

The first economical approximation for $\sqrt{33}$ is then:

sqrt(33) ~~ [5;1,2,1] = 5+1/(1+1/(2+1/1)) = 23/4 = 5.75

The next is:

sqrt(33) ~~ [5;1,2,1,10,1,2,1] = 1057/184 ~~ 5.7445652174

Actually $\sqrt{33}$ is closer to:

$\sqrt{33} \approx 5.744562646538$