TITLE: How to prove a closed expression for $\int_0^{\infty } \left(\frac{1-e^{-q}}{q}\right)^n \, dq$?
QUESTION [5 upvotes]: Recently, in the context of https://math.stackexchange.com/a/3392284/198592 , I stumbled over the integral
$$f(n) = \int_0^{\infty } \left(\frac{1-e^{-q}}{q}\right)^n \, dq\tag{1}$$
and wanted to find a closed expession for it.
The integral is convergent $n\gt 1$. Indeed, close to $q=0$ the integrand behaves as $1-\frac{q}{2}+\frac{q^2}{6}+O(q^3)$ so that there is no songularity there. For $q\to \infty$ the integrand becomes $\frac{1}{q^n}$. Hence the integral in convergent under the conditions stated.
Here we confine ourselves to the case of integer powers, i.e. $n=2, 3, ...$.
The first few values can be easily calculated
$$f(n=2..5) = \left\{\log (4),\log \left(\frac{81 \sqrt{3}}{64}\right),\frac{88 \log (2)}{3}-18 \log (3),\frac{5}{24} (-544 \log (2)+162 \log (3)+125 \log (5))\right\}\tag{2}$$
A general formula seemed hard to guess from these cases. 
Alternatively, a direct attack on the integral seems to suffer from the singular negative power of $q$ after a binomial expansion of the integrand.
I suggest you try for yourself to find it.
Here is my result
$$f(n) = \frac{1}{(n-1)!}\sum _{k=1}^n (-1)^{k+n} k^{n-1} \log (k) \binom{n}{k}\tag{3}$$
I did not know it in advance. For instance I haven't found it in Gradshteiyn/Ryshik. (EDIT After finishing the OP I found that 3.411.19 is related).
But now we have it it should not be difficult for the reader to prove it.

REPLY [5 votes]: You may use integration by parts and the Laplace transform/Frullani's theorem. For instance, in the $n=2$ case we have
$$ \int_{0}^{+\infty}\left(\frac{1-e^{-x}}{x}\right)^2\,dx \stackrel{\text{Binomial}}{=} \int_{0}^{+\infty}\frac{1-2e^{-x}+e^{-2x}}{x^2}\,dx \stackrel{\text{IBP}}{=}2\int_{0}^{+\infty}\frac{e^{-x}-e^{-2x}}{x}\,dx = 2\log(2) $$
while in general (I hope not to mess signs here)
$$\begin{eqnarray*}\int_{0}^{+\infty}\left(\frac{1-e^{-x}}{x}\right)^n&=&\int_{0}^{+\infty}\sum_{k=0}^{n}\binom{n}{k}(-1)^k e^{-kx}\frac{dx}{x^n}\\&=&\frac{(-1)^{n-1}}{(n-1)!}\int_{0}^{+\infty}\sum_{k=1}^{n}\binom{n}{k}(-1)^k k^{n-1}e^{-kx}\frac{dx}{x}\\&=&\frac{(-1)^{n-1}}{(n-1)!}\int_{0}^{+\infty}\sum_{k=1}^{n}\binom{n}{k}(-1)^k k^{n-1}\frac{ds}{k+s}\end{eqnarray*} $$
by using $\int_{0}^{+\infty}f(x)\frac{dx}{x}=\int_{0}^{+\infty}(\mathcal{L}f)(s)\,ds$. Of course $\sum_{k=1}^{n}\binom{n}{k}(-1)^k k^{n-1}=0$ (which follows by applying $n$ times the forward difference operator to the polynomial $x^{n-1}$) ensures the convergence of the last integral and provides the following closed form:
$$\int_{0}^{+\infty}\left(\frac{1-e^{-x}}{x}\right)^n\,dx= \frac{(-1)^n}{(n-1)!}\sum_{k=1}^{n}\binom{n}{k}(-1)^k k^{n-1}\log(k).$$