Why can we not just use the chain rule to derive $f(x) = x^x$? I know that in order to derive $f(x) = x^x,$ you have to take the log of both sides first and then derive it to get $f'(x) = x^x(ln(x)+1).$ I know that if you take the derivative directly using the chain rule, you get the wrong answer. Why is this? I assume it has something to do with the fact that the definition of the derivative has $h\rightarrow 0$ and we would potentially have $(x+h)^{x+h} \rightarrow 0^0$ somehow (which is indeterminate form), but I'm not immediately seeing this.
EDIT: So as has been pointed out, this question has been answered elsewhere. Additionally, I did not provide enough information. Specifically: how am I applying the chain rule to get the wrong answer? (And I suppose 'What wrong answer am I getting?')
As it turns out, I couldn't decide which function is the "outside" function and which function is the "inside" function. Initially, I did the power rule first to get
$$f'(x) = x\cdot x^{x-1} \cdot (x^x\cdot \ln(x))= x^{2x}ln(x),$$
which we've seen is wrong.
 A: 'Why can we not just use the chain rule to derive $f(x)=x^x$?'  You can.
'I know that if you take the derivative directly using the chain rule, you get the wrong answer.' This is not true. 
You do not need to apply any 'tricks' by taking $\log$ of both sides. I suspect you are trying to take the derivative of $x^x$ without know the meaning of the function. $f(x) = x^x$ is just shorthand notation for $f(x) = e^{x\log x}$ (and note this function is only defined for $x > 0$). To emphasize, $e^{x\log (x)}$  is the definition of the function that is usually written as $x^x$. Once you write down the correct definition of $x^x$, finding the derivative with the chain rule is straightforward:
$$
f'(x) = e^{x\ln x}(1+\ln (x)) = x^x(1 + \ln (x)).
$$
A: Think of the function $y=x^2$. We know that the derivative is $2x$.
However, $y=x^2$ can also be written as $y=x*x$. If you choose a constant $a$ to be equal to $x$, then $y=ax$. Therefore, the derivative is $a$, and therefore is $x$.
That is clearly incorrect. We know it to be $2x$. The error you are making is somewhat similar to the one I just demonstrated. You are treating one of the $x$s as a constant, but it is a variable.
EDIT: I'm really sorry if that confused you more. I just reread it and couldn't tell what the heck I was getting at when I wrote that.
Basically, as people said in the comments, you can not use the chain rule if it is still in the form of $x^x$. You must rewrite it as $e^{x\ln{x}}$.
To rewrite what Travis said in my own words, the chain rule states that if $h(x)=f(g(x))$, then $h'(x)=f'(g(x))*g'(x)$. The problem is that with $x^x$, you can't really define anything as $f$ or $g$. (The best I could come up with is $f(x)=x^x$ and $g(x)=x$, but that doesn't get me anywhere.)
However, if you rewrite it as $e^{x\ln{x}}$, you can say that $f(x)=e^x$ and $g(x)=x\ln{x}$. Then you can use the chain rule.
$$h(x)=f(g(x))=e^{x\ln{x}}$$
$$h'(x)=f'(g(x))*g'(x) = e^{x\ln{x}}*\left(x*\frac1x+1*\ln{x}\right)$$
$$=x^x\left(1+\ln{x}\right)$$

I really feel like I'm just copying what other people said, but I feel like that is the only way to make my answer actually helpful. If I'm breaking rules or etiquette, please tell me.
