Find the limit $\lim_{n\to\infty}\left(\sqrt{n^2+n+1}-\left\lfloor\sqrt{n^2+n+1}\right\rfloor\right)$

For every natural number, we have $$\lfloor \sqrt{n^2+n+1} \rfloor =n$$ because $n^2\leq n^2+n+1< n^2+2n+1=(n+1)^2$. So we get $$\begin{align}\lim_{n\to\infty} (\sqrt{n^2+n+1}- \lfloor \sqrt{n^2+n+1} \rfloor)&=\lim_{n\to\infty}(\sqrt{n^2+n+1}-n)\\ &=\lim_{n\to\infty}\frac{n^2+n+1-n^2}{\sqrt{n^2+n+1}+n}\\ &=\lim_{n\to\infty}\frac{n+1}{\sqrt{n^2+n+1}+n}\\ &=\lim_{n\to\infty}\frac{1+\frac{1}{n}}{\sqrt{1+\frac{1}{n}+\frac{1}{n^2}}+1}\\ &=\frac{1}{2} \end{align}$$


The crux of this is that $\sqrt{n^2+n+1}\approx n+\frac{1}{2}$ for large $n$.

Note that $$n^2+n+1=\left(n+\frac{1}{2}\right)^2+\frac{3}{4}\implies\sqrt{n^2+n+1}-\left(n+\frac{1}{2}\right)=\frac{\frac{3}{4}}{n+\frac{1}{2}+\sqrt{n^2+n+1}}$$

One can thus quickly see that for large enough $n$, $n<\sqrt{n^2+n+1}<n+1$, so $\left\lfloor\sqrt{n^2+n+1}\right\rfloor=n$ eventually.

Thus we can see that \begin{align}\sqrt{n^2+n+1}-\lfloor \sqrt{n^2+n+1}\rfloor&=\sqrt{n^2+n+1}-n\\ &=\sqrt{n^2+n+1}-\left(n+\frac{1}{2}\right)+\frac{1}{2}\\ &=\frac{\frac{3}{4}}{n+\frac{1}{2}+\sqrt{n^2+n+1}}+\frac{1}{2}\\ &\to\frac{1}{2}\end{align}


Alternative idea for proving the essential facts: writing $$\sqrt{n^2+n+1} = n\sqrt{1+1/n+1/n^2}$$ and using the Taylor series of $\sqrt{1+x}$: $$1+{\frac{x}2}-{\frac{x^2}8}+O(x^3)$$ we have $$\sqrt{n^2+n+1} = n+\frac12+\frac3{8n}+O(1/n^2)$$ and $$\lfloor\sqrt{n^2+n+1}\rfloor = n.$$