<s>[INST] Evaluate $\lim_{x\to 1}\frac{x^{x}-x^{x^2}}{(1-x)^2}$ $$L=\lim_{x\to 1}\frac{x^{x}-x^{x^2}}{(1-x)^2}$$
Any hints on how to approach this problem in the first place? The answer should be $-1$.
I tried adding and subtracting $1$, then evaluating
$$L_1=\lim_{x\to 1}\frac{x^{x}-1}{(1-x)^2}$$ $$and$$ $$L_2=\lim_{x\to 1}\frac{x^{x^2}-1}{(1-x)^2}$$ 
But, unfortunately after applying L'Hospital to both of them, I'd got to
$L_1-L_2$ which is the equivalent of $\infty-\infty$.
I also tried applying L'Hospital to $L$
$$\lim_{x\to 1}\frac{x^{x}(lnx+1)-x^{x^2}(2xlnx+x)}{-2(1-x)}$$ 
Which weirdly doesn't give the answer.
 [/INST] We have \begin{align} \frac{x^x - x^{x^2}}{(x-1)^2} &= x^x \cdot \frac{1 - x^{x(x-1)}}{(x-1)^2} = \\
&= x^x \cdot \frac{1-e^{x(x-1)\ln x}}{(x-1)^2} = \\
&= x^x \cdot\frac{1-e^{x(x-1)\ln x}}{x(x-1)\ln x}\cdot\frac{x\ln x}{x-1} \end{align}
We calculate the limits separately: $$ \lim_{x \rightarrow 1} x^x = 1^1 = 1$$
$$ \lim_{x \rightarrow 1} \frac{1-e^{x(x-1)\ln x}}{x(x-1)\ln x} = \lim_{z \rightarrow 0}\frac{1-e^z}{z} = -1$$
$$ \lim_{x \rightarrow 1} \frac{x\ln x}{x-1} =^H \lim_{x \rightarrow 1} \frac{1 + \ln x}{1} = 1$$
so
$$ \lim_{x \rightarrow 1} \frac{x^x - x^{x^2}}{(x-1)^2} = -1$$
</s>