# Why is $x^x$ only defined for $x>0$

Consider the real function $x^x$.

I understand that $0^0$ is undefined so $x \neq 0$ but $x$ values like $-1$ and $-2$ have well defined function values (although curiously opposite sign). Why isn't the curve well defined for $x<0$?

Note: the domain that I would like to investigate this function for is x is an element of the real numbers

• What about $x=-\frac{1}{2}$? – uniquesolution Jun 21 '17 at 8:10
• Oh that's true, but can't that just be a point of discontinuity? – Isaac Greene Jun 21 '17 at 8:12
• What about $x$ any negative non-integer? – uniquesolution Jun 21 '17 at 8:13
• x = -1/3? Is that defined? – Isaac Greene Jun 21 '17 at 8:19
• You haven't really defined a function until you have specified what its domain is going to be and then explained what its values on every point of that domain should be. In many usual cases you can get away with just giving an expression and leave it to the reader to figure out what domain you had in mind -- but $x^x$ is obviously not one of those, as evidenced by the observable fact that people here disagree about which domain you should have in mind. – hmakholm left over Monica Jun 21 '17 at 8:26

Think about a number of the form $x=-(n+a)$, where $n\geq 1$ is a natural number and ${0<a<1}$. Then $$x^x=(-(n+a))^{-(n+a)}=(-(n+a))^{-n}(-(n+a))^{-a}$$ So if $x^x$ is a real number, then so is $(-(n+a))^{-a}$. But then, there are very many choices of $a$ for which $(-(n+a))^{-a}$ is not real. For example, if $a=1/2$, then this number is not real. There are many other choices, too.

That's why the "natural" domain of $x^x$ does not include negative numbers, although - for a selected subset of them, the values $x^x$ are real valued.

$$x^x=\begin{cases} x^x\qquad\text{if } x>0 \\ (-1)^x(-x)^x \quad\text{if } x<0 \end{cases}$$ $(-1)^x=\cos(\pi x)+i\,\sin(\pi x)$ $$x^x=\begin{cases} x^x\qquad\text{if } x>0 \\ \left(\cos(\pi x)+i\,\sin(\pi x)\right)(-x)^x \quad\text{if } x<0 \end{cases}$$ For $x<0$, one can draw separately the real part $\cos(\pi x)(-x)^x$ and the imaginary part $\sin(\pi x)(-x)^x$.

Of course, for $x=-n$ integer, the imaginary part is $0$. The real part is $\cos(\pi x)(-x)^x=\cos(-n\pi)(n)^{-n}=\frac{(-1)^n}{n^n}$. So, the result is real : $$(-n)^{-n}=\frac{(-1)^n}{n^n}$$

Let's say $x<0$. Then make a change: $x=-y, y>0$ so that your function becomes: $$x^x=(-y)^{-y}=\frac{1}{(-y)^y}.$$

Well, if $y$ is an integer, it is real, but if $y$ is a rational like $\frac{1}{2}$ (or $\frac{2m+1}{2n}$), its value is a complex (unreal) number: $$\frac{1}{(-1/2)^{1/2}}=\frac{1}{(1/2)i}.$$