Solving an improper integral of a product I am trying to derive a formula for calculating the Euler-Mascheroni constant, which involves the following integral
$$\int_{0}^{\infty}\prod_{t=0}^{s}\frac{1}{(x+t+1)}dx$$
For $s\ge 1$.
My first thought was to use partial fraction decomposition with the Heaviside method.
$$\prod_{t=0}^{s}\frac{1}{(x+t+1)}=\sum_{t=0}^{s}\frac{C_t}{x+t+1}=\sum_{t=0}^{s}\left(\frac{1}{x+t+1}\prod_{w=0\\w\neq t}^{s}\frac{1}{(w-t)}\right)$$
Then, the integral becomes
$$\int_{0}^{\infty}\sum_{t=0}^{s}\left(\frac{1}{x+t+1}\prod_{w=0\\w\neq t}^{s}\frac{1}{(w-t)}\right)dx$$
However, I can't switch the integral and summation operations because then the integral diverges.
 A: Note that,
$$\prod_{t=0}^{s}\frac{1}{x+t+1}=\prod_{t=x+1}^{x+s+1}\frac{1}{t}$$
Which further simplifies to,
$$\frac{\Gamma(x)}{\Gamma(x+s+2)}$$
So we have,
$$\int_{0}^{\infty}\frac{\Gamma(x)}{\Gamma(x+s+2)}dx$$
$$\frac{1}{\Gamma(s+2)}\int_{0}^{\infty}B(x,s+2)dx$$
$$\frac{1}{\Gamma(s+2)}\int_{0}^{\infty}\int_{0}^{1}t^{x-1}(1-t)^{s+1}dt dx$$
$$\frac{1}{\Gamma(s+2)}\int_{0}^{1}\frac{(1-t)^{s}}{t}\int_{0}^{\infty}t^{x}dxdt$$
The Integral $\int_{0}^{\infty}t^{x}\mathrm{dx}$ is easy to evaluate as $0≤t≤1$.
I hope you can proceed from here as per your problem.
A: For every integer $n\ge 2$ define the function $f_n$ on $[0,\infty)$ by
$$
f_n(x)=\prod_{i=1}^{n}\frac{1}{x+i}=\sum_{i=1}^{n}\frac{c_i}{x+i}
$$
where
\begin{eqnarray}
c_k&=&\left(\prod_{i=1}^{k-1}\frac{1}{-k+i}\right)\left(\prod_{i=k+1}^{n}\frac{1}{-k+i}\right)\cr
&=&\frac{(-1)^{k-1}}{[1\cdot2\cdots(k-1)]\cdot[1\cdot2\cdots(n-k)]}\cr
&=&\frac{(-1)^{k-1}k}{k!\cdot (n-k)!}\cr
&=&\frac{(-1)^{k-1}k}{n!}{n \choose k}
\end{eqnarray}
Define
$$
a_k=(-1)^{k-1}k{n\choose k}
$$
and
$$
\sigma_k=\sum_{i=1}^k a_i
$$
Since
$$\tag{1}
(1-x)^n=\sum_{k=0}^n{n\choose k}(-x)^k
$$
Taking the derivative of (1) we have
$$\tag{2}
-n(1-x)^{n-1}=-\sum_{k=1}^nk{n\choose k}(-x)^{k-1}
$$
Setting $x=1$ in (2), we get
$$
0=-\sum_{k=1}^n(-1)^{k-1}k{n\choose k}=-\sigma_n
$$
i.e. $\sigma_n=0$.
We have
\begin{eqnarray}
n!\cdot f_n(x)&=&\sum_{i=1}^n\frac{a_i}{x+i}\cr
&=& \sigma_1\left(\frac{1}{x+1}-\frac{1}{x+2}\right)+\frac{\sigma_2}{x+2}+\sum_{i=3}^n\frac{a_i}{x+i}\cr
&\vdots&\cr
&=&\sum_{i=1}^{n-1}\sigma_i\left(\frac{1}{x+i}-\frac{1}{x+i+1}\right)+\frac{\sigma_n}{x+n}\cr
&=&\sum_{i=1}^{n-1}\sigma_i\left(\frac{1}{x+i}-\frac{1}{x+i+1}\right)
\end{eqnarray}
It follows that
\begin{eqnarray}
n!\int_0^{\infty}f_n(x)dx&=&\sum_{k=1}^{n-1}\sigma_k\ln\left(\frac{x+k}{x+k+1}\right)\Big|_0^{\infty}\cr
&=&-\sum_{k=1}^{n-1}\sigma_k\ln\left(\frac{k}{k+1}\right)\cr
&=&\sum_{k=1}^{n-1}\sigma_k\ln(k+1)-\sum_{k=1}^{n-1}\sigma_k\ln(k)\cr
&=&\sum_{k=2}^n\sigma_{k-1}\ln(k)-\sum_{k=2}^{n-1}\sigma_k\ln(k)\cr
&=&\sigma_{n-1}\ln(n)-\sum_{k=2}^{n-1}[\sigma_k-\sigma_{k-1}]\ln(k)\cr
&=&-a_n\ln(n)-\sum_{k=2}^{n-1}a_k\ln(k)\cr
&=&-\sum_{k=2}^na_k\ln(k).
\end{eqnarray}
Hence
$$
\int_0^{\infty}\prod_{k=1}^n\frac{1}{x+k}dx=\sum_{k=2}^{n}\frac{(-1)^kk{n \choose k}\ln(k)}{n!}
$$
A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\on}[1]{\operatorname{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
$\ds{\bbox[5px,#ffd]{}}$
\begin{align}
& \color{#44f}{\left.\int_{0}^{\infty}\prod_{t = 0}^{s}{1 \over x + t + 1}\,\dd x
\,\right\vert_{\, s\ \geq\ 1}} =
\int_{0}^{\infty}\pars{\sum_{t = 0}^{s}{a_{t} \over x + t + 1}}\dd x
\end{align}
\begin{align}
\mbox{where}\quad a_{t} & \equiv \lim_{x \to -t - 1}\,\,
\bracks{\pars{x + t + 1}{\Gamma\pars{x + 1} \over \Gamma\pars{x + s + 2}}}
\\[5mm] & =
-\pi\lim_{x \to -t - 1}\,\,
\bracks{{x + t + 1 \over \sin\pars{\pi x}}{1 \over \Gamma\pars{-x}\Gamma\pars{x + s + 2}}}
\\[5mm] & =
{\pars{-1}^{t} \over
t!\,\,\pars{s - t}!}.\quad
\mbox{Note that}\ \left.\sum_{t = 0}^{s}a_{t}\right\vert_{s\ \geq\ 1} = 0
\end{align}
Then,
\begin{align}
& \color{#44f}{\left.\int_{0}^{\infty}\prod_{t = 0}^{s}{1 \over x + t + 1}\,\dd x
\,\right\vert_{\, s\ \geq\ 1}} =
\lim_{\Lambda\, \to\, \infty}\ \sum_{t = 0}^{s}
a_{t}\ln\pars{\Lambda + t + 1 \over t + 1}
\\[5mm] = & \
\lim_{\Lambda\, \to\, \infty}\ \sum_{t = 0}^{s}
a_{t}\bracks{\ln\pars{\Lambda} + %
\ln\pars{1 + {t + 1 \over \Lambda}} -\ln\pars{t + 1}}
\\[5mm] = & \
\bbx{\color{#44f}{-\sum_{t = 0}^{s}\pars{-1}^{t}
{\ln\pars{t + 1} \over t!\,\,\pars{s - t}!}}}
\\ &
\end{align}
