A question regarding asymptotic functions and their interchangeability when calculating limits

35 Views Asked by At

If $f(x) \sim g(x)$ like for example $n! \sim \sqrt{2\pi n}(\frac{n}{e})^n$, and one wants to calculate a limit involving $f(x)$ and possibly other functions, under what circumstances is one allowed to replace $f(x)$ by $g(x)$? If for example $\frac{f(x)}{g(x)} \to 1$ but $f(x)-g(x) \to \infty$, can one still replace $f(x)$ by $g(x)$?