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