Find $\int_0^\infty\frac{x!}{x^x}dx$

calculusdefinite integralsintegrationresidue-calculus

I wonder how I could evaluate $$\lim_{a\rightarrow0}\int_a^\infty\frac{x!}{x^x}dx$$Where $x!$ is defined for all complex numbers with a positive real part. This is inspired by a limit I found on BlackPenRedPen. I tried using the Residue theorem using the quarter circle contour on the complex plane with a singularity at the origin, but I don't know how to use it.enter image description hereThis is the contour I am using. Consider the outer circle as a contour $\Gamma$. Let the smaller semicircle be $\gamma$. Let the radius of the big semicircle be $R$ and the radius of the smaller semicircle be $r$. Then $$\int_0^\infty f(z)dz=\lim_{(r,R)\rightarrow(0,\infty)}\left(\int_\Gamma+\int_\gamma+\int_r^Rf(z)dz+\int_{ri}^{Ri}f(z)dz\right)=2\pi i\sum_k\text{Res}(f, z_k)$$Where $f(z)=\dfrac{z!}{z^z}$, $0^0=1$, and $z_k$ are the poles of $f(z)$. After that I am stuck as I don't think $f(z)$ has any poles. Any ideas?

Best Answer

Not an answer, just two funny observations: \begin{align} \int_0^\infty\frac{x!}{x^x}\,dx&=\int_0^\infty\frac{dx}{(1+x\log x)^2}; \\\sum_{n=1}^\infty\frac{n!}{n^n}&=\int_0^1\frac{dx}{(1+x\log x)^2}. \end{align} The second one is shown using $(1-z)^{-2}=\sum_{n=1}^\infty nz^{n-1}$ and termwise integration.

For the first one, \begin{align} \int_0^\infty\frac{x!}{x^x}\,dx&=\int_0^\infty\int_0^\infty y^x e^{-y}\,dy\,\frac{dx}{x^x} \\\color{gray}{[\text{exchange}]}\quad&=\int_0^\infty e^{-y}\int_0^\infty(y/x)^x\,dx\,dy \\\color{gray}{[x=yz]}\quad&=\int_0^\infty ye^{-y}\int_0^\infty z^{-yz}\,dz\,dy \\\color{gray}{[\text{exchange}]}\quad&=\int_0^\infty\int_0^\infty ye^{-y(1+z\log z)}\,dy\,dz \\\color{gray}{[\text{do the inner}]}\quad&=\int_0^\infty\frac{dz}{(1+z\log z)^2}. \end{align}

Related Question