Asymptotic behaviour of $\int_0^{\infty } x^{-x} \exp (n x) dx$ I was given that
$$\underset{n\to \infty }{\text{lim}}\frac{\int_0^{\infty } x^{-x} \exp (n x) \, dx}{\exp \left(\frac{n-1}{2}+\exp (n-1)\right)}=\sqrt{2 \pi }$$
This is accessible via Laplace method. But how can we compute its full asymptotic expansion w.r.t $n$? Any help will be appreciated.
 A: Using the saddle point method with $a=0$, $b=+\infty$, $t_0=e^{-1}$, $z=e^n$, $p(t)=t\log t$ and $q(t)=1$, we find
\begin{multline*}
\int_0^{ + \infty } {x^{ - x} \mathrm{e}^{nx} \mathrm{d}x}  = \mathrm{e}^n \int_0^{ + \infty } {\mathrm{e}^{ - \mathrm{e}^n t\log t} \mathrm{d}t} \\ \sim \exp \left( {\tfrac{{n - 1}}{2} +\mathrm{e}^{n - 1} } \right)\sqrt {2\pi } \left( {1 + \sum\limits_{k = 1}^\infty  {\sqrt {\frac{{2\mathrm{e}}}{\pi }} \Gamma \left( {k + \tfrac{1}{2}} \right)\frac{{b_{2k} }}{{\mathrm{e}^{nk} }}} } \right),
\end{multline*}
where the coefficients are given as complex residues:
$$
b_{2k}  = \frac{1}{2}\mathop{\operatorname{Res}}\limits_{t = \mathrm{e}^{ - 1} }\left[ {(t\log t + \mathrm{e}^{ - 1} )^{ - k - 1/2} } \right] =
\frac{1}{2}\mathrm{e}^{k - 1/2} \mathop{\operatorname{Res}}\limits_{s = 0} \left[ {((1 + s)\log (1 + s) - s)^{ - k - 1/2} } \right].
$$
For example,
$$
b_2  =  - \frac{1}{{12}}\sqrt {\frac{\mathrm{e}}{2}} ,\quad b_4  =  - \frac{{23\mathrm{e}}}{{864}}\sqrt {\frac{\mathrm{e}}{2}} ,
$$
whence
$$
\int_0^{ + \infty } {x^{ - x} \mathrm{e}^{nx} \mathrm{d}x}  \sim \exp \left( {\tfrac{{n - 1}}{2} + \mathrm{e}^{n - 1} } \right)\sqrt {2\pi } \left( {1 - \frac{1}{{24}}\frac{1}{{\mathrm{e}^{n - 1} }} - \frac{{23}}{{1152}}\frac{1}{{\mathrm{e}^{2(n - 1)} }} +  \cdots } \right).
$$
A: This is not an answer.
This problem is very interesting because forcing to play with high accuracy. Considering
$$f(n)=\frac{\int_0^{\infty } x^{-x} \exp (n x) \, dx}{\sqrt{2 \pi }\exp \left(\frac{n-1}{2}+\exp (n-1)\right)}$$ the convergence seems to be very fast
$$\left(
\begin{array}{cc}
 n & f(n) \\
 0 & 0.9085146087 \\
 1 & 0.9392535430 \\
 2 & 0.9786602705 \\
 3 & 0.9938744663 \\
 4 & 0.9978722482 \\
 5 & 0.9992299463 \\
 6 & 0.9997183610 \\
 7 & 0.9999195281
\end{array}
\right)$$ which looks like a sigmoid function
