# I would like to calculate $\lim_ {n \to \infty} {\frac{n+\lfloor \sqrt{n} \rfloor^2}{n-\lfloor \sqrt{n} \rfloor}}$

I would like to calculate the following limit: $$\lim_ {n \to \infty} {\frac{n+\lfloor \sqrt{n} \rfloor^2}{n-\lfloor \sqrt{n} \rfloor}}$$ where $\lfloor x \rfloor$ is floor of $x$ and $x ∈ R$.

Now I know the result is $2$, but I am having trouble getting to it. Any ideas would be greatly appreciated.

• As the limit approaches infinity, the floor function becomes insignificant. – Kaynex Dec 19 '15 at 17:49

You may observe that, as $n \to \infty$, \begin{align} {\frac{n+\lfloor \sqrt{n} \rfloor^2}{n-\lfloor \sqrt{n} \rfloor}}&={\frac{2n+(\lfloor \sqrt{n} \rfloor-\sqrt{n})(\lfloor \sqrt{n} \rfloor+\sqrt{n})}{n-\lfloor \sqrt{n} \rfloor}}\\\\ &={\frac{2+(\lfloor \sqrt{n} \rfloor-\sqrt{n})(\lfloor \sqrt{n} \rfloor+\sqrt{n})/n}{1-\lfloor \sqrt{n} \rfloor/n}} \\\\& \to 2 \end{align} since, as $n \to \infty$, $$\left|\frac{\lfloor \sqrt{n} \rfloor}{n}\right|\leq\frac{\sqrt{n}}{n} \to 0$$ and $$\left|\frac{(\lfloor \sqrt{n} \rfloor-\sqrt{n})(\lfloor \sqrt{n} \rfloor+\sqrt{n})}{n}\right|\leq\frac{2\sqrt{n}}{n} \to 0.$$
Noting that $\lfloor\sqrt{n}\rfloor \operatorname*{\sim}_{n\to\infty} \sqrt{n} = o(n)$, the denominator is $n+o(n)$. But similarly, the same equivalent implies that $\lfloor\sqrt{n}\rfloor^2 \operatorname*{\sim}_{n\to\infty} \sqrt{n}^2 = n$, so the numerator becomes $2n+o(n)$. Putting it together, the expression is $$\frac{n+\lfloor\sqrt{n}\rfloor^2}{n-\lfloor\sqrt{n}\rfloor} = \frac{2n+o(n)}{n+o(n)}\xrightarrow[n\to\infty]{} 2$$
(the equivalents and $o(\cdot)$ are the usual Landau notations.)
• If you don't know how the first equivalent is proven, just consider $\frac{x-1}{x}\leq \frac{\lfloor x\rfloor}{x}\leq \frac{x}{x}$ and use the squeeze theorem to show that $\frac{\lfloor x\rfloor}{x} \xrightarrow[x\to\infty]{} 1$. – Clement C. Dec 19 '15 at 17:57