I tried to solve the following question:
Let $f,g$ be non-negative functions such that $f(n)=g(n)\left[1+o(1)\right]$.
Prove that $f(n)=\Theta(g(n))$.
I looked on two cases:
- $\displaystyle \lim_{n\to\infty}g(n)=L \ , \mathrm{where \ L \ is \ finite}$.
- $\displaystyle \lim_{n\to\infty}g(n)=\infty$.
It is easy to prove the first case, but I'm stuck with the second case.
Any help would be appreciated. Thank you!
A function $h(n)$ is $o(1)$ (as $n \to \infty$) means that $h(n)$ tends to $0$. Thus $f(n)= g(n)(1 +h(n))$ for some $h(n)$ that tends to $0$.
Since the limit of $h(n)$ is $0$, there is an $n_1$ such that $|h(n)|\le 1/2$ for $n \ge n_1$.
It then follows that for $n\ge n_1$ one has $$ \frac12 g(n) \le g(n)(1 +h(n)) = f(n) = g(n)(1 +h(n)) \le \frac32 g(n) $$ establishing the claim.