Let $f(n) = \sqrt{n^2 + 100n} − n$. Prove that f(n) is O(1).
I tried to solve this problem with the L'Hospital rule, but as I kept deriving, it just became a bigger mess and harder to simplify. Is there an easier way to solve this?
Let $f(n) = \sqrt{n^2 + 100n} − n$. Prove that f(n) is O(1).
I tried to solve this problem with the L'Hospital rule, but as I kept deriving, it just became a bigger mess and harder to simplify. Is there an easier way to solve this?
On
Just another way.
$$f(n) = \sqrt{n^2 + kn} − n=n\left(\sqrt{1+\frac{ k}{n}}-1 \right)$$ Now, remembering that, for small $x$, $\sqrt{1+x}=1+\frac{x}{2}-\frac{x^2}{8}+O\left(x^3\right)$, replace $x$ by $\frac k {n}$ to get $$\sqrt{1+\frac{ k}{n}}=1+\frac{k}{2 n}-\frac{k^2}{8 n^2}+O\left(\frac{1}{n^3}\right)$$ which makes $$f(n)=\frac{k}{2}-\frac{k^2}{8 n}+O\left(\frac{1}{n^2}\right)$$ which shows the limit and how it is approached.
$$ f(n)=\frac{100n}{\sqrt{n^2+100n}+n}=\frac{100}{1+\sqrt{1+\frac{100}{n}}}\\ \therefore\lim_{n\to\infty} f(n) =50 $$