# How to integrate $\frac{1}{x\,(x+1)\cdots(x+n)}$

Could anyone help me to integrate this? $$\int_1^\infty\frac{dx}{x\,(x+1)\cdots(x+n)}$$

• Sum[((-1)^(k + 1) Binomial[n, k] Log[k + 1])/n!, {k, 0, n}] Commented Apr 22, 2017 at 16:52
• Integrate[1/Pochhammer[x, n + 1], {x, 1, ∞}] Commented Apr 22, 2017 at 17:58
• Use an identity: 1/(x Pochhammer[1 + x, n]) == Sum[((-1)^k Binomial[n, k])/n!/(x + k), {k, 0, n}] // FullSimplify Commented Apr 22, 2017 at 18:17
• @Kagaratsch You are right. Please see my soluton below for clarification. Commented Apr 23, 2017 at 8:44
• @Kagaratsch Yes, but take the limit at infinity together. Consider Simplify[Normal@Series[Sum[((-1)^k Binomial[n, k])/n! Log@(x + k), {k, 0, n}], {x, Infinity, 0}], Assumptions -> n >= 1 && n \[Element] Integers]. Basically, I think it's more fun to figure it out than to spoil it. :) Commented Apr 23, 2017 at 11:59

Note that e.g. for n=5

1/Pochhammer[x, 1 + n] /. n -> 5


If you want to integrate this from 1 to Infinity, you might as well shift the x variable by 1, take the Mellin Transform and send the parameter s to 1 afterwards. So that i.e. for n=1:

MellinTransform[1/Pochhammer[x + 1, 1 + n] /. n -> 1, x, s]


The Sin function in the denominator looks divergent, but luckily the numerator vanishes for s=1 as well, so that we could use l'Hôpital's rule to get a finite result. Similarly, for a couple of higher n we get:

Table[
MellinTransform[#, x, s] & /@ (1/Pochhammer[x + 1, 1 + n] // Apart) // FullSimplify
, {n, 2, 5}] // MatrixForm


Staring at the above results for a little bit, one can infer the following generalization for all n:

1/(n + 1)! (Sum[(-1)^(k + 1) Binomial[n + 1, k] k^s, {k, 1, n + 1}]) π Csc[π s]


Finally, applying l'Hôpital's rule mentioned before, we arrive at the final result:

ourIntegral[n_] := Sum[((-1)^k k Binomial[1 + n, k] Log[k])/(1 + n)!, {k, 1, n + 1}]


In other words:

$$\int_1^\infty\frac{dx}{x\,(x+1)\cdots(x+n)} = \sum_{k=1}^{n+1}\frac{(-1)^k }{(n+1)!}\binom{n+1}{k} k \ln (k)$$

And we see that the general result is indeed correct:

Table[ourIntegral[n] - Integrate[1/Pochhammer[x, 1 + n], {x, 1, Infinity}] // PowerExpand // Expand, {n, 1, 10}]


{0, 0, 0, 0, 0, 0, 0, 0, 0, 0}

• Nicely done. ${}$ Commented Apr 23, 2017 at 6:38

Trying to understand the solution given by Michael E4 in a comment.

Let the integral in question be

$$h(n) =\int_1^{\infty } f(x,n) \, dx$$

With the integrand

$$f(x,n)=\frac{1}{\prod _{k=0}^n (k+x)}$$

First we transform $f$ into the partial fraction representation

$$f_p(x,n) = \sum _{k=0}^n \frac{a(k)}{k+x}$$

where

$$a(k)=\lim_{x\to -k} \, (k+x) f(x,n)$$.

Explicitly we have

$$\frac{1}{a_k} =\lim_{x\to -k} \, x(x+1)...(x+k-1)\;(*(x+k)\; missing*)\; (x+k+1) ... (x+n)$$

and replacing $x$ by $-k$ gives

$$\frac{1}{a_k} = (-k)(-k+1)...(-1) (1)(2) ... (-k+n) \\= (-1)^k (k) (k-1) ... (1) (1)(2) ... (n-k) = (-1)^k k! (n-k)!$$

Hence

$$a_k = (-1)^k \binom{n}{k}\frac{1}{n!}$$

Now we take the $x$-integral of $f_p$

But attention ! The definite integrals of each summand are divegent ! Hence we take the indefinite intergrals (the antiderivative)

$$\int \frac{1}{k+x} \, dx=\log (k+x)$$

Which gives for the indefinite integral of $f_p$

$$g(x,n)= \sum _{k=0}^n (-1)^k \binom{n}{k} \log (k+x)\frac{1}{n!}$$

Now, luckily, the $\lim g({x\to \infty})$ is zero so that we are left with the integrals at the lower border $x = 1$ giving finally (notice the additional minus sign)

$$h(n)= \frac{1}{n!}\sum _{k=0}^n (-1)^{k+1} \binom{n}{k} \log (k+1)$$

QED.

In Mathematica we would write

h0[n_] :=
Integrate[Product[1/(x + k), {k, 0, n}], {x, 1, \[Infinity]}]

h[n_] :=
1/n! Sum[(-1)^(k - 1) Binomial[n, k] Log[k + 1], {k, 0, n}]


and check equivalence thus

Table[h0[n] == h[n], {n, 1, 10}]

(* Out[89]= {True, True, True, True, True, True, True, True, True, True} *)

Integrate[1/Product[x + k,{k,0,n}],x]