Finding the floor of $\sqrt{d^2-1}$

154 Views Asked by At

If we are given $d$ an integer, then I've seen it written that the floor of $\sqrt{d^2-1}=d-1$, but how is this found?

It's not immediately obvious, at least not to me.It makes me feel there must be an algorithm that can be used .

Would anyone be able to impart their knowledge on how to find the floor of such an expression?

I read it here : Show that the simple continued fraction of $\sqrt{d^2-1}$ is $[d-1; \overline{1, 2d-1}]$ for $d \geq 2$

2

There are 2 best solutions below

0
On BEST ANSWER

It is because $$(d-1)^2 \le d^2-1 < d^2,$$ so $$d-1 \le \sqrt{d^2-1} < d,$$ so $$\lfloor \sqrt{d^2-1}\rfloor = d-1.$$

0
On

Saying that $\lfloor\sqrt{ d^2-1}\rfloor=d-1$ amounts to say $$ d-1\leq\sqrt{d^2-1}<d. $$ The inequality on the right is trivial since $d^2-1<d^2$. For the inequality on the left, $$ \sqrt{d^2-1}=\sqrt{(d+1)(d-1)}\geq\sqrt{(d-1)^2}=d-1. $$ All that we are using is that $d-1\geq0$ (so that the square root cancels the square) and that $d+1>d-1$.