TITLE: Is this logic behind the derivative of $x^x$ a coincidence?
QUESTION [7 upvotes]: As many of you probably know, when you take the derivative of $x^x$, you cannot treat it as either a exponential function ($a^x$) or like a function of the form $x^a$. 
If you treat it like $x^a$ then you get an aswer of $xx^{x-1}$, which is just $x^x$.
Treat it like $a^x$, and you get $x^xln(x)$.
The correct derivative is $x^x(ln(x)+1)$, which you get by doing implicit differentiation after taking the natural log of both side.
This is the same as $x^xln(x)+x^x$, which happens to be the combination of the "wrong" derivatives you get when treating $x^x$ as the 2 different types of functions I specified earlier.
Is there any real logic behind this or is it coincidence. Also, could this also be applied to other function hybrids like $x^x$?

REPLY [5 votes]: Let $F$ be a nice function of two variables, and define
$$f(x)=F(x,x).$$
By the chain rule,
$$f'(x)=F_1(x,x)+F_2(x,x)$$
where $F_1$ and $F_2$ are the partial derivatives of $F$ with respect to its
two arguments.
Here, take
$$F(x,y)=x^y.$$ Then
$$F_1(x,y)=yx^{y-1}$$
and
$$F_2(x,y)=(\ln x)x^y.$$
So
$$f'(x)=xx^{x-1}+(\ln x)x^x=(1+\ln x)x^x$$
just as you observed.