Series expansion of $\int x^xdx$ The indefinite integral: 
$$J=\int x^xdx$$
has no known closed form solution.
Expanding in series the function $f=x^x$ we get:
$$f\simeq\sum_{k=0}^N \dfrac{x^k\ln(x)^k}{k!}$$
So we can write:
$$J\simeq\sum_{k=0}^N\int\dfrac{x^k\ln(x)^k}{k!}dx$$
and we get:
$$J\simeq x+\sum_{k=1}^N\dfrac{\ln(x)^k\left[-(k+1)\ln(x)\right]^{-k}\Gamma\left(k+1,-(k+1)\ln(x)\right)}{(k+1)!}$$
where $\Gamma(x,a)$ is the incomplete gamma function.
It seems to work well in approximating J, for $N\ge 20$ and $x\in\mathbb{R}$.
Is there a better way to calculate numerically $J$ avoiding the use of the usual methods to evaluate definite integrals? Thanks.
 A: $\int x^x~dx=\int e^{x\ln x}~dx=\int\sum\limits_{n=0}^\infty\dfrac{x^n(\ln x)^n}{n!}dx$
For $\int x^n(\ln x)^n~dx$ , where $n$ is any non-negative integers,
$\int x^n(\ln x)^n~dx$
$=\int(\ln x)^n~d\left(\dfrac{x^{n+1}}{n+1}\right)$
$=\dfrac{x^{n+1}(\ln x)^n}{n+1}-\int\dfrac{x^{n+1}}{n+1}d((\ln x)^n)$
$=\dfrac{x^{n+1}(\ln x)^n}{n+1}-\int\dfrac{nx^{n+1}(\ln x)^{n-1}}{(n+1)x}dx$
$=\dfrac{x^{n+1}(\ln x)^n}{n+1}-\int\dfrac{nx^n(\ln x)^{n-1}}{n+1}dx$
$=\dfrac{x^{n+1}(\ln x)^n}{n+1}-\int\dfrac{n(\ln x)^{n-1}}{n+1}d\left(\dfrac{x^{n+1}}{n+1}\right)$
$=\dfrac{x^{n+1}(\ln x)^n}{n+1}-\dfrac{nx^{n+1}(\ln x)^{n-1}}{(n+1)^2}+\int\dfrac{x^{n+1}}{n+1}d\left(\dfrac{n(\ln x)^{n-1}}{n+1}\right)$
$=\dfrac{x^{n+1}(\ln x)^n}{n+1}-\dfrac{nx^{n+1}(\ln x)^{n-1}}{(n+1)^2}+\int\dfrac{n(n-1)x^{n+1}(\ln x)^{n-2}}{(n+1)^2x}dx$
$=\dfrac{x^{n+1}(\ln x)^n}{n+1}-\dfrac{nx^{n+1}(\ln x)^{n-1}}{(n+1)^2}+\int\dfrac{n(n-1)x^n(\ln x)^{n-2}}{(n+1)^2}dx$
$=\cdots\cdots$
$\vdots$
$\vdots$
$=\dfrac{x^{n+1}(\ln x)^n}{n+1}-\dfrac{nx^{n+1}(\ln x)^{n-1}}{(n+1)^2}+\cdots\cdots+\dfrac{(-1)^{n-1}(n(n-1)\cdots\cdots\times2)x^{n+1}\ln x}{(n+1)^n}-\int\dfrac{(-1)^{n-1}(n(n-1)\cdots\cdots\times1)x^n}{(n+1)^n}dx$
$=\dfrac{x^{n+1}(\ln x)^n}{n+1}-\dfrac{nx^{n+1}(\ln x)^{n-1}}{(n+1)^2}+\cdots\cdots+\dfrac{(-1)^{n-1}(n(n-1)\cdots\cdots\times2)x^{n+1}\ln x}{(n+1)^n}+\dfrac{(-1)^n(n(n-1)\cdots\cdots\times1)x^{n+1}}{(n+1)^{n+1}}+C$
$=\dfrac{(n+1)x^{n+1}(\ln x)^n}{(n+1)^2}-\dfrac{(n+1)nx^{n+1}(\ln x)^{n-1}}{(n+1)^3}+\cdots\cdots+\dfrac{(-1)^{n-1}((n+1)n(n-1)\cdots\cdots\times2)x^{n+1}\ln x}{(n+1)^{n+1}}+\dfrac{(-1)^n((n+1)n(n-1)\cdots\cdots\times1)x^{n+1}}{(n+1)^{n+2}}+C$
$=\sum\limits_{k=0}^n\dfrac{(-1)^{n+k}(n+1)!x^{n+1}(\ln x)^k}{k!(n+1)^{n-k+2}}+C$
$=\sum\limits_{k=0}^n\dfrac{(-1)^{n+k}n!x^{n+1}(\ln x)^k}{k!(n+1)^{n-k+1}}+C$
$\therefore\int\sum\limits_{k=0}^n\dfrac{(x\ln x)}{n!}dx=\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n\dfrac{(-1)^{n+k}x^{n+1}(\ln x)^k}{k!(n+1)^{n-k+1}}+C$
Hence $\int x^x~dx=\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n\dfrac{(-1)^{n+k}x^{n+1}(\ln x)^k}{k!(n+1)^{n-k+1}}+C$
