I've had people ask me why we cannot differentiate functions of the form $\displaystyle y = f(x)^{g(x)}$ using the chain rule, such as $\displaystyle y = x^x$. We know that we must resort to logarithms and thus differentiate it implicitly to actually get anywhere.

But my question: how would you explain why the chain rule fails on functions of the form $\displaystyle y = f(x)^{g(x)}$?