# Why doesn't L'Hôpital's rule work in this case?

I have a very simple question. Suppose I want to evaluate this limit:

$$\lim_{x\to \infty} \frac{x}{x-\sin x}$$

It is easy to evaluate this limit using the Squeeze theorem (the answer is $1$). But here both the numerator and the denominator are going to infinity as $x\to \infty$ so I tried using L'Hospital's rule: $$\lim_{x\to \infty} \frac{x}{x-\sin x}=\lim_{x\to \infty} \frac{1}{1-\cos x}$$

However there's no finite $L$ such that $$\lim_{x\to \infty} \frac{1}{1-\cos x}=L$$ which is a contradiction. I don't understand why in this case L'Hopital's rule doesn't work. Both the numerator and the denominator are differentiable everywhere and both are tending to infinity - which is all we need to use this rule.

• The L'Hopital's rule says that if the limit of f'(x)/g'(x) exists, then lim f(x)/g(x) = lim f'(x)/g'(x). In this case, limit of f'(x)/g'(x) DNE, so you can't use L'Hopital's rule. Jun 28, 2015 at 15:00
• Simple questions are not stupid. Jun 29, 2015 at 10:56
• As a general rule, don't use l'Hospital for the point at infinity. If you do $y=1/x$ it will become more obvious what's wrong: the function and all its derivatives don't behave analytically at $y=0$. Jun 29, 2015 at 11:01

A precondition in l'Hospital's Rule is that in order for it to apply, the limit $$\lim_{x\to\infty}\frac{f'(x)}{g'(x)}$$ must exist (but is allowed to be $\pm \infty$). In this case, the limit does not exist, so it does not apply.

• This is the best answer. Jun 29, 2015 at 15:45
• exists means to have a finite limit May 1, 2020 at 10:09
• So it is okay for the limit of $\frac{f'(x)}{g'(x)}$ to be divergent? And that means the limit of $\frac{f(x)}{g(x)}$ is also divergent? Jan 2, 2021 at 14:22
• @LarsSmith yes, that's ok. For example, consider $$\lim_{x\to\infty}\frac{x^2}{x}$$ Jun 1, 2021 at 15:47
• So if $f'(x)/g'(x)$ diverges by oscillation (but remains bounded), then we conclude that $f(x)/g(x)$ also has these properties? Jun 1, 2021 at 17:53

Another condition, very often forgotten, is that in some neighbourhood of $a$ (here $a=+\infty$), except perhaps at $a$, $g'(x)\neq 0$. This is not the case here: $1-\cos x$ is $0$ infinitely many times.

This is a good illustration why L'Hospital's rule is dangerous. One of the first things I learnt when I was a student is: ‘Avoid it. When it works, Taylor's polynomial at order 1 works as well.’

Here, the simplest way is via equivalents: $\,x-\sin x\sim_\infty x$ since $\sin x$ is bounded, hence $$\frac x{x-\sin x}\sim_\infty \frac x{x}=1.$$

• I think the fact that $\lim_{x\to a} f'(x)/g'(x)$ must exist already means that there must exist a neighbourhood of $a$ where $f$ and $g$ are differentiable and $g'(x)\neq 0$. Jun 28, 2015 at 15:28
• Probably, but one often forgets the condition. I don't get why (almost) all students stick to this rule, as though it were the alpha and omega of limits computation. Jun 28, 2015 at 15:33
• @user251125: This article by Boas might be of interest: maa.org/programs/faculty-and-departments/… Jun 28, 2015 at 16:21
• I would say that this is not what is important here. After all, the OP's logic is equally applicable to $\lim\limits_{x\to +\infty} \frac{2x}{2x-\sin(x)}$, and in this expression $g'(x)$ is never equal to $0$. Jun 29, 2015 at 9:07
• Nitpick: the fact that $1- \cos x = 0$ infinitely many times is not the exact issue here. The issue is that these roots have $+\infty$ as an accumulation point.
– chi
Jun 29, 2015 at 10:10

There is no contradiction; Hopital says that if $$\lim \frac {f'(x)}{g'(x)}$$ exists, then it is equal to $\lim \frac{f(x)}{g(x)}$.

In this case the limit does not exist, so nothing can be inferred.

Of course it also means that Hopital is useless in this case, but hopital is hardly the most important tool to solve limits anyway, and there are many other instances where it is useless :)

I think you have missed one of the most important hypothesis needed to use L'hopital's rule.

That is, the existence of $\lim_{x\to c}\frac{f'(x)}{g'(x)}$.

If this limit $L$ exists, then you are allowed to say that $\lim_{x\to c}\frac{f(x)}{g(x)}=L$.

However, the existence of the limit of quotient of two functions in no way implies the existence of the limit of quotient of their derivatives.