Why doesn't L'Hospital's rule work for this limit?

Let $a,b,A,B$ be positive real numbers, with $a>b$ and $A>B$. Consider the limit:

$$\lim_{x\to\infty}\frac{ax+b\sin(x)}{Ax+B\sin(x)}$$

By the squeeze theorem, the limit exists and is equal to $\frac{a}{A}$, but applying L'Hospital's rule we find

$$\lim_{x\to\infty}\frac{ax+b\sin(x)}{Ax+B\sin(x)}=\lim_{x\to\infty}\frac{a+b\cos(x)}{A+B\cos(x)}$$

The limit on the right-hand side of the inequality above does not exist. What is going wrong here?

• The rule (for this particular indeterminate form) says: If $f(x)\to \infty$ and $g(x)\to \infty$ and $\lim\frac{f'(x)}{g'(x)}$ exists, then $\lim\frac{f'x)}{g(x)}$ exists and equals $\lim\frac{f'(x)}{g'(x)}$. – Hagen von Eitzen Apr 25 '16 at 15:57