0

Let’s say we’re trying to find $\sqrt5$. The two perfect squares closest to $5$ are $4$ and $9$, so we can set up the following inequality: $4 < 5 < 9$. If we take the square root of this inequality, it follows that $2 < \sqrt5 < 3$.

To generalize this process, let $n$ be a positive integer and a non-perfect square, and we want to find $\sqrt{n}$. First, find the closest perfect square, $a = p^2$, such that $a < n$. Then, find the closest perfect square, $b = q^2$, such that $n < b$. It follows that $a<n<b$, $\therefore p < \sqrt{n} < q$.

Can an algorithm be written using this process to find lower and upper bounds for irrational square roots? And can this process be improved to impose tighter restrictions on these bounds?

Mailbox
  • 896
  • Search for newton's method for square root – Ethan Bolker Dec 13 '21 at 19:04
  • I know Newton’s method, I’m just wondering if this process in particular can be improved. – Mailbox Dec 13 '21 at 19:13
  • Perhaps you could refine this method by choosing a rational number $a^2/b^2$ such that $5<a^2/b^2<9$. For instance, if we take $a=9$ and $b=4$, we obtain $$ 5<\frac{9^2}{4^2}\implies\sqrt{5}<\frac{9}{4} , . $$ Now you need to find a rational number $c^2/d^2$ such that $5<c^2/d^2<81/16$... – Joe Dec 13 '21 at 20:07
  • @Mailbox Let $,p = \big\lfloor \sqrt{n \cdot 10^{2k}}\big \rfloor,$ then $,\frac{p}{10^k} \le \sqrt{n} \lt \frac{p+1}{10^k},$. For example $,22^2 \lt 5 \cdot 100 \lt 23^2,$ $,\implies 2.2 \lt \sqrt{5} \lt 2.3,$. – dxiv Dec 14 '21 at 01:30
  • @dxiv This is really helpful! Why didn’t you leave this as an answer? – Mailbox Dec 15 '21 at 13:44
  • @Mailbox That was more of a hint, and I wasn't even sure that's the kind of hint you were looking for. Feel free to develop it into a full answer and post it as a self-answer. – dxiv Dec 16 '21 at 18:29

1 Answers1

1

You seem to be asking about rational numbers on either side of $\sqrt n.$ The methods of continued fractions give small positive ans small negative values for $x^2 - n y^2.$ When $x^2 - n y^2 > 0,$ we know $ \frac{x}{y} > \sqrt n.$ When $x^2 - n y^2 < 0,$ we know $ \frac{x}{y} < \sqrt n.$

This method probably goes back to Fermat;

Method described by Prof. Lubin at Continued fraction of $\sqrt{67} - 4$

$$ \sqrt { 13} = 3 + \frac{ \sqrt {13} - 3 }{ 1 } $$ $$ \frac{ 1 }{ \sqrt {13} - 3 } = \frac{ \sqrt {13} + 3 }{4 } = 1 + \frac{ \sqrt {13} - 1 }{4 } $$ $$ \frac{ 4 }{ \sqrt {13} - 1 } = \frac{ \sqrt {13} + 1 }{3 } = 1 + \frac{ \sqrt {13} - 2 }{3 } $$ $$ \frac{ 3 }{ \sqrt {13} - 2 } = \frac{ \sqrt {13} + 2 }{3 } = 1 + \frac{ \sqrt {13} - 1 }{3 } $$ $$ \frac{ 3 }{ \sqrt {13} - 1 } = \frac{ \sqrt {13} + 1 }{4 } = 1 + \frac{ \sqrt {13} - 3 }{4 } $$ $$ \frac{ 4 }{ \sqrt {13} - 3 } = \frac{ \sqrt {13} + 3 }{1 } = 6 + \frac{ \sqrt {13} - 3 }{1 } $$

Simple continued fraction tableau:
$$ \begin{array}{cccccccccccccccccccccccc} & & 3 & & 1 & & 1 & & 1 & & 1 & & 6 & & 1 & & 1 & & 1 & & 1 & & 6 & \\ \\ \frac{ 0 }{ 1 } & \frac{ 1 }{ 0 } & & \frac{ 3 }{ 1 } & & \frac{ 4 }{ 1 } & & \frac{ 7 }{ 2 } & & \frac{ 11 }{ 3 } & & \frac{ 18 }{ 5 } & & \frac{ 119 }{ 33 } & & \frac{ 137 }{ 38 } & & \frac{ 256 }{ 71 } & & \frac{ 393 }{ 109 } & & \frac{ 649 }{ 180 } \\ \\ & 1 & & -4 & & 3 & & -3 & & 4 & & -1 & & 4 & & -3 & & 3 & & -4 & & 1 \end{array} $$

$$ \begin{array}{cccc} \frac{ 1 }{ 0 } & 1^2 - 13 \cdot 0^2 = 1 & \mbox{digit} & 3 \\ \frac{ 3 }{ 1 } & 3^2 - 13 \cdot 1^2 = -4 & \mbox{digit} & 1 \\ \frac{ 4 }{ 1 } & 4^2 - 13 \cdot 1^2 = 3 & \mbox{digit} & 1 \\ \frac{ 7 }{ 2 } & 7^2 - 13 \cdot 2^2 = -3 & \mbox{digit} & 1 \\ \frac{ 11 }{ 3 } & 11^2 - 13 \cdot 3^2 = 4 & \mbox{digit} & 1 \\ \frac{ 18 }{ 5 } & 18^2 - 13 \cdot 5^2 = -1 & \mbox{digit} & 6 \\ \frac{ 119 }{ 33 } & 119^2 - 13 \cdot 33^2 = 4 & \mbox{digit} & 1 \\ \frac{ 137 }{ 38 } & 137^2 - 13 \cdot 38^2 = -3 & \mbox{digit} & 1 \\ \frac{ 256 }{ 71 } & 256^2 - 13 \cdot 71^2 = 3 & \mbox{digit} & 1 \\ \frac{ 393 }{ 109 } & 393^2 - 13 \cdot 109^2 = -4 & \mbox{digit} & 1 \\ \frac{ 649 }{ 180 } & 649^2 - 13 \cdot 180^2 = 1 & \mbox{digit} & 6 \\ \end{array} $$

Will Jagy
  • 139,541