1
$\begingroup$

How to integrate $\frac{1}{x\,(x+1)\cdots(x+n)}$ has been closed. Should it be reopened, this should be merged with it. Having spent some time writing up this answer, just to have it closed shortly before I posted an answer, was irritating, since I have a lot of other stuff to get on with .

How do you get Mathematica to evaluate the following integral?:

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

or

Integrate[1/Product[x + k, {k, 0, n}], {x, 1, Infinity}, 
 Assumptions -> n ∈ Integers && n >= 1]

which return in V11.1

Integrate[1/(x Pochhammer[1 + x, n]), {x, 1, ∞}]
$\endgroup$
2
$\begingroup$

In my comments to How to integrate $\frac{1}{x\,(x+1)\cdots(x+n)}$, in which it was unclear whether the question was a mathematics question or a Mathematica question, I gave a number of hints how to approach the problem. Since the mathematical question has been answered, I would like to present my way of doing it in Mathematica.

First, use the "well-known identity" (see, e.g. Knuth, ex. 48, sect. 1.2.6, The Art of Computer Programming: Fundamental algorithms, Wikipedia, or, for a spoiler, MSE 715706)

1/(x Pochhammer[1 + x, n]) == Sum[((-1)^k Binomial[n, k])/n!/(x + k), {k, 0, n}] //
  FullSimplify
(* True  *)

The antiderivative is clearly

ad = Sum[((-1)^k Binomial[n, k])/n! Log@(x + k), {k, 0, n}]

Now evaluate at limits (I used Series to find the limit at infinity):

upper = Simplify[Normal@Series[ad, {x, Infinity, 0}], 
  Assumptions -> n >= 1 && n ∈ Integers]
(*  0  *)

lower = ad /. x -> 1;
upper - lower
(*  -Sum[((-1)^k*Binomial[n, k]*Log[1 + k])/n!, {k, 0, n}]  *)

If you want to use the extra checking of Limit, then we need to add the assumption that x is real:

Assuming[n >= 1 && n ∈ Integers && x ∈ Reals,
 upper = Limit[ad, x -> Infinity]]
(*  0  *)
| improve this answer | |
$\endgroup$
0
$\begingroup$

Technical remark

Due to the unexpected closure of the original question I moved my answer from there to here.

My answer

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 the equivalence as follows

And @@ Table[hh[n] == h[n], {n, 1, 10}]

(* Out[89]= True *)
| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.