What is the function $f(x)=x^x$ called? How do you integrate it?

My favorite paper about $x^x$ is The $x^x$ Spindle, which appeared in Mathematics Magazine back in 1996. The main idea is to visualize the fact that we can write it as $$x^x = e^{x (\ln(x)+2k\pi i)}.$$ Note that for each choice of $k$, we get a different branch of the logarithm. Given any real number $x$, most of these branches will be complex valued. Thus, we can plot a curve in 3D. For $k=0$ (i.e., the principal branch), it looks something like so:

enter image description here

If we use more branches simultaneously, we get something like so:

enter image description here

If you plot the standard graph of $y=x^x$ including the values of $(p/q)^{p/q}$ for $p$ negative and $q$ odd and positive. Thus the graph might look something like so.

enter image description here

From the complex perspective, the dots arise as spots where one of the spiral threads punctures the $x$-$z$ plane.


As far as integration goes, Mathematica (which I used to make the images), doesn't return a value for the antiderivative - I'd be shocked if it can be expressed in closed form. Nonetheless, the integral can be expressed as a series (as in UserX's answer) and there's the fabulous fact, known as the sophomore's dream that $$\int_0^1 x^x \, dx = -\sum_{n=1}^{\infty} (-n)^{-n},$$ which was mentioned in the comments by Lucian.

Also, the integral can certainly be evaluated numerically. If we define $$F_k(x) = \int_{-\infty}^x e^{x (\ln(x)+2k\pi i)} \, dx,$$ Then the graphs of the resulting functions look something like so:

enter image description here


Assuming you know series, as the integral of that cannot be expressed in elementary functions(if you let any function then you can just define $\mathfrak{F}(x)=\int_0^x t^t\,\mathrm{d}t$), then;

$$\int x^x\mathrm{d}x=\int e^{x\log x}\mathrm{d}x=\int e^{\log x^x}\mathrm{d}x\;\;\stackrel{\text{series for }e^x}{=}\;\;\int \sum\limits_{n=1}^{\infty}\frac{x^n\log^n x}{n!}\mathrm{d}x$$