# L'hopital's rule $\infty-\infty$

I came across the following question, I am not sure whether my answer is correct or not. I would really appreciate if someone can provide me with feedbacks.

$$\lim_{x\to \infty} x-e^x$$

My steps:

$$\lim_{x\to \infty} x-e^x = \infty - \infty$$ The answer is indeterminate form. Therefore we apply L'Hopital's rule

Step 1. Multiply the numerator and denominator of the function by

$$x + e^x$$

and apply L'Hopital's rule: $$\lim_{x\to \infty} \frac{x^2-e^{2x}}{x + e^x}$$ $$\lim_{x\to \infty} \frac{2x-2e^{2x}}{1 + e^x}$$

Ans: $$\frac{\infty - \infty}{\infty}$$ The answer is still an indeterminate form. We apply L'Hoptal's rule again

Step 2. We apply L'Hopital's rule again

$$\lim_{x\to \infty} \frac{2-4e^{2x}}{e^x}$$

Ans: $$\frac{\infty}{\infty}$$ The answer is still an indeterminate form. We apply L'Hoptal's rule again

Step 3: We apply L'Hopital's rule again: $$\lim_{x\to \infty} \frac{8e^{2x}}{e^x}$$ $$= \lim_{x\to \infty} {8e^x}$$

Ans: $$\infty$$

Therefore: $$\lim_{x\to \infty} x-e^x = \infty$$

• Your second attempt to apply L'Hospital was done without knowing if the hypotheses to apply it were satisfied. You didn't know if the $\infty-\infty$ case in the numerator resolves to $\pm\infty$. It could resolve to a finite number. Even, though it is true that $\lim_{x\to+\infty}(2x-2e^{2x})=-\infty$, at that point in the argument you haven't proved that. Therefore, the argument is incorrect. – user578878 Jul 25 '18 at 2:28
• You can write $x-e^x=x(1-e^x/x)$, and then find the limits of the two factors separately, the second using L'Hospital. – dbx Jul 25 '18 at 2:33
• One way to reduce $\infty-\infty$ to L'Hospital. $\infty_1-\infty_2=\ln(\frac{e^{\infty_1}}{e^{\infty_2}})$. You would apply L'Hospital to $\frac{e^{\infty_1}}{e^{\infty_2}}$. – user578878 Jul 25 '18 at 2:33
• @nextpuzzle, ln(x-y) != ln (x/y). I am sorry, I am not following your suggested method. Could you show steps? – boniface316 Jul 25 '18 at 2:38
• @boniface316 Look careful. What I said is rather $x-y=\ln\left(\frac{e^x}{e^y}\right)$. You also din't compute properly dbx's transformation. You would end up in that case with $\infty\cdot(1-\frac{\infty}{\infty})$, but that $\frac{\infty}{\infty}$ inside the parentheses resolves easily to $\infty$ leaving you the whole expression with $\infty\cdot (-\infty)=-\infty$. – user578878 Jul 25 '18 at 2:39

Another possibility is to do the following. First note that

$$\lim_{x \to \infty} \frac{e^x}{x} = + \infty$$ by L'Hopital's Rule. Next, factor out an $x$: $$\displaystyle \lim_{x \to \infty} x - e^x =\lim_{x \to \infty}x\left(1 - \frac{e^x}{x}\right) = \lim_{x \to \infty}\frac{1 - \frac{e^x}{x} }{1/x} = - \infty.$$

The last part follows since $1 - \frac{e^x}{x} \to - \infty$, and since $1/x \to 0$, and yet $1/x > 0$ for all $x > 0$ (so that the denominator does not change the sign of the infinity in the numerator).

The usual trick for evaluating a limit that resolves to the indeterminate form $\infty - \infty$ is to use properties of the natural logarithm and exponential function to simplify things a bit. It seems that nextpuzzle suggested this in the comments while I was typing, so hat-tip to that fine denizen of MSE. First, observe that $$x - \mathrm{e}^x = \log\left( \mathrm{e}^{x-\mathrm{e}^x} \right) = \log\left( \frac{\mathrm{e}^x}{\mathrm{e}^{\mathrm{e}^x}} \right).$$ As the logarithm is continuous, it follows that we can pass the limit through the logarithm (there is a little bit of nuance here, in that we require "continuity at infinity," but this can be resolved without too much difficulty). This gives us $$\lim_{x\to\infty} \left( x-\mathrm{e}^{x} \right) = \lim_{x\to\infty} \log\left( \frac{\mathrm{e}^x}{\mathrm{e}^{\mathrm{e}^x}} \right) = \log\left( \lim_{x\to\infty} \frac{\mathrm{e}^x}{\mathrm{e}^{\mathrm{e}^x}} \right).$$ Applying L'Hospital's rule to the limit here, we get something like $$\lim_{x\to\infty} \frac{\mathrm{e}^x}{\mathrm{e}^{-\mathrm{e}^x}} \overset{LH}{=} \lim_{x\to\infty} \frac{\mathrm{e}^x}{\mathrm{e}^x \mathrm{e}^{\mathrm{e}^x}} = \lim_{x\to\infty} \frac{1}{\mathrm{e}^{\mathrm{e}^x}} = 0^+.$$ That is to say, the limit approaches zero from the right. This is actually kind of important, since $\log(0)$ is not defined. However, we do know that the argument of $\log$ approaches zero from the right as $x\to+\infty$, which is good enough. Putting all of this together, we get $$\lim_{x\to\infty} \left( x-\mathrm{e}^{x} \right) = \log(0^+) = -\infty,$$ where we understand $\log(0^+)$ to mean $\lim_{x\to 0^+} \log(x)$.

There is a little bit of wibbly-wobbliness here, in that I haven't really done a very good job of justifying the passing of the limit into the logarithm, nor of explaining exactly what I mean by $\log(0^+)$. If you are taking a course in real analysis, you should try to fill in the gaps. On the other hand, if you are just learning limits for the first time, you can probably get away with not mucking through those details.

Another possibility is to use the approach suggested in the comments by dbx, i.e. note that $$x - \mathrm{e}^x = x \left( 1 - \frac{\mathrm{e}^x}{x} \right).$$ Then \begin{align*} \lim_{x\to\infty} \left( x - \mathrm{e}^x \right) &= \lim_{x\to\infty} x \left( 1 - \frac{\mathrm{e}^x}{x} \right) \\ &= \left( \lim_{x\to\infty} x \right) \left( \lim_{x\to\infty} 1 - \frac{\mathrm{e}^x}{x} \right) \\ &\overset{LH}{=} \left( \lim_{x\to\infty} x \right) \left( 1 - \lim_{x\to\infty} \frac{\mathrm{e}^x}{1} \right) \\ &= (+\infty)(1-\infty) \\ &= -\infty. \end{align*} If you are happy taking products of infinities, this is another viable option. Do note that this algebra of infinities should be justified (just like the passing of limits through logs, above, but it can be done).

• One doesn't have to be happy taking product of infinities. It is just a garden variety application of the properties of product of limits. It needs as much justification as every single one of the other equalities that you wrote there, which are just other instances of the arithmetic properties of limits. There is nothing special about it warranting it being singled out. – user578878 Jul 25 '18 at 2:59
• Most of the equalities that I have written involve passing limits through continuous functions (which is how we can find limits of products as products of limits, for example), and some applications of L'H. Both approaches rely on a notion of continuity at infinity (either to pass the limit through the logarithm, or to multiply infinities). Neither is terribly hard to justify, but both do require some "garden variety" arguments. In any case, one does have to be happy multiplying infinities, it just seems that you have already reached that Zen state. ;) – Xander Henderson Jul 25 '18 at 3:02

In the cases when I have $\infty-\infty$, I often calculate the limit with $\ln(\exp(f(x))$ instead of $f(x)$. In this case it would go as follows:

\begin{align*} \lim_{x\to+\infty}x-e^x&=\ln\left[\exp\left(\lim_{x\to+\infty}x-e^x\right)\right]&\\ &=\ln\left[\lim_{x\to +\infty} e^{x-e^x}\right]&\\ &=\ln\left[\lim_{x\to+\infty}\dfrac{e^x}{e^{e^x}}\right]&\\ &=\ln\left[\lim_{x\to+\infty}\dfrac{e^x}{e^{e^x}\cdot e^x}\right] &\left(\text{by L'Hôpital's rule, case }\frac{\infty}{\infty}\right)\\ &=\ln\left[\lim_{x\to\infty}\dfrac{1}{e^{e^x}}\right],& \end{align*} the limit inside the brackets tends to $0$ from the right, and so the answer would be "$\ln(0^+)=-\infty$".

There's a really simple way to do this one that those who have posted answers are not mentioning so far.

\begin{align} & e^x > 2^x \\[12pt] x & & 2^x \\[10pt] 1 & & 2 \\ 2 & & 4 \\ 3 & & 8 \\ 4 & & 16 \\ 5 & & 32 \\ 6 & & 64 \\ \vdots & & \vdots \end{align} Every time $x$ is incremented by $1,$ then $2^x$ doubles. That implies that after $x=5,$ the exponential $2^x$ increased by more than $32$ every time $x$ increases by $1$. Therefore $2^x - x$ grows by more than $32-1$ every time $x$ increases by $1.$ If that increases by $31$ at each step, it approaches $+\infty.$ Hence $x-2^x$ approaches $-\infty.$ And therefore so does $x-e^x$ because $e^x>2^x.$

• That's still complicated: simpler $e^x-x=1+x^2/2+\cdots>x^2/2$ etc. – Lord Shark the Unknown Jul 25 '18 at 5:35
• @LordSharktheUnknown : I think you're quite mistaken. You can't learn about power series until you learn about power series. – Michael Hardy Jul 25 '18 at 6:09
• Well, knowing that exponentials trump powers is much more basic than the Hospital. Also, how on earth can a proof that uses the number $31$ be described as "simple"? – Lord Shark the Unknown Jul 25 '18 at 6:22