Circular reasoning in L'Hopital's rule

Suppose that $f(x)=\dfrac{\sin(x^2)}x$. Then $\lim_{x\to\infty}f(x)=0$, but the limit $\lim_{x\to\infty}f'(x)$ doesn't exist.

If you try to apply L'Hopital's Rule here as you did, you will be working with$$\lim_{x\to\infty}\frac{x\sin(x^2)}{x^2}.$$But if $g(x)=x\sin(x^2)$, then the limit $\lim_{x\to\infty}g'(x)$ doesn't exist. Therefore, you cannot apply L'Hopital's Rule here.


(Paraphrased from Wikipedia.)

L'Hôpital's rule:

Given functions $f$ and $g$ which are differentiable on an open interval $I$, except possibly at a point $c \in I$, if

$$ \lim _{x \to c}F(x)=\lim _{x\to c}G(x)=0 \text{ or }\pm \infty, \tag{1.} $$ $$ G'(x)\neq 0 \text{ for all }x \in I, \text{ with }x \ne c, \text{ and} \tag{2.} $$ $$ \lim_{x \to c}\frac{F'(x)}{G'(x)} \text{ exists.} \tag{3.} $$

then

$$\lim_{x \to c} \frac{F(x)}{G(x)} =\lim_{x \to c} \frac{F'(x)}{G'(x)}. \tag{4.}$$

You used $F(x) = xf(x)$ and $G(x) = x$ and $I = (x_0, \infty)$ for some $x_0 < 0$.

Since $\lim _{x\to \infty}G(x)= \infty$, condition $(1.)$ requires that $$\lim _{x \to \infty}xf(x) = \infty. \tag{A.}$$

Condition $(2.)$ is satisfied by $G(x)=x$.

Condition $(3.)$ requires that $$\lim_{x \to \infty}[f(x)+xf'(x)] \text{ exists.} \tag{B.}$$

If conditions $(A.)$ and $(B.)$ are met, then, by L'Hôpital's rule, $$ \lim_{x \to \infty} f(x) = \lim_{x \to \infty}[f(x)+xf'(x)]$$

Others have shown you that counter examples do exists.