L’Hopital’s rule $\infty-\infty$

calculuslimits

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'Hopital'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'Hopital'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 $$

Best Answer

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).