TITLE: How is $\sqrt{n^2+2n}-\lfloor\sqrt{n^2+2n}\rfloor=\frac{2}{\sqrt{1+\frac{2}{n}}+1}$.
QUESTION [5 upvotes]: I have trouble seeing how
$$\sqrt{n^2+2n}-\lfloor\sqrt{n^2+2n}\rfloor=\frac{2}{\sqrt{1+\frac{2}{n}}+1}.$$
I can't see where to start even.

REPLY [7 votes]: Assuming that $n$ is a non-negative integer, we know that 
$$ n^2 \leq n^2 + 2n < n^2 + 2n + 1 = (n+1)^2$$
Hence, this show that $\lfloor \sqrt{n^2 + 2n} \rfloor = n$, which simplifies the LHS to
$$ \sqrt{n^2+2n} - n.$$
Now let's work on simplifying the RHS, multiplying the numerator and denominator by $n$, we get
$$ \frac {2}{ \sqrt{1+ \frac {2}{n}} + 1} \times \frac {n}{n} = \frac {2n} {\sqrt{n^2 +2n} +n}$$
Let's also rationalize the denominator, by multiplying throughout by $\frac {\sqrt{n^2+2n} -n}{\sqrt{n^2+2n}-n}$ to obtain
$$\frac {2n} {\sqrt{n^2 +2n} +n} \times \frac {\sqrt{n^2+2n} -n}{\sqrt{n^2+2n}-n} = \frac {(2n) ( \sqrt{n^2+2n} - n)}{(n^2+2n) - (n^2)} = \sqrt{n^2+2n} - n$$
Hence, LHS = RHS.
Note: The statement is not true for negative integers, since the first inequality doesn't hold.