Derivative of $x^x$

by Jakub Marian

Tip: See my list of the Most Common Mistakes in English. It will teach you how to avoid mis­takes with com­mas, pre­pos­i­tions, ir­reg­u­lar verbs, and much more (PDF Version).

Calculating the derivative of $x^x$ is a very simple task, but it may be hard to find the general idea on your own, so here it is. We will need the following formula:

$$ a^b = \l(e^{\log(a)}\r)^b = e^{b\log(a)} $$

(where “$\log$” denotes the natural logarithm, which is often denoted “$\ln$” in non-mathematical literature). The trick is to rewrite $x^x$ using the formula above (by setting $a = b = x$) and then differentiate the rest according to the normal rules of differentiation:

$$ \l(x^x\r)’ = \l(e^{x\log(x)}\r)’ = e^{x\log(x)}\l(x\log(x)\r)’\,, $$

where we used $(e^{f(x)})’ = e^{f(x)}f’(x)$. Now we will rewrite $e^{x\log(x)}$ back to $x^x$ (it is the same thing we started with) and differentiate the second part using $(u(x)v(x))’ = u’(x)v(x) + u(x)v’(x)$:

$$ e^{x\log(x)}\l(x\log(x)\r)’ = x^x\l(1⋅\log(x) + x⋅\frac{1}{x}\r) = x^x\l(\log(x)+1\r)\,. $$

And there you have it: $(x^x)’ = x^x\l(\log(x)+1\r)$.

By the way, I have written several educational ebooks. If you get a copy, you can learn new things and support this website at the same time—why don’t you check them out?

Enter the discussion 0