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.This 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?
Find $\int_0^\infty\frac{x!}{x^x}dx$
calculusdefinite integralsintegrationresidue-calculus
Related Solutions
[Math] Evaluate the Cauchy Principal Value of $\int_{-\infty}^{\infty} \frac{\sin x}{x(x^2-2x+2)}dx$
Write $\sin{x} = (e^{i x}-e^{-i x})/(2 i)$. Then consider the integral
$$PV \oint_{C_{\pm}} dx \frac{e^{\pm i z}}{z (z^2-2 z+2)} $$
where $C_{\pm}$ is a semicircular contour of radius $R$ in the upper/lower half plane with a semicircular detour into the upper/lower half plane of radius $\epsilon$. For $C_{+}$, we have
$$PV \oint_{C_{+}} dz \frac{e^{i z}}{z (z^2-2 z+2)} = \int_{-R}^{-\epsilon} dx \frac{e^{i x}}{x (x^2-2 x+2)}+ i \epsilon \int_{\pi}^0 d\phi \, e^{i \phi} \frac{e^{i \epsilon e^{i \phi}}}{\epsilon e^{i \phi} (\epsilon^2 e^{i 2 \phi} - 2 \epsilon e^{i \phi}+2)} \\+ \int_{\epsilon}^R dx \frac{e^{i x}}{x (x^2-2 x+2)}+ i R \int_0^{\pi} d\theta \, e^{i \theta} \frac{e^{i R e^{i \theta}}}{R e^{i \theta} (R^2 e^{i 2 \theta} - 2 R e^{i \theta}+2)} $$
For $C_-$, we have
$$PV \oint_{C_{-}} dz \frac{e^{-i z}}{z (z^2-2 z+2)} = \int_{-R}^{-\epsilon} dx \frac{e^{-i x}}{x (x^2-2 x+2)}+ i \epsilon \int_{-\pi}^0 d\phi \, e^{i \phi} \frac{e^{-i \epsilon e^{i \phi}}}{\epsilon e^{i \phi} (\epsilon^2 e^{i 2 \phi} - 2 \epsilon e^{i \phi}+2)} \\+ \int_{\epsilon}^R dx \frac{e^{-i x}}{x (x^2-2 x+2)}- i R \int_0^{\pi} d\theta \, e^{-i \theta} \frac{e^{-i R e^{-i \theta}}}{R e^{-i \theta} (R^2 e^{-i 2 \theta} - 2 R e^{-i \theta}+2)} $$
In both cases, we take the limits as $R \to \infty$ and $\epsilon \to 0$. Note that, in both cases, the respective fourth integrals have a magnitude bounded by
$$\frac{2}{R^2} \int_0^{\pi/2} d\theta \, e^{-R \sin{\theta}} \le \frac{2}{R^2} \int_0^{\pi/2} d\theta \, e^{-2 R \theta/\pi}\le \frac{\pi}{R^3}$$
The respective second integrals of $C_{\pm}$, on the other hand, become equal to $\mp i \frac{\pi}{2} $. Thus,
$$PV \oint_{C_{\pm}} dz \frac{e^{\pm i z}}{z (z^2-2 z+2)} = PV \int_{-\infty}^{\infty} dx \frac{e^{\pm i x}}{x (x^2-2 x+2)} \mp i \frac{\pi}{2}$$
On the other hand, the respective contour integrals are each equal to $\pm i 2 \pi$ times the sum of the residues of the poles inside their contours. (For $C_-$, there is a negative sign because the contour was traversed in a clockwise direction.) The poles of the denominator are at $z_{\pm}=1 \pm i$. Thus,
$$PV \int_{-\infty}^{\infty} dx \frac{e^{\pm i x}}{x (x^2-2 x+2)} \mp i \frac{\pi}{2} = \pm i 2 \pi \frac{e^{\pm i (1 \pm i)}}{(1 \pm i) (2) (\pm i)} $$
Taking the difference between the two results and dividing by $2 i$, we get that
$$\int_{-\infty}^{\infty} dx \frac{\sin{x}}{x (x^2-2 x+2)} = \frac{\pi}{2} \left (1+\frac{\sin{1}-\cos{1}}{e} \right ) $$
Note that we may drop the $PV$ because the difference between the integrals removes the pole at the origin.
The following result may be useful:
Lemma. Let $f$ be a holomorphic function defined on an open set $U$ containing the interval $(0, \infty)$ such that $\int_{0}^{\infty} \frac{|f(x)|}{1+x} \, \mathrm{d}x < \infty$. Then for any $a > 0$, we have \begin{align*} \mathrm{PV}\hspace{-0.5ex}\int_{0}^{\infty} \frac{f(x)}{x-a} \, \mathrm{d}x &= \lim_{\varepsilon \to 0^+} \int_{0}^{\infty} \frac{f(x)}{x-a-i\varepsilon} \, \mathrm{d}x - \pi i f(a) \\ &= \lim_{\varepsilon \to 0^+} \int_{0}^{\infty} \frac{f(x)}{x-a+i\varepsilon} \, \mathrm{d}x + \pi i f(a). \end{align*}
Using this lemma and OP's computation, we have
\begin{align*} \mathrm{PV}\hspace{-0.5ex}\int_{0}^{\infty} \frac{1}{x^{\alpha}(x-a)} \, \mathrm{d}x &= \lim_{\varepsilon \to 0^+} \int_{0}^{\infty} \frac{1}{x^{\alpha}(x-a-i\varepsilon)} \, \mathrm{d}x - \frac{\pi i}{a^{\alpha}} \tag{by lemma} \\ &= \lim_{\varepsilon \to 0^+} \frac{2\pi i}{1-e^{-2\pi\alpha i}} \cdot \frac{1}{(a+i\varepsilon)^{\alpha}} - \frac{\pi i}{a^{\alpha}} \tag{by OP} \\ &= \frac{2\pi i}{1-e^{-2\pi\alpha i}} \cdot \frac{1}{a^{\alpha}} - \frac{\pi i}{a^{\alpha}} \\ &= \frac{\pi \cot(\pi \alpha)}{a^{\alpha}}. \end{align*}
Proof of Lemma. Let $\delta > 0$ be sufficiently small so that the closed disk $\{z\in\mathbb{C} : |z-a|\leq\delta\}$ is contained in $U$, and consider the contour $(0, a-\delta) \cup \gamma_{\delta} \cup (a+\delta, \infty)$ as below:
Then by the Cauchy integration theorem, we can deform the integral path $(0, \infty)$ into the above contour without changing the value of the integral:
\begin{align*} \int_{0}^{\infty} \frac{f(x)}{x-a-i\varepsilon} \, \mathrm{d}x &= \int_{0}^{a-\delta} \frac{f(x)}{x-a-i\varepsilon} \, \mathrm{d}x + \int_{\gamma_{\delta}} \frac{f(z)}{z-a-i\varepsilon} \, \mathrm{d}z + \int_{a+\delta}^{\infty} \frac{f(x)}{x-a-i\varepsilon} \, \mathrm{d}x \end{align*}
Letting $\varepsilon \to 0^+$ and then $\delta \to 0^+$, and then applying the dominated convergence theorem and Theorem 9.13 in OP, we get
\begin{align*} &\lim_{\varepsilon \to 0^+} \int_{0}^{\infty} \frac{f(x)}{x-a-i\varepsilon} \, \mathrm{d}x \\ &\quad= \int_{0}^{a-\delta} \frac{f(x)}{x-a} \, \mathrm{d}x + \int_{\gamma_{\delta}} \frac{f(z)}{z-a} \, \mathrm{d}z + \int_{a+\delta}^{\infty} \frac{f(x)}{x-a} \, \mathrm{d}x \\ &\quad\to \mathrm{PV}\hspace{-0.5ex}\int_{0}^{\infty} \frac{f(x)}{x-a} \, \mathrm{d}x + \pi i f(a) \qquad \text{as } \delta \to 0^+. \end{align*}
This proves the first part of the desired equality. The second part can be proved in a similar manner.
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}