Expression for the value of $\int_0^1 x^{1/x}dx$ I'm looking to evaluate 
$$\int_0^1 x^{1/x} dx$$
So far, I have that
$$
\int_0^1 x^\frac{1}{x} dx \Rightarrow \int_0^1 e^{\frac{\ln x}{x}} dx \Rightarrow \int_0^1 \sum_{n \geq 0} \frac{\ln^nx}{x^nn!} dx
$$
However, I know that
$
\int_0^1 \frac{\ln x}{x} dx
$
diverges, so I can't see a justification for switching the integral and sum. Furthermore, substituting $x = e^\frac{-u}{n+1}$ yields that the above is equivalent to (assuming my calculations were right)
$$
\sum_{n\geq0} \frac{(-1)^n}{(1-n)^{1+n}}
$$
which is nonsensical. This thought process can be used to solve the "sophomore's dream" integral, which is $\int_0^1 x^{-x} dx = \sum_{n\geq1} n^{-n}$, to which I have two questions:


*

*Why can't the same process be used? What changes between the two expressions? I suspect is has something to do with switching the integral and sum, but being a power series for $e^x$ I believe it should be justifiable.

*If the above is true, what is another approach to take for this integral?


For some context, I have barely cracked into analysis, so if the answer is rudimentary, this is why. However, its very clear that the original integral will have a finite value, and being a cousin of the sophomore's dream, I suspect it could have a solution of the same form.
 A: The difference between $x^x$ and $x^{1/x}$ is not obvious when you restrict your view to the real line. However, the singularity of $x^{1/x}$ at 0 is much more ill-behaved than that of $x^x$. If you approach 0 from along the negative axis the difference is clear: For $t\in \mathbb R^+$:\begin{eqnarray}
(-t)^{-t} &=& e^{-t\log(-t)} = e^{-t\log t - i\pi t} = t^{-t}\left(\cos(\pi t) - i \sin(\pi t)\right)\\
(-t)^{\frac{1}{-t}} &=& e^{\frac{\log(-t)}{-t}} = e^{-\frac{\log t}{t} - i\frac{\pi}{t}} = t^{-\frac1t}\left(\cos\left(\frac\pi t\right) - i \sin\left(\frac\pi t\right)\right)
\end{eqnarray}
The first is well behaved as $t$ approaches 0, whereas the second diverges to infinity in magnitude while oscillating through all possible arguments. Similarly, approaching $x=0$ from any direction other than exactly the positive $x$ directly, $x^{1/x}$ behaves very badly while $x^x$ approaches 1. 
This means that any trick to evaluating the integral needs to tread carefully around the point $x=0$. The method of expanding as a series does not succeed; as you observe, none of the terms of the series $\sum_{n=0}^\infty \frac1{n!} \left(\frac{\log x}{x}\right)^n$ is integrable on $(0,1)$. It's somewhat analogous to try evaluating $\int_0^\infty e^{-x}dx$ by expanding $e^{-x}$ as a series. 
In terms of some sophomore dream like identity, I have in the past unsuccessfully tried a lot of things to attack this and similar integrals (for example, see my question from 2 years ago), and I don't expect anything as exciting as the sophomore's dream. However, there's one nice pseudo-identity that's too nice to pass up:$$
\int_0^1 x^{1/x} dx = \sum_{n=0}^\infty (-1)^n (n+2)^n
$$
The sum clearly diverges, but its Borel sum is your integral. As proof: $$
\sum_{n=0}^\infty (-1)^n (n+2)^n \frac{z^n}{n!} = \frac{1}{2z}\frac{d}{dz} W(z)^2 
$$
Where W is the Lambert W-function. Then we have the Borel sum:\begin{eqnarray}
\sum_{n=0}^\infty (-1)^n (n+2)^n &\stackrel{B}{=}& \int_0^\infty e^{-z} \left(\frac{1}{2z}\frac{d}{dz} W(z)^2\right)dz \\&=& \int_0^\infty e^{-z} \frac{W(z)}{z} W'(z)dz = \int_0^\infty e^{-z} e^{-W(z)} W'(z) dz\\ &=& \int_0^\infty \exp\left(\frac{\log \left(e^{-W(z)}\right)}{e^{-W(z)}}\right) e^{-W(z)}W'(z)dz\\ &=& \int_0^1 x^{\frac1x} dx
\end{eqnarray}
That's probably the nicest identity you'll find for this integral.
One thing you might think to try is expanding the series at $x=1$, but this doesn't actually help: Recall $-\sum_{n=1}^\infty H_n (1-x)^n = \frac{\log x}{x}$, where $H_n$ is the $n$th harmonic number. Using this and Bell polynomials, we find $$
x^{1/x} = e^{\frac{\log x}{x}} = \sum_{n=0}^\infty B_n(-1! H_1, -2! H_2,\dots, -n! H_n)\frac{(1-x)^n}{n!}
$$
so theoretically $\int_0^1 x^{1/x} dx = \sum_{n=0}^\infty \frac{B_n(-1! H_1,\dots, -n! H_n)}{(n+1)!}$, but this sum does not converge. (Of course, we trivially have that it is Abel summable to $\int_0^1 x^{1/x} dx$). The sequence $a_n = \frac{B_n(-1! H_1,\dots, -n! H_n)}{n!}$ is very difficult to analyze. Since every antiderivative of $x^{1/x}$ behaves in a similarly bad way near $x=0$, $a_n/n^p$ is not summable for any $p$. Numerical calculations suggest $a_n$ diverges around as fast $e^{(\log n)^2}$. I don't expect there's a different summability method that would work better here than Abel summation. 
One last trick which isn't as exciting as the sophomore's dream, but might interest you, we can use the Abel-Plana formula to find (using the substitution suggested by Allawonder in the comments to convert the integral to $\int_0^\infty (z+1)^{-(z+3)}dz$):$$
\int_0^1 x^{1/x} dx = \sum_{n=1}^\infty n^{-n-2} -\frac12 - 2\int_0^\infty \frac{e^{t\arctan t}\sin\left(\frac t2\log(1+t^2) + 3\arctan t\right)}{\left(e^{2\pi t} - 1\right)(1+t^2)^{\frac32}}dt
$$ 
