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?
$1-x=h\implies$
$$\lim_{h\to0}(1-h)\cdot\dfrac{1-(1-h)^{-h}}{h+\ln(1-h)}=\lim_{h\to0}\dfrac{1-\left(1+(-h)(-h)+\dfrac{(-h)(-h-1)}2\cdot h^2+O(h^3)\right)}{h-\left(h+\dfrac{h^2}2+O(h^3)\right)}=\dfrac1{\dfrac12}$$
So, you are correct