# How do you find the square root of 7?

Aug 31, 2016

$\sqrt{7} \approx 2.645751311$

#### Explanation:

Since $7$ is a prime number, it has no square factors and its square root cannot be simplified.

It is an irrational number, so cannot be exactly represented by $\frac{p}{q}$ for any integers $p , q$.

We can however find good rational approximations to $\sqrt{7}$.

First note that:

${8}^{2} = 64 = 63 + 1 = 7 \cdot {3}^{2} + 1$

This is in Pell's equation form:

${p}^{2} = n {q}^{2} + 1$

with $n = 7$, $p = 8$ and $q = 3$.

This means that $\frac{8}{3}$ is an economical approximation for $\sqrt{7}$ and it also means that we can use $\frac{8}{3}$ to derive the continued fraction expansion of $\sqrt{7}$:

$\frac{8}{3} = 2 + \frac{1}{1 + \frac{1}{1 + \frac{1}{1}}}$

and hence we can deduce:

sqrt(7) = [2;bar(1,1,1,4)] = 2 + 1/(1+1/(1+1/(1+1/(4+1/(1+1/(1+1/(1+1/(4+...))))))))

The next economical approximation is given by truncating the continued fraction expansion just before the next $4$, i.e.

sqrt(7) ~~ [2;1,1,1,4,1,1,1] = 2 + 1/(1+1/(1+1/(1+1/(4+1/(1+1/(1+1/1)))))) = 127/48 = 2.6458bar(3)

This is also a solution of Pell's equation for $7$, since we find:

${127}^{2} = 16129 = 16128 + 1 = 7 \cdot {48}^{2} + 1$

If you want more accuracy, truncate just before the next $4$ or the one after.

By expanding the repeating part of the continued fraction for $\sqrt{7}$ we can derive a generalised continued fraction:

$\sqrt{7} = \frac{21}{8} + \frac{\frac{7}{64}}{\frac{21}{4} + \frac{\frac{7}{64}}{\frac{21}{4} + \frac{\frac{7}{64}}{\frac{21}{4} + \frac{\frac{7}{64}}{\frac{21}{4} + \ldots}}}}$

Using a calculator, we find:

$\sqrt{7} \approx 2.645751311$