I want to find the first 6 terms for the series expansion of this integral:
$$\int x^x~dx$$
My idea was to let: $$x^x=e^{x\ln x}$$
From that we have: $$\int e^{x\ln x}~dx$$
The series expansion of $e^x$ is: $$\sum\limits_{n=0}^\infty\frac{x^n}{n!}$$
Then we have:
$$\int e^{x\ln x}~dx=\int\sum\limits_{n=0}^\infty\frac{(x\ln x)^n}{n!}dx$$
I integrated the first 3 terms (since it was the easiest the work with): $$x+\frac{1}{4}x^2(2\ln x-1)+\frac{1}{54}x^3(9(\ln x)^2-6\ln x+2)+\cdots$$
Is there any other efficient way of getting the first 6 terms of the series expansion of the integral?
Try taking a Taylor series for $\log x$, multiplying it by $x$, and plugging the result into the Taylor series for $e^x$. You can easily compute the first few terms.
Your choice of series for $\log x$ will affect where the result converges, so nothing will be valid everywhere. If this were a definite integral, it might be better.