Limit - Applicability of L'Hopital's Rule:$\lim\limits_{x \to 0^+} \frac{xe^x}{e^x-1}$

I am required to find $\lim\limits_{x \to 0^+} \frac{xe^x}{e^x-1}$.

My attempt:

$\lim\limits_{x \to 0^+} \frac{xe^x}{e^x-1}$ = $\lim\limits_{x \to 0^+} e^x$ $\cdot$ $\lim\limits_{x \to 0^+} \frac{x}{e^x-1}$

$=1\cdot\lim\limits_{x \to 0^+} \frac{x}{e^x-1}$

$=\lim\limits_{x \to 0^+} e^{-x}$ (L'Hopital's Rule)

$= 1$ (which is the correct answer)

My question is: Why am I not able to apply the rule to the equation right from the beginning [since substituting $0$ we get $\frac{0}{0}$]?

$\lim\limits_{x \to 0^+} \frac{xe^x}{e^x-1}$

$=\lim\limits_{x \to 0^+} \frac{xe^x}{e^x}$

$=\lim\limits_{x \to 0^+}x$

$=0$ (wrong)

• It is applicable, you're just computing the derivative wrong. $$(xe^x)^\prime = xe^x + e^x.$$ – Philip Hoskins Feb 14 '16 at 7:13
• But why use L'Hopital's rule? – gniourf_gniourf Feb 14 '16 at 7:32

If you want to apply L'Hospital's rule right from the beginning, you may write \begin{align} \lim\limits_{x \to 0^+}\frac{xe^x}{e^x-1}&=\lim\limits_{x \to 0^+}\frac{e^x+xe^x}{e^x}=\frac{1+0}1=1 \end{align} since $$(xe^x)'=e^x+xe^x.$$