Why does L'Hopital's rule fail in calculating $\lim_{x \to \infty} \frac{x}{x+\sin(x)}$?

Your only error -- and it's a common one -- is in a subtle misreading of L'Hopital's rule. What the rules says is IF the limit of $f'$ over $g'$ exists then the limit of $f$ over $g$ also exists and the two limits are the same. It doesn't say anything if the limit of $f'$ over $g'$ doesn't exist.


L'Hopital's rule only tells you that if the modified limit exists and has value $L$, then the original limit also exists and has value $L$. It doesn't tell you that the converse holds.

So, the fact that the modified limit doesn't exist gives you no information about the original limit. So, you need a different method.

Consider something more direct: can you compute $$ \lim_{x\to\infty}\frac{x}{x+\sin x}=\lim_{x\to\infty}\frac{1}{1+\frac{\sin x}{x}}? $$


Because you don't need it! And because one of the hypotheses (under which this technique applies) is not verified in this case.

Here, in layman terms, the ratio of functions, and the ratio of derivatives as well, does not have a clear enough limit. The de l'Hospital rule is more than often misused: a lot of people believe that if one cannot compute the limit of a ratio of functions, it is easier to compute easily the limit of the ratio of their derivatives. Possibly because derivatives sometimes look simpler, as for polynomials.

However, this is not true in general. Derivatives are rarely more continuous than original functions (my fundamental anti-theorem of analysis).

And thus said, remember that the purpose of exercises is to train your mathematical skills, not to get the result. The teacher knows it already (hopefully). Using de L'Hôpital's rule is sometimes overkill, with which you don't learn what is going on with your functions. It is more efficient, and sounder, to try first simpler techniques, such as factorization of leading terms (here $x$), transformations (logarithms), etc.

Now let us go to the point.

De L'Hôpital's rule states that: if $f$ and $g$ are functions that are differentiable on some (small enough) open interval $I$ (except possibly at a point $x_0$ contained in $I$), if $$\lim_{x\to x_0}f(x)=\lim_{x\to x_0}g(x)=0 \;\mathrm{ or }\; \pm\infty,$$ if $g'(x)\ne 0$ for all $x$ in $I$ with $x \ne x_0$, and $\lim_{x\to x_0}\frac{f'(x)}{g'(x)}$ exists, then:

$$\lim_{x\to x_0}\frac{f(x)}{g(x)} = \lim_{x\to x_0}\frac{f'(x)}{g'(x)}\,.$$

The most classical "counter-example" is when functions are constant: $f(x)=c$ and $g(x)=1$. The derivative of $g(x)$ vanishes on any open interval, while $f/g = c$.

The factorization proposed by @Nick Peterson typically avoids to resort to this overkill rule when it is not necessary (especially when the indeterminacy can be lifted easily).

De L'Hôpital's rule looks magic, and as for every magic, it shall be used wisely with parsimony (unless it unleashes terrible powers).

Here, tracks are legion. One very simple is that $x$ grows as... $x$, and $\sin(x)$ is bounded between $-1$ and $1$. So for a big engough $x$, $x-1\le x+\sin(x) \le x+1$, and you know that$ \frac{x}{x+1} $ and $\frac{x}{x-1}$ clearly tends to $1$.