Derivative of ${ x }^{ x }$ without logarithmic differentiation

Thanks to Brian M. Scott for the comment that led to this solution:

$y={ x }^{ x }={ e }^{ x\ln { x } }\\ \frac { dy }{ dx } =\left( \ln(x)+1 \right) { e }^{ x\ln { x } }\\ \frac { dy }{ dx } =\left( \ln(x)+1 \right) { x }^{ x }\\ $


There's another way that looks like a gross blunder but actually is perfectly correct. I will illustrate it on the more general question, differentiate $y=f(x)^{g(x)}$.

If $g$ were constant, we'd get $f'(x)g(x)f(x)^{g(x)-1}$.

If $f$ were constant, we'd get $g'(x)f(x)^{g(x)}\log f(x)$.

Add these together to get the answer: $$y'=f'(x)g(x)f(x)^{g(x)-1}+g'(x)f(x)^{g(x)}\log f(x)$$

It's easy to see that in the original problem, where $f(x)=x$ and $g(x)=x$, this reduces to $x^x+x^x\log x$, as obtained by other methods.