Suppose that $f$ and $g$ are differentiable functions on an open interval $I$ and that $p \in I$. If $\lim_{x \to p} f(x) = \lim_{x \to p} g(x) = 0$ and if
$$\lim_{x \to p} \frac{f'(x)}{g'(x)}$$
exists and equals a real number $l$ then
$$\lim_{x \to p} \frac{f(x)}{g(x)}=l$$
Proof: Fix a real number $a > l$. By the definition of limit there is a number $q > p$ such that, if $p < x< q$, then $ \frac{f'(x)}{g'(x)}<a$. I don't know how to derive this.