Calculate $\int_0^{\infty } \left(x-\log \left(e^x-x\right)\right) \, dx$ Calculate the following integral:
$$\int_0^{\infty} \left(x-\log \left(e^x-x\right)\right) \ \mathrm{d}x.$$
For recreational purposes, I calculate several interesting integrals, and I came across this case that blocks me.
One can immediately notice that $\log \left(e^x-x\right)\sim_{+\infty} x$ (since $\lim_{x\to +\infty}\frac{x}{\log(e^x-x)}=1$). But I am unable to calculate the indefinite integral of this function or to establish the value of this improper integral in any other way.
Nevertheless, it is of course possible to calculate the result numerically ($\approx 1.15769475$) to an arbitrary precision, but I am more interested in the exact value and the method to get it.
 A: Here is a little more general solution:
Notice that your integral is equivalent to 
$$-\int_0^{+\infty} \log(1-xe^{-x})\,dx$$
Now, let
$$I(a)=-\int_0^{+\infty} \log(1-xe^{-ax})\,dx \qquad \text{ for } a\in\mathbb{R}^+ $$
Then,
\begin{align}
I'(a)&=-\int_0^{+\infty} \frac{x^2 e^{-ax}}{1-xe^{-ax}}\,dx \\ 
&=-\int_0^{+\infty} x^2 e^{-ax} \sum_{n=0}^{+\infty} e^{-anx} x^n \\ 
&=-\sum_{n=0}^{+\infty}\int_0^{+\infty} e^{-ax(n+1)} x^{2+n} \,dx \\ 
&=-\sum_{n=1}^{+\infty} \int_0^{+\infty} e^{-anx} x^{n+1}\,dx \\ 
&=-\sum_{n=1}^{+\infty} \frac{(n+1)!}{(an)^{n+2}}
\end{align}
Then
\begin{align}
I(a)&=C+\sum_{n=1}^{+\infty} \frac{1}{a^{n+1}(n+1)} \frac{(n+1)!}{n^{n+2}} \\
&=C+\sum_{n=1}^{+\infty} \frac{n!}{a^{n+1} n^{n+2}}
\end{align}
For some constant $C$.
A: \begin{align}
\int_{0}^{\infty} (x - \ln(e^{x} - x)) \ \mathrm{d}x &= \int_{0}^{\infty} (x - \ln(e^{x}) - \ln(1-x e^{-x}) ) \ \mathrm{d}x \\
&= - \int_{0}^{\infty} \ln(1 - x e^{-x}) \ \mathrm{d}x \\
&= \sum_{n=1}^{\infty} \frac{1}{n} \,  \int_{0}^{\infty} x^{n} \, e^{-n x} \ \mathrm{d}x \\
&= \sum_{n=1}^{\infty} \frac{n!}{n^{n+2}} \approx 1.15769.
\end{align}
