# Finding $\int x^xdx$

I'm trying to find $\int x^x \, dx$, but the only thing I know how to do is this:

Let $u=x^x$.

\begin{align} \int x^x \, dx&=\int u \, du\\[6pt] &=\frac{u^2}{2}\\[6pt] &=\dfrac{\left(x^x\right)^2}{2}\\[6pt] &=\frac{x^{2x}}{2} \end{align}

But it's certain that this isn't the correct way to evaluate that, and the answer must be wrong.

-
If $u=x^x$, then $du$ is not equal to $dx$, and there lies your mistake. –  nbubis May 5 '12 at 11:47
You forgot to compute $du$ in terms of $dx$. Further, after solving an indefinite integral, it's ofter good idea to check it, deriving. –  leonbloy May 5 '12 at 11:47
@leonbloy And what will $du$ be? –  Garmen1778 May 5 '12 at 11:51
A related question. –  Ｊ. Ｍ. May 5 '12 at 12:15
"Solve" in the title is the wrong word. That mistake is almost universal in this forum. One solves equations; one solves problems. One evaluates or finds expressions. –  Michael Hardy May 5 '12 at 16:47

As noted in the comments, your derivation contains a mistake.

To answer the question, this function can not be integrated in terms of elementary functions. So there is no "simple" answer to your question, unless you are willing to consider a series approximation:

$$\int{x^xdx} = \int{e^{\log x^x}dx} = \int{\sum_{k=1}^{\infty}\frac{x^k\log^k x}{k!}}dx$$

-
I'm not as advanced as you. How did you know that series is the one for that problem? –  yiyi May 8 '12 at 2:09
Just use the series for $e^x$, and substitute. –  nbubis May 8 '12 at 3:51
could you suggest some terms I could look up or a book to read to know more about solving $/int$ with series? –  yiyi May 8 '12 at 5:57
I could, but as I'm not an expert on the subject, I think it's best to ask a new question. If you won't - I will. –  nbubis May 8 '12 at 8:06
I think i will search more on this site careful first. –  yiyi May 8 '12 at 11:44

let ${x}^{x} = {\left({e}^{\ln {x}} \right)}^{x} = {e}^{x \ln {x}}.$

By the series expansion of ${e}^{x}$: $${e}^{x \ln {x}} = \sum _{ n=0 }^{ \infty }{ \frac { { \left( x \ln{x} \right) }^{ n } }{ n! } }$$

Thus $$\int _{ 0 }^{ 1 }{ { x }^{ x } } dx=\sum _{ n=0 }^{ \infty }{ \int _{ 0 }^{ 1 }{ \frac { { { x }^{ n }\left( \ln {x} \right) }^{ n } }{ n! } } }=\sum _{ n=0 }^{ \infty }{ \frac { 1 }{ n! } \int _{ 0 }^{ 1 }{ { x }^{ n } } { \left( \ln { x } \right) }^{ n }dx }$$

Let $u = {\left(\ln {x} \right)}^{n}$, $dv = {x}^{n} dx$, $du = \frac{{n \left(\ln {x} \right)}^{n-1}}{x} dx$ and $v=\frac{{x}^{n+1}}{n+1}$, then using integration by parts, we arrive at

$$\lim _{ a\rightarrow 0 }{ \int _{ a }^{ 1 }{ { x }^{ n } } { \left( \ln { x } \right) }^{ n }dx } =\lim _{ a\rightarrow 0 }{ { \left[ \frac { { x }^{ n+1 } }{ n+1 } { \left( \ln { x } \right) }^{ n } \right] }_{ a }^{ 1 } } -\lim _{ a\rightarrow 0 }{ \int _{ a }^{ 1 }{ { \frac { n }{ n+1 } x }^{ n } } { \left( \ln { x } \right) }^{ n-1 } } dx$$

which becomes $$\lim _{ a\rightarrow 0 }{ \int _{ a }^{ 1 }{ { x }^{ n } } { \left( \ln { x } \right) }^{ n }dx } =-\int _{ 0 }^{ 1 }{ { \frac { n }{ n+1 } x }^{ n } } { \left( \ln { x } \right) }^{ n-1 }dx = \frac{{(-1)}^{n}n!}{{(n+1)}^{n+1}}$$

Therefore $$\int _{ 0 }^{ 1 }{ { x }^{ x } } dx=\sum _{ n=1 }^{ \infty }{ \frac { { \left( -1 \right) }^{ n-1 } }{ { n }^{ n } } }$$

-
Hello, welcome to Maths.SE. For some basic information about writing maths on this site see e.g. here, here, here and here. Notably, maths is delimited by $ or $$. – Lord_Farin Jan 3 at 10:05 As to the content, you didn't answer the question, for it was asking about the indefinite, not the definite, integral. – Lord_Farin Jan 3 at 10:09 If you are willing to put bounds on your integral, it is possible to compute that$$\int_0^1 x^x\,dx = \sum_{n=1}^\infty \frac{(-1)^{n-1}}{n^n}.$$Indeed, if you start like nbubis suggests, and make the substitution u = -\log x, you get that$$\int_0^1 x^x\,dx = \sum_{k=0}^\infty \frac{1}{k!}\int_0^1x^k(\log x)^k\,dx = \sum_{k=0}^\infty \frac{(-1)^k}{k!}\int_0^\infty e^{u(k+1)}u^k\,du = \sum_{k=0}^\infty \frac{(-1)^k}{k!}\frac{1}{(k+1)^k}\int_0^\infty e^{u(k+1)}[(k+1)u]^k\,du.$$If you then make the substitution t = (k+1)u this becomes$$\sum_{k=0}^\infty \frac{(-1)^k}{k!}\frac{1}{(k+1)^k}\int_0^\infty e^tt^k\,dt = \sum_{k=0}^\infty \frac{(-1)^k}{(k+1)!}\frac{1}{(k+1)^k}\Gamma(k+1),$$where \Gamma is the usual Gamma function. Since \Gamma(k+1) = k!, the final expression is$$ \sum_{k=0}^\infty \frac{(-1)^k}{(k+1)^{k+1}} = \sum_{n=1}^\infty \frac{(-1)^{n-1}}{n^n}.$$Similarly you can derive \int_0^1 x^{-x}\,dx = \sum_{n=1}^\infty n^{-n}. In don't think any further simplification is possible. - This is nice. I like these kinds of answers. This gives, essentially,$$\int_0^1 x^{-zx}\,dx = \sum_{n=1}^{\infty} \frac{z^{n-1}}{n^n}.$$– Antonio Vargas May 9 '12 at 6:51 And slightly more generally,$\int_0^1 x^{r-zx}\ dx = \sum_{n=1}^\infty \dfrac{z^{n-1}}{(r+n)^n}$for$r > -1$. – Robert Israel May 9 '12 at 7:59 These identities for$\int_0^1 x^{-x}\ dx$and$\int_0^1 x^x\ dx\$ are sometimes called the "sophomore's dream". Look that up on Wikipedia. –  Robert Israel May 9 '12 at 8:04