Derivative of $\left(x^x\right)^x$ I am asked to find the derivative of $\left(x^x\right)^x$. So I said let  $$y=(x^x)^x \Rightarrow \ln y=x\ln x^x \Rightarrow \ln y = x^2 \ln x.$$Differentiating both sides, $$\frac{dy}{dx}=y(2x\ln x+x)=x^{x^2+1}(2\ln x+1).$$
Now I checked this answer with Wolfram Alpha and I get that this is only correct when $x\in\mathbb{R},~x>0$. I see that if $x<0$ then $(x^x)^x\neq x^{x^2}$ but if $x$ is negative $\ln x $ is meaningless anyway (in real analysis). Would my answer above be acceptable in a first year calculus course? 
So, how do I get the correct general answer, that $$\frac{dy}{dx}=(x^x)^x (x+x \ln(x)+\ln(x^x)).$$
Thanks in advance. 

If $y=(x^x)^x$ then $\ln y = x\ln(x^x) = x^2\ln x$. Then apply the product rule:
$$ \frac{1}{y} \frac{dy}{dx} = 2x\ln x + \frac{x^2}{x} = 2x\ln x + x$$
Hence $y' = y(2x\ln x + x) = (x^x)^x(2x\ln x + x).$
This looks a little different to your expression, but note that $\ln(x^x) \equiv x\ln x$.
