TITLE: When to Stop Using L'Hôpital's Rule
QUESTION [49 upvotes]: I don't understand something about L'Hôpital's rule. In this case: 
$$
\begin{align}
& {{}\phantom{=}}\lim_{x\to0}\frac{e^x-1-x^2}{x^4+x^3+x^2} \\[8pt]
& =\lim_{x\to0}\frac{(e^x-1-x^2)'}{(x^4+x^3+x^2)'} \\[8pt]
& =\lim_{x\to0}\frac{(e^x-2x)'}{(4x^3+3x^2+2x)'} \\[8pt]
& =\lim_{x\to0}\frac{(e^x-2)'}{(12x^2+6x+2)'} \\[8pt]
& = \lim_{x\to0}\frac{(e^x)'}{(24x+6)'} \\[8pt]
& = \lim_{x\to0}\frac{e^x}{24} \\[8pt]
& = \frac{e^0}{24} \\[8pt]
& = \frac{1}{24}
\end{align}
$$
Why do we have to keep on solving after this step:
$$\displaystyle\lim_{x\to0}\dfrac{(e^x-2)'}{(12x^2+6x+2)'}$$
Can't I just plug in $x=0$ and compute the limit at this step giving me:
$$\dfrac{1-2}{0+0+2}=-\dfrac{1}{2}$$
I'm very confused, because I get different probable answers for the limit, depending on when do I stop to differentiate, as clearly $-\frac1{2}\neq \frac 1{24}$.

REPLY [15 votes]: A quick addition to Ra1nMaster's otherwise excellent answer: you can only apply L'Hopital's rule if you have an indeterminate form and if the limit, after applying L'Hopital's rule, exists.
This second condition is equally important; for instance a classic stumper is
$$\lim_{x\to\infty} \frac{x}{x+\sin x}.$$
Since this limit has the form $\frac{\infty}{\infty}$, one might naively apply L'hopital's rule, getting
$$\lim_{x\to\infty} \frac{1}{1+\cos x}$$
and concluding the original limit does not exist. This is wrong;
$$\lim_{x\to\infty} \frac{x}{x+\sin x} = \lim_{x\to\infty} \frac{1}{1+\frac{\sin x}{x}}=1.$$