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'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 $$
 A: 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).
A: 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$".
A: 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).
A: 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.$
