TITLE: Why can't I use the chain rule for the derivative of $x^{x^2}$?
QUESTION [5 upvotes]: I realize you can do this with implicit differentiation, but I thought you could also take the derivative by using the chain rule. Hence, it should be $2x\cdot x^{x^2-1}$
What's wrong with this?

REPLY [3 votes]: $$
\begin{align}
\lim_{h \to 0} \frac1h \bigg((x+h)^{(x+h)^2}-x^{x^2}\bigg) 
& = \lim_{h \to 0} \frac{x^{x^2+2hx}}h \bigg((1+\frac{h}x)^{x^2+2hx}-x^{-2hx} \bigg) \\[10pt]
& =  \lim_{h \to 0} \frac{x^{x^2+2hx}}h\bigg((1-x^{-2hx}+\frac{h}x(x^2+2hx) \bigg) \\[10pt]
& =  x^{x^2}\lim_{h \to 0}\frac{x^{2hx}-1}{h} +  \lim_{h \to 0}x^{x^2+2hx}(x+2h) \\[10pt] 
& =  x^{x^2}\lim_{h \to 0}\frac{(x^{2x})^h-1}{h} +  x^{x^2}x \\[10pt]
& = x^{x^2}(\log x^{2x} +x) \\[10pt]
& = x^{x^2}(2\log x +1)x
\end{align}
$$