MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: A limit bug

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84518] Re: [mg84511] A limit bug
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Tue, 1 Jan 2008 03:28:17 -0500 (EST)
  • References: <200801010216.VAA08134@smc.vnet.net>

On 1 Jan 2008, at 11:16, David W.Cantrell wrote:

> A recent question in sci.math led to something which should also  
> interest
> this group.
>
> The OP asked about the limit of (p + q)!/(p! q!) as both p and q  
> increase
> without bound. And he said later
>
>> I wasn't sure about it because Mathematica gives me a limit of zero.
>> Isn't that strange?
>
> I responded as follows.
>
> ----------------------------------------------
>
> Well, it's a bug. I suppose that what you did in Mathematica was  
> something
> like
>
> In[3]:= Limit[Limit[(p + q)!/(p! q!), q -> Infinity], p -> Infinity]
>
> Out[3]= 0
>
> But note that there is not any way -- well, at least none known to  
> me -- in
> Mathematica to get a true general "two-variable" limit:
>
> limit f(x,y) as (x,y) -> (x0,y0)
>
> However, Mathematica can get a correct answer for your limit problem.
>
> First, realize that (p + q)!/(p! q!) is Multinomial[p, q]. So you  
> might try
>
> In[5]:= Limit[Limit[Multinomial[p, q], q -> Infinity], p -> Infinity]
>
> Out[5]= Limit[Limit[Multinomial[p, q], q -> Infinity], p -> Infinity]
>
> Since that remains unevaluated (but at least there was now no bug!),  
> you
> might consider the possibility that it remained unevaluated for a good
> reason, namely, because a little more information had to be provided:
>
> In[6]:= Limit[Limit[Multinomial[p, q], q -> Infinity, Assumptions ->  
> p > 1],
> p -> Infinity]
>
> Out[6]= Infinity
>
> Success! Happy New Year!
>
> But BTW, note that, curiously, the following fails:
>
> In[7]:= Limit[Limit[(p + q)!/(p! q!), q -> Infinity, Assumptions ->  
> p > 1],
> p -> Infinity]
>
> Out[7]= Indeterminate
>
> David
>

I think using iterated limits above actually obscures what happens. In  
fact:

Limit[Multinomial[p, q], q -> Infinity,
    Assumptions -> p > 1]
Infinity

Thus there is not much point in further taking limits as p->Infinity,  
since the answer, being independent of p will certainly not change. On  
the other hand

Limit[(p + q)!/(p!*q!), q -> Infinity, Assumptions -> p > 1]
Infinity/p!

We can now see what happened here and the source of the problem.  
Mathematica simply computed
Limit[(p + q)!/q!, q -> Infinity, Assumptions -> p > 1]
Infinity

and then divided the answer by p! returning Infinity/p! since  
Mathematica leaves Infinity/a unevaluated for an undefined symbol a.  
Now, of course taking the limit with respect to p as p->Infinity will  
quite correctly produce Indeterminate. I would not call this a bug but  
rather a bit of a design problem.

On a related note; although I think Mathematica is right to leave  
unevaluated expressions such as Infinity/a, I would prefer it to  
return Infinity in the example below:

  Assuming[Element[a, Reals] && a != 0,
    Simplify[Infinity/a]]

Andrzej Kozlowski















  • Prev by Date: Re: small init.m problem
  • Next by Date: Re: small init.m problem
  • Previous by thread: Re: small init.m problem
  • Next by thread: Re: A limit bug