A closed form for: $\int_{0}^{\infty} \frac{1}{(x-\log x)^2}dx$

This is not an answer.

Interesting is $$\int_1^{\infty} \frac{dx}{(x-\log x)^2}=\sum _{n=1}^{\infty }\frac {n!} {n^n}$$ which does converge very fast.

Consider the partial sums $$S_p=\sum _{n=1}^{p }\frac {n!} {n^n}$$ For $50$ significant figures, some numbers $$\left( \begin{array}{cc} p & S_p \\ 10 & \color{red} {1.879}6270159950810984897034709192993117315185196423 \\ 20 & \color{red} {1.8798538}481559257260270045400130469482147900930324 \\ 30 & \color{red} {1.87985386217}44894409103304424245491837451422243904 \\ 40 & \color{red} {1.879853862175258}4934447274819840727420511215490319 \\ 50 & \color{red} {1.87985386217525853348}42821765377141403748180799027 \\ 60 & \color{red} {1.879853862175258533486306}0446953416699479277057812 \\ 70 & \color{red} {1.879853862175258533486306145}0660477978008661226702 \\ 80 & \color{red} {1.8798538621752585334863061450709}598007686986116986 \\ 90 & \color{red} {1.8798538621752585334863061450709600388}084239015953 \\ 100 & \color{red} {1.87985386217525853348630614507096003881987}28530863 \\ \cdots & \cdots \\ \infty &\color{red} {1.8798538621752585334863061450709600388198734004893} \end{array} \right)$$

Edit

After comments, it seems that I found another one which is amazing $$\int_{1}^{\infty} \frac{dx}{(x-\log x)^3}=\frac 12\left(\sum _{n=1}^{\infty }\frac {n!} {n^{n-1}}-1\right)$$

Update

After @JJacquelin's answer, considering (for $p> 1 \:,\: p \text{ integer.}$) $$I_p=\int_1^\infty \frac{dx}{(x-\ln(x))^p}=\frac{1}{(p-1)!}\sum_{n=p-1}^\infty \frac{n!}{n^{n-p+2}}$$ write $$\sum_{n=p-1}^\infty \frac{n!}{n^{n-p+2}}=\sum_{n=p-1}^k \frac{n!}{n^{n-p+2}}+\sum_{n=k+1}^\infty \frac{n!}{n^{n-p+2}}$$ and, for the second sum, use the simplest form of Stirling approximation to get $$\sum_{n=k+1}^\infty \frac{n!}{n^{n-p+2}} \sim \sqrt{2 \pi }\, e^{-(k+1)}\, \Phi \left(\frac{1}{e},\frac{3-2p}{2},k+1\right)$$ where appears the Hurwitz-Lerch transcendent function.

This provide quite good estimates of the result. Below are given the values for a few $p$'s using $k=p+10$. $$\left( \begin{array}{ccc} p & \text{approximation} & \text{"exact"} \\ 2 & 1.879853659 & 1.879853862 \\ 3 & 1.201509078 & 1.201509604 \\ 4 & 0.935374084 & 0.935375123 \\ 5 & 0.786369570 & 0.786371320 \\ 6 & 0.688798359 & 0.688800999 \\ 7 & 0.618921197 & 0.618924881 \\ 8 & 0.565877612 & 0.565882462 \\ 9 & 0.523929461 & 0.523935568 \\ 10 & 0.489732430 & 0.489739855 \end{array} \right)$$


A more general relationship :

$$\int_1^\infty \frac{dx}{(x-\ln(x))^p}=\sum_{k=0}^\infty \frac{(p+k-1)!}{(p-1)!\:(k+p-1)^{k+1}}\qquad p> 1 \:,\: p \text{ integer.}$$

This could be extended to real $p>1$ thanks to the function $\Gamma$.

Or, on an equivalent form : $$\int_1^\infty \frac{dx}{(x-\ln(x))^p}=\frac{1}{(p-1)!}\sum_{n=p-1}^\infty \frac{n!}{n^{n-p+2}}\qquad p> 1 \:,\: p \text{ integer.}$$

From this it is easy to find the already known cases $p=2$ and $p=3$.

Then other cases, for example : $$\int_1^\infty \frac{dx}{(x-\ln(x))^4}=\frac{1}{6}\sum_{n=3}^\infty \frac{n!}{n^{n-2}}$$

I let you the pleasure to prove the above formulas.

This is not too difficult in expending $\frac{1}{(1-t)^p}$ to series of powers of $t$ with $t=\frac{\ln(x)}{x}$ and knowing that $\int_1^\infty\frac{(\ln(x))^k}{x^{p+k}}dx=\frac{k!}{(k+p-1)^{k+1}}$.


Long comment:

Following the original comment by @automaticallyGenerated it is astounding that $$I=\int_0^{\infty } \frac{1}{(x-\log (x))^p} \, dx= \frac{ 1}{\Gamma(p)} {\int_0^{\infty } \frac{\Gamma(x+1)}{x^{x-p+2}} \, dx}$$ seems to hold true for all real $p>1$. Since two entirely different functions are being integrated, it seems likely that the equality only holds when these bounds are used.

The second integral appears little help in understanding the first integral (the OP's integal). It doesn't appear to be amenable to substitution and all I found a way of expressing the second integral in terms of the incomplete Gamma function and generalized Laguerre polynomials $L_n^{(a)}(x)$ which doesn't seem to lead anywhere. (see https://en.wikipedia.org/wiki/Gamma_function )

$$\frac{ 1}{\Gamma(p)} {\int_0^{\infty } \frac{\Gamma(x+1)}{x^{x-p+2}} \, dx}=\frac{1}{\Gamma (p)}\int_0^{\infty } \frac{e^{-x} \Gamma (x+1) }{ \Gamma (x-p+2,x)} \sum _{n=0}^{\infty } \frac{ L_n^{(x-p+2)}(x) }{n+1}\, dx$$

In regard to the first integral above (the OP's integral). As has been shown this integral appears to split naturally into two halves $I_1$ and $I_2$. This is clearly shown by graphing the function $\frac{e^{1/y}}{\left(y \,e^{1/y} -1\right)^2}$, derived from the original function simply by substitutions.

Function produced via substitution

In the case of the new function $$I_1=\int_0^{\infty} \frac{e^{1/y}}{\left(y e^{1/y}-1\right)^2} \, dy\approx1.8798538622$$ $$I_2=\int_{-\infty}^0 \frac{e^{1/y}}{\left(y e^{1/y}-1\right)^2} \, dy\approx0.6380638008$$

as expected.

Most of the observations made so far have been directed to the first integral and its generalization to values of $p$ different to 2. I just note that $p$ can take any real value greater than $1$. Therefore the most general result for $I_1$ is

$$I_1=\int_1^{\infty } \frac{1}{(x-\log (x))^p} \, dx=\frac{ 1 }{\Gamma (p)} \sum _{n=1}^{\infty } \frac{\Gamma (n+p-1)}{(n+p-2)^n}$$

I shall make one further comment on the second integral.

It can be transformed as follows:

$$I_2=\int_0^{1 } \frac{1}{(x-\log (x))^p} \, dx=\int_{0}^{1 } \frac{1}{(1-x-\log (1-x))^p} \, dx$$

and rearranged $$I_2=\int_{0}^{1 } \frac{1}{(1-x)^2\left(1-\frac{\log (1-x)}{1-x}\right)^p} \, dx$$

The function $\left(1-\frac{\log (1-x)}{1-x}\right)$ has a reasonably simple infinite series expansion that is $$\left(1-\frac{\log (1-x)}{1-x}\right)=1+\sum_{k=0}^{\infty} \frac{\left| S_{k+1}^{(2)}\right| }{k!}x^k \approx 1+x+\frac{3 x^2}{2}+\frac{11 x^3}{6}+\frac{25 x^4}{12}+\frac{137 x^5}{60}+... $$

where $S_{n}^{(m)}$ are Sterling Numbers of the First Kind.

The infinite series expansion for the function $\frac{1}{(1-x-\log (1-x))^p}$ is not nearly quite so simple.


Update 1

I've become fascinated by the integral in question. In regard to roughly the function studied by @YuriyS I've spotted something else interesting, i.e.

$$I=\int_{-\infty}^\infty \frac{e^{-y} dy}{(e^{-y}+y)^2}$$

It is a slightly asymmetric function graphed here enter image description here

Numerically the $x$ value at which the curve peaks is $x\approx-0.4428544010$ which appears to the same as the decimal expansion of $x$ satisfying $x+2=exp(-x)$ (see https://oeis.org/A202322). I found the two numbers are the same to greater than 60 decimal places.


Update 2

I've managed to find a method of approximating $I_2$ with a series involving positive integer Logs, but amazingly not all integers, so far just the primes...

$$I_2\approx1+\left(\frac{-179592269512107561470980928 \log (2)-5712818723588970397783260 \log (3)+22992687372688767118775650 \log (5)-28209036610545300456578590 \log (7)+13 (677084947758213086002625 \log (11)+1829504980586239604457134 \log (13)+4782965 (286391006085468616 \log (17)+87040663716649545 \log (19))+3622722200873719994750 \log (23))}{4375992416738342400000}\right) $$

Hope recedes even further that the $I_2$ part of the integral has a closed form. Run out of time now, so will provide a further update later if I can make any sense of this.

Update 3

I should clarify that the surprise here is not log's of integers can be split into log's of their component primes, it is that highest log prime is related to the originating number of terms in the approximation (in the above case 25) and all the log primes below the highest are also present in the approximation.

This above observed property is connected to integrals of the form

$$a_n\int_0^1 x^n\,\text{li}(1-x) \, dx\tag{1}$$

where $\text{li}(x)$ is the logarithmic integral and $n$ is roughly the number of terms in the approximation.

The "order n" integral terms (1) arise from series approximations to the following integral for $I_2$ $$I_2=1+\int_0^1 \frac{ \left(2 \left(\frac{1}{\log (1-x)}-\frac{1}{\log ^2(1-x)}\right)\right)} {\left( \frac{1-x}{\log (1-x)}-1\right)^3} \, \text{li}(1-x) \, dx$$

This link to this problem to the integral of logarithmic integral over the interval $[0,1]$ was found using Mathematica and is at this time remains conjectural.

Update 4

It is interesting to note the integral $I_1$

$$I_1=\int_1^{\infty } \frac{1}{(x-\log (x))^p} \, dx=\frac{ 1 }{\Gamma (p)} \sum _{n=1}^{\infty } \frac{\Gamma (n+p-1)}{(n+p-2)^n}$$

appears to be one of a pair

$$\int_1^{\infty } \frac{1}{(x+\log (x))^p} \, dx=\frac{ 1 }{\Gamma (p)} \sum _{n=1}^{\infty } \frac{(-1)^{n-1}\Gamma (n+p-1)}{(n+p-2)^n}$$