I have this function $\frac{\sin^2 x}{1-\cos x}$.
$\frac{\sin^2x}{1-\cos x}=\frac{1-\cos^2x}{1-\cos x}=1+\cos x\;$. Thus the derivative of $1 + \cos x\; = -\sin x\;$.
However by, L'Hopital's rule, I obtain
$\frac{\sin^2x}{1-\cos x}=\frac{2\sin x\cos x}{\sin x}=2\cos x\;$. Thus the derivative of $1 + \cos x\; = 2 \cos x\;$.
What's wrong with this?