Can anyone tell me what am I doing wrong here.
The limit provided is$$\lim_{x \to 0}\dfrac{xe^x-\ln(1+x)}{x²}$$
Method 1 (using standard limits)
$$= \ \ \ \ \dfrac{\displaystyle \lim_{x \to 0}\dfrac{xe^x}{x}-\lim_{x \to 0}\dfrac{\ln(1+x)}{x}}{\displaystyle \lim_{x \to 0}x}$$
$$= \ \ \ \ \dfrac{\displaystyle \lim_{x \to 0}e^x-\lim_{x \to 0} 1}{\displaystyle \lim_{x \to 0}x}$$
$$= \ \ \ \ \lim_{x \to 0} \dfrac{e^x-1}{x}$$
$$= \ \ \ \ 1$$
Method 2 (using Maclaurin series )
$$\lim_{x \to 0}\dfrac{xe^x-\ln(1+x)}{x²}$$
$$= \ \ \ \ \dfrac{3}{2}$$
Even with L'Hopital rule I get $\dfrac{3}{2}$. Then what's wrong with method 1.


The following step
$$\lim_{x \to 0}\dfrac{xe^x-\ln(1+x)}{x²}= \dfrac{\displaystyle \lim_{x \to 0}\dfrac{xe^x}{x}-\lim_{x \to 0}\dfrac{\ln(1+x)}{x}}{\displaystyle \lim_{x \to 0}x}$$
is not allowed since it leads to an undefined expression $\frac 0 0$.
See also the related