If f(x)-> 0 and g(x)-> 0 as x->a, then [tex]\lim_{x\to a}\frac{f(x)}{g(x)}= \lim_{x\to a}\frac{f'(x)}{g'(x)}[/itex]
and you can extend to and other "indeterminant forms".
Note that numerator and denominator are differentiated separately, you are not differntiating the fraction using the quotient law.