To take the derivative of $x ^ x$, we write

$$\dfrac {\mathrm d}{\mathrm dx} x^x=\dfrac {\mathrm d}{\mathrm dx} e^{\ln x^x}=\dfrac {\mathrm d}{\mathrm dx} e^{x\ln x}= e^{x\ln x}× \dfrac {\mathrm d}{\mathrm dx}(x\ln x)=x^x\left(\ln x+1\right)$$

Here is my problem:

If $x\in\mathbb{Z^-}$, then $x^x\in\mathbb {R}$. But, $\ln x \not\in\mathbb {R}.$

Because, $\ln x$ is defined only in the set of positive real numbers.

If, $x \not\in\mathbb {Z^{-}}$ and $x\in\mathbb{R^{-}}$, then $x^x\in\mathbb {C}$ and $\ln x \in\mathbb {C}.$

But, the problem occurs if $x\in\mathbb{Z^-}.$

So, $x^x=e^{x\ln x}$ doesn't hold for all real numbers. This makes the derivative result suspicious.

Where is the problem?

  • 2
    $\begingroup$ Does this help? math.stackexchange.com/questions/1551470/domain-of-xx You can't draw the graph for $x\in\mathbb{R}^-$ since it isn't defined for all values of $x \in \mathbb{Q}^-$ $\endgroup$ Aug 24, 2020 at 7:20
  • $\begingroup$ @safdar no. I wrote for $x\in\mathbb Z^-$ $\endgroup$
    – user548054
    Aug 24, 2020 at 8:30
  • 1
    $\begingroup$ You cannot find differentiability for discrete points. so then it doesn't work. $\endgroup$ Aug 24, 2020 at 8:31
  • $\begingroup$ Usually, $x^x$ is just undefined in the negatives. $\endgroup$
    – user65203
    Aug 24, 2020 at 9:18

2 Answers 2


Not at all suspicious. You can't differentiate a function at an isolate point of the domain. So even if you extend the domain of $x^x$ to the negative integers, you cannot differentiate it at these points: how do you do the limit?

One could define $x^x$ for negative rational values of $x$ having odd denominators.

The set $W=\{a/b: a,b\in\mathbb{Z}, a<0, b>0, b\text{ odd}\}$ is even dense in $(-\infty,0)$, so it could be a good candidate for doing limits over it.

There is a problem, though: consider $-1/3$. In every neighborhood of $-1/3$ there are points $x_0$ in $W$ having even numerator and also points $x_1$ in $W$ having odd numerator. The value of $x^x$ at $x_0$ is positive, the value of $x^x$ at $x_1$ is negative. Therefore the function is not continuous at $-1/3$.

Hence, differentiability is out of question.

If you consider $x^x$ over the complex numbers, you have to choose a branch cut for the complex logarithm. Then the function is well defined and even analytic: $x^x=\exp(x\log x)$. Of course, in order to consider the derivative at $-1$ you need to do a cut different from the standard one that removes the negative $x$-semiaxis.


The differentiability of a function can only be found if it is continuous in an interval $(a,b)$.

$x^x$ is continuous only for $x > 0$. For $x<0$, the graph can only be drawn for some discrete points. Differentiability is not defined for this part of the graph.

$$\frac{\mathrm d (x^x)}{\mathrm{d}x}=x^x(\ln x+1)\quad \forall\quad x\in \mathbb{R}^+$$

  • $\begingroup$ At the point $x=-2$, we have $f'(-2)=1/4 (1 + i π + \log(2))$ $\endgroup$
    – user548054
    Aug 24, 2020 at 8:52
  • $\begingroup$ @Elementary If you are defining the function over some subset of the complex plane using the relation $z^z=e^{z\ln{(z)}}$ then the derivative you have provided is valid for any value within the domain. $\endgroup$ Aug 24, 2020 at 9:07
  • $\begingroup$ @Elementary what subset are you defining this function over? $\mathbb{Z}^-$ or $\mathbb{C}$? $\endgroup$ Aug 24, 2020 at 9:09
  • $\begingroup$ @PeterForeman how can we prove $z^z=e^{z\ln z}$ ? $\endgroup$
    – user548054
    Aug 24, 2020 at 9:12
  • $\begingroup$ @Elementary It's typically a definition rather than something to prove. How else do you suggest evaluating $\pi^\pi$? $\endgroup$ Aug 24, 2020 at 9:13

You must log in to answer this question.