Derivative of $x^{\ln(x)-1}$ 
Take the derivative of $x^{\ln(x)-1}$.

so first I have simplify the expression:
$$x^{\ln(x)-1}=e^{\ln(x^{\ln(x)-1})}=e^{\ln(x)\cdot (\ln(x)-1)}=e^{\ln^2(x)-\ln(x)}$$
then 
$$(e^{\ln^2(x)-\ln(x)})'=e^{\ln^2(x)-\ln(x)}\cdot (\ln^2(x)-\ln(x))'=e^{\ln^2(x)-\ln(x)}\cdot (\ln^2(x)-\ln(x))'= \\
e^{\ln^2(x)-\ln(x)}\cdot (\frac{2}{x}-\frac{1}{x})=
(e^{\ln^2(x)}\cdot e^{\ln(x)})\cdot (\frac{2}{x}-\frac{1}{x})=xe^{\ln^2(x)}\cdot (\frac{2}{x}-\frac{1}{x})=2e^{\ln(x)^2}-e^{\ln(x)^2}$$
But I get a different answer on Wolfram, Where am I wrong? 
 A: Your mistake is that you essentially wrote $(\log x)^2 = \log (x^2) = 2 \log x$.  This is not correct.  Instead the derivative of the square of the logarithm is $$\frac{d}{dx} \left[(\log x)^2\right] = 2 \frac{\log x}{x}.$$
A: Here is a step by step approach to find a general formula for what you want
$$\begin{array}{}
y=f^g \\
\ln y = g\cdot\ln f & \text{take ln} \\
(\ln y)' = (g\cdot\ln f)' & \text{take derivative} \\
\frac{y'}y = (g\cdot\ln f)' & \text{derivative of $\ln y$} \\
\frac{y'}y = g\cdot(\ln f)' + g'\cdot\ln f & \text{product rule} \\
\frac{y'}y = g\cdot\left(\frac{f'}f\right) +  g'\cdot\ln f & \text{derivative of $\ln f$} \\
y' = \frac{gy}f \cdot f' + y\ln f\cdot g' & \text{multiply by $y$, rearrange} \\
y' = \frac{gf^g}f\cdot f' + f^g\ln f\cdot g' & \text{definition of $y$} \\
y' = {gf^{g-1}\cdot f' + f^g\ln f\cdot g'} & \text{combine powers of $f$} \\
\end{array}$$
In your example, we have
$$\begin{align}
f(x) &= x \\
g(x) &= \ln(x)-1
\end{align}$$
and hence
$$\begin{align}
y' &= (\ln(x)-1) \cdot x^{\ln(x)-2} \cdot 1 + x^{\ln(x)-1} \cdot \ln(x) \cdot \frac{1}{x} \\
y' &= (2 \ln(x) - 1) x^{\ln(x)-2}
\end{align}$$
A: Notice, apply chain rule as follows $$\frac{d}{dx}(x^{\ln x-1})=(\ln x-1)x^{\ln x-2}\frac{d}{dx}(x)+x^{\ln x-1}(\ln x)\frac{d}{dx}(\ln x-1)$$
$$=(\ln x-1)x^{\ln x-2}+x^{\ln x-1}(\ln x)\frac{1}{x}$$
$$=(\ln x-1)x^{\ln x-2}+x^{\ln x-2}\ln x$$
$$=\color{red}{(2\ln x-1)x^{\ln x-2}}$$
