# The domain of $x^x$?

This one looks simple, but apparently there is something more to it. $$f{(x)=x^x}$$ I read somewhere that the domain is $\Bbb R_+$, a friend said that $x\lt-1, x\gt0$...

I'm really confused, because i don't understand why the domain isn't just all the real numbers. According to any grapher online the domain is $\Bbb R_+$. Any Thoughts on the matter?

Can someone explain what am I missing?

• Write it as $x^x = e^{x\ln(x)}$ not it is easy to determine the domain. Commented Dec 2, 2015 at 19:48
• @Dr.SonnhardGraubner, why should the derivative define the domain of a function? Commented Dec 2, 2015 at 19:52
• @m_gnacik but your equation is only true for $x>0$ while the LHS is defined from some negative values. See desmos.com/calculator/cftrtgyi75. Commented Dec 2, 2015 at 19:57
• Even though one might be able to play around with odd roots versus even roots and so on, given that the tag is real-analysis, the comment of @m_gnacik seems to give the correct answer. Commented Dec 2, 2015 at 19:59
• This answer provides a plot of the graph in the real case and indicates how it arises as a slice of a collection of complex graphs clearly indicating the domain from kamil09875's answer. Commented Dec 2, 2015 at 21:04

Split it into cases:

1. When $x=p/q$ where $p\in \mathbb Z,q\in\mathbb N_{>1},p\ne0,\gcd(p,q)=1$, then: $$x^x=\left(\frac{p}{q}\right)^\frac{p}{q}=\sqrt[q]{\left(\frac{p}{q}\right)^p}$$
• when $p<0$ then $$x^x=\sqrt[q]{\left(-\frac{q}{|p|}\right)^{|p|}}$$ if $p$ is even, then $\left(-\frac{q}{|p|}\right)^{|p|}$ is positive, otherwise it's negative and the root doesn't exist for even $q$.
• when $p>0$ then $$x^x=\sqrt[q]{\left(\frac{|p|}{q}\right)^{|p|}}$$ and $\left(\frac{|p|}{q}\right)^{|p|}$ is always positive.
2. When $x\in\mathbb Z$ the value $x^x$ always exist except $x=0$.
3. When $x$ is irrational then the only way to define $x^x$ is $$x^x=\exp(x\ln x)$$ and for real numbers we have $x>0$.

Summarizing, $x^x$ exist for all

• $x\in\mathbb R_+$
• $x\in\mathbb Z_-$
• $x\in\left\{ -\frac{p}{q}\in \mathbb Q\colon p,q\in\mathbb N_+ \land \gcd(p,q)=1\land q\text{ is odd}\right\}$

Why we don't see the negative part of the plot

1. Technical reason: $x^x$ in programs is usually defined as exp(x*log(x)) and the function log(x) is not defined for negative x.
2. Mathematical reason: set of negative $x$ which $x^x$ exists for is countable. Countable many points is not enough to form a curve.

This function may be plotted with points for negative $x$.

I am not sure what your mathematics background is, but the function $f(x)=x^x$ is defined for $\mathbb{R}_+$ as well as a countably infinite set of rational values in $\mathbb{Q}_-$. For example, we can find $f(-\frac n3)$ for all $n\in\mathbb{N}$. In fact, I cannot with confidence write down the entire set of negative values in the domain but any $x=\frac n {1-2n}$ will work for starters.

Some textbooks won't include the negative values, because they form a countable set of numbers that has Lebesgue measure zero.

• …and because the resulting function is extremely discontinuous on that countable set. Commented Dec 2, 2015 at 20:26