Evaluate $$\displaystyle\lim_{x\to 0} \frac{x\cos x - \ln (1+x)}{x^2}$$
Here's my method but that results into an error.
\begin{align} \lim_{x\to 0} \frac{x\cos x - \ln (1+x)}{x^2} &=\lim_{x\to 0}\frac{\cos x}{x} - \lim_{x\to 0}\left(\frac{1}{x}\right)\lim_{x\to 0}\left(\frac{\ln(1+x)}{x}\right)\\ &= \frac{\cos x}{x} - \frac{1}{x} \\ &= \frac{\cos x -1}{x}\\ &= 0 \quad \text{(either by L'hôpital or some manipulations)} \end{align}
I have used the fact that
$$\lim_{x\to 0} \frac{\ln(1+x)}{x}=1$$
And the answer seems to be $\frac{1}{2}$. I can do it in different ways (L'hôpital precisely) but please point out my error.