I did the following problem:
Find $\displaystyle\lim_{x\to 0} \frac{\cos^2x-1}{x^2}$
The following solution was given:
$$\lim_{x\to 0} \frac{\cos^2x-1}{x^2} = \lim_{x\to 0} \frac{2 \sin x \cdot \cos x}{2x} = 1$$
My questions regarding this solution are these:
In the denominator of the second limit in the solution above we have $2x$ and since we have $x$ aproaching $0$ this would mean division by $0$ which is not allowed. So, using L'Hôpital's rule, we should find the next higher derivative.
And regarding the numerator of this second limit I think, it should be $2 \cos x \cdot (- \sin x)$ by usage of the chain rule.
Thus I came the following solution:
$$\lim_{x\to 0} \frac{\cos^2x-1}{x^2} = \lim_{x\to 0} \frac{2 \cos x \cdot (- \sin x)}{2x} = \lim_{x\to 0} \frac{2\sin^2 x - 2 \cos^2 x}{2} = \frac{-2}{2} = -1$$
So, since these are different solutions, which is correct and where did I make a mistake? I would be thankful for explanations.