Evaluating $\lim_{x\to 0}\frac{x\sin x-2+2\cos x}{x\ln(1+x)-x^2}$ using L'Hôpital Considering this limit, assigned to my high school students, 
$$\lim_{x\to 0}\frac{x\sin x-2+2\cos x}{x\ln \left(1+x\right)-x^2}=\left(\frac00\right)=\lim_{x\to 0}\frac{\frac{d}{dx}\left(x\sin \left(x\right)-2+2\cos \left(x\right)\right)}{\frac{d}{dx}\left(x\ln \left(1+x\right)-x^2\right)} \tag 1$$
After some steps, using L'Hôpital, I find:
$$\lim_{x\to 0}\frac{\left(x\cos \left(x\right)-\sin \left(x\right)\right)\left(1+x\right)}{-2x^2-x+x\ln \left(x+1\right)+\ln \left(x+1\right)}=\left(\frac00\right)$$
Should I continue to apply L'Hôpital? :-(

The derivative of the denominator is
$$
\ln(1+x)+\frac{x}{1+x}-2x=\frac{(1+x)\ln(1+x)-x-2x^2}{1+x}
$$
Then after the first step you find
$$
\frac{x\cos x-\sin x}{(1+x)\ln(1+x)-x-2x^2}(x+1)
$$
The factor $x+1$ can be disregarded, because its limit is $1$.
At the next application, the numerator will become
$$
\cos x-x\sin x-\cos x=-x\sin x
$$
while the denominator will be
$$
\ln(1+x)-4x
$$
Thus the limit has become much simpler:
$$
\lim_{x\to0}\frac{x\sin x}{4x-\ln(1+x)}=
\lim_{x\to0}\frac{x^2}{4x-\ln(1+x)}\frac{\sin x}{x}
$$
and the part $(\sin x)/x$ can be disregarded. You can now apply l'Hôpital once more to get
$$
\lim_{x\to0}\frac{2x}{4-\dfrac{1}{1+x}}=0
$$
