I'm not sure how to handle the trig functions with different arguments when computing this limit using L'Hospital's rule.
$$\lim_{x \rightarrow 0} \frac {x^2\cos(\frac {1} {x})} {\sin(x)}.$$
I have come up with the correct numerical answer via a different method, but am unsure if the logic would hold true for all cases (maybe I arrived at the correct answer by chance).
Here is my working:
Let $g(x)=x^2\cos(\frac 1 x)$ and $h(x) = \frac 1 {\sin x} = \csc x$.
We know that the following holds true for all $x$: $$-1 \le \cos (\frac 1 x) \le 1$$ Since $x^2 \ge 0$ for all x: $$-x^2 \le x^2\cos (\frac 1 x) \le x^2$$ Taking limits as $x \rightarrow \infty$ gives: $$ \lim_{x\rightarrow 0}(-x^2)\le \lim_{x\rightarrow 0}(x^2\cos (\frac 1 x)) \le \lim_{x\rightarrow 0}(x^2)$$ By the sandwich rule (or squeeze theorem): $$ 0 \le \lim_{x\rightarrow 0}(x^2\cos (\frac 1 x)) \le 0$$ $$ \Rightarrow \lim_{x\rightarrow 0}(x^2\cos (\frac 1 x)) $$ And hence, due to the algebra of limits: $$\lim_{x \rightarrow 0} \frac {x^2\cos(\frac {1} {x})} {\sin(x)} = 0.$$
$$ \frac {x^2\cos\frac 1 x} {\sin x} = x\cdot \frac x {\sin x} \cdot \cos\frac 1 x $$ Now use the fact that $-1 \le \cos \frac 1 x \le 1$ and $x\to0$ and one further fact not mentioned in your question: $$ \frac x {\sin x} \to 1 \text{ as } x\to0. $$ Without that last fact or something else other than what's in your question, you haven't dealt with the fact that $\sin x \to0.$