Re: Hypergeometric functions and Sum error in 5.01?
- To: mathgroup at smc.vnet.net
- Subject: [mg51792] Re: Hypergeometric functions and Sum error in 5.01?
- From: "David W. Cantrell" <DWCantrell at sigmaxi.org>
- Date: Tue, 2 Nov 2004 02:05:17 -0500 (EST)
- References: <200410290738.DAA03367@smc.vnet.net> <cm21uq$gda$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
DrBob <drbob at bigfoot.com> wrote: > On Fri, 29 Oct 2004 03:38:55 -0400 (EDT), Richard Ollerton > <R.Ollerton at uws.edu.au> wrote: > > > Mathematica 5.01 produces the following: > > In[1]:= s1=Sum[Binomial[n-i,m]2^i,{i,0,n-m}] > > > > Out[1]= Gamma[1+n] Hypergeometric2F1[1,m-n,-n,2] / (Gamma[1+m] > > Gamma[1-m+n]) > > > > In[2]:= Table[{s1,Sum[Binomial[n-i,m]2^i,{i,0,n-m}]}/.n®3,{m,1,3}] I presume you mean n -> 3 (rather than n®3, which makes no sense to me). > > Out[2]= {{-5,11},{-11,5},{-15,1}} > > > > Out[2] compares Mathematica's closed form with actual values. There > > appears to be an error in the rules used by Sum when simplifying this > >expression. Richard Ollerton > > r.ollerton at uws.edu.au I haven't thought enough about your Out[2] to be able to say what is going wrong, but I doubt that it's what you think. Please consider In[3]:= Table[{s1, Sum[Binomial[n - i, m]2^i, {i, 0, n - m}]}, {m, 1, 3}, {n, 3, 3}] Out[3]= {{{11, 11}}, {{5, 5}}, {{1, 1}}} which seems to vindicate s1, at least in these three cases. > It gets worse. Much worse. > This result is undefined for n==3 (for all m, presumably): I certainly don't think of ComplexInfinity as being "undefined". But it is bizarre that Mathematica implies that ComplexInfinity is the result _regardless of m_. > s1 = Sum[Binomial[n - i, m]*2^i, {i, 0, n - m}] > % /. n -> 3 > > (Gamma[1 + n]*Hypergeometric2F1[1, m - n, -n, 2])/(Gamma[1 + m]*Gamma[1 - > m + n]) > ComplexInfinity > > That makes sense, as the Gamma function has nasty poles at zero and the > negative integers. It has nothing to do with poles of the Gamma function. Rather, it has to do with In[4]:= Hypergeometric2F1[1, m - n, -n, 2] /. n -> 3 Out[4]= ComplexInfinity But Out[4] is misleading since it makes it seem as if the result should be ComplexInfinity _regadless of m_. To see that that is not the case, consider In[5]:= Hypergeometric2F1[1, m - n, -n, 2] /. {m -> 1, n -> 3} Out[5]= 11/3 > Yet substituting 3 for n in the original expression gives (for all m, > presumably): > > Sum[Binomial[3 - i, m]*2^i, {i, 0, 3 - m}] > > 0 Bizarre! I wonder what causes that bug. > But substituting specific values for m, we have: > > Sum[Binomial[3-i,1]2^i,{i,0,3-1}] > Sum[Binomial[3-i,2]2^i,{i,0,3-2}] > Sum[Binomial[3-i,3]2^i,{i,0,3-3}] > > 11 > 5 > 1 > > So we have three wildly different values for the same thing (for n==3 and > a given value of m). > > Looking at the definition of Binomial, of course we have: > > Binomial[0, 3] == Gamma[0 + 1]/(Gamma[3 + 1]*Gamma[0 - 3 + 1]) > True > > But look at the second term in the denominator: > > Gamma[0-3+1] > > ComplexInfinity But that's probably irrelevant to Richard's problem. He dealt with Binomial[n-i,m] and his index i went from 0 to n-m. Presumably then, n >= m for him, and so the first argument of his Binomial was always at least as big as the second argument. If that is the case, we never get ComplexInfinity. David Cantrell