TransWikia.com

What has DiscreteAsymptotic been thinking about for so long?

Mathematica Asked on May 24, 2021

The command of 12.2 (This code is related to
that question.)

DiscreteAsymptotic[RealAbs[Evaluate[Integrate[Product[x - k, {k, 1, n}], {x, 0, 1}, 
Assumptions -> n [Element] PositiveIntegers]]], n -> Infinity]

is running on my comp for hours, producing two warnings in the beginning of its execution.
This is strange in view of the instantly returned input of the command

Integrate[Product[x - k, {k, 1, n}], {x, 0, 1}, Assumptions -> n [Element] PositiveIntegers]

One Answer

I am running Mathematica version 12.3.0 for Microsoft Windows. The code

Table[Integrate[Product[x-k, {k, 1, n}], {x, 0, 1}], {n, 8}] //InputForm

returns

     {-1/2, 5/6, -9/4, 251/30, -475/12, 19087/84, -36799/24, 1070017/90}

which is correct. Using PARI/GP returns the same result.

However, the code

Timing[Integrate[Product[x - k, {k, 1, n}], {x, 0, 1}, 
   Assumptions -> n [Element] PositiveIntegers]] // InputForm // Quiet

returns

{2.234375, Integrate[((-n + x)*Pochhammer[1 - n + x, n])/x, {x, 0, 1}, 
  Assumptions -> Element[n, Integers] && n > 0]}

in less than 3 seconds. The Quiet suppresses the error message

Integrate: integral of ... does not converge on {0,1}.

This indicates that while Mathematica can integrate the finite product for any specific positive integer, it is not able to do the integration for a generic positive integer, and furthermore, complains that the integral does not converge. Of course, this is not true, but somehow Mathematica gets confused and gets it wrong. The problem seems to be that

Product[x - k, {k, 1, n}] // FullSimplify // InputForm

returns

Gamma[x]/Gamma[-n + x]

and the Gamma function has a pole at $0$ and all negative integers. Thus, for all $,xin(0,1),$ and $,ninmathbb{Z},$ the quotient of Gammas is well defined, however, this fails for $,x=0.,$ This seems to be what Mathematica is complaining about, but that is my educated guess. I do not not have any clear way around this.

Despite this, the MSE question has an answer with the value of the integral as a sum (with a needed (-1)^k).

a[n_] := Sum[(-1)^k StirlingS1[n, k]/(k + 1), {k, 0, n}];

You can test this with the code

And @@ Table[a[n] == Integrate[Product[x - k, {k, 1, n}], {x, 0, 1}], {n, 10}]

which returns True. However, DiscreteAsymptotic can't deal with a[n]. Still, the asymptotic in the MSE answer is wrong. To a first approximation, I get the result $$ (-1)^n I_n sim n!/log(n). $$

Answered by Somos on May 24, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP