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.
 A: 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$$
A: You can first remove a factor $x^x$ from the numerator, which has limit $1$, so you remain with
$$
\lim_{x\to1}\frac{1-x^{x^2-x}}{(1-x)^2}
$$
If you substitute $x-1=t$, the limit becomes
$$
\lim_{t\to0}\frac{1-(1+t)^{t(1+t)}}{t^2}
$$
and now it's a matter of computing the Taylor expansion up to degree $2$ of
$$
(1+t)^{t(1+t)}=e^{t(1+t)\log(1+t)}
$$
Note that
$$
t(1+t)\log(1+t)=t(1+t)(t+o(t))=t^2+o(t^2)
$$
and therefore
$$
e^{t(1+t)\log(1+t)}=1+t^2+o(t^2)
$$
so your limit is
$$
\lim_{t\to0}\frac{1-1-t^2+o(t^2)}{t^2}=-1
$$
