Evaluate $\lim\limits_{x \to 1}\dfrac{x-x^x}{1-x+\ln x}$. Problem
Evaluate $$\lim\limits_{x \to 1}\frac{x-x^x}{1-x+\ln x}$$.
Solution
Consider using Taylor's formula. Expand $x^x $ and $\ln x$ at $x=1$. We obtain
$$x^x=1+(x-1)+(x-1)^2+o((x-1)^2);$$
$$\ln x=(x-1)-\frac{1}{2}(x-1)^2+o((x-1)^2).$$
Therefore
\begin{align*}
\lim_{x \to 1}
\frac{x-x^x}{1-x+\ln x}&=\lim_{x \to 1}\frac{x-[1+(x-1)+(x-1)^2+o((x-1)^2)]}{1-x+[(x-1)-\frac{1}{2}(x-1)^2+o((x-1)^2)]}\\
&=\lim_{x \to 1}\frac{-(x-1)^2-o((x-1)^2)}{-\frac{1}{2}(x-1)^2+o((x-1)^2)}\\
&=2.
\end{align*}
Please correct me if I'm wrong! Can we solve it by L'Hospital's rule?

Another solution by L'Hospital's rule
Let $x=:1+h$. Then
\begin{align*}
\lim_{x \to 1}
\frac{x-x^x}{1-x+\ln x}&=\lim_{h \to 0}\frac{(1+h)[1-(1+h)^{h}]}{\ln(1+h)-h}\\
&=\lim_{h \to 0}\frac{e^{h\ln(1+h)}-1}{h-\ln(1+h)}\\
&=\lim_{h \to 0}\frac{h\ln(1+h)}{h-\ln(1+h)}\\
&=\lim_{h \to 0}\frac{h^2}{h-\ln(1+h)}\\
&=\lim_{h \to 0}\frac{2h}{1-\frac{1}{1+h}}\\
&=2\lim_{h \to 0}(1+h)\\
&=2.
\end{align*}
