Re: Wrong Limit

*To*: mathgroup at smc.vnet.net*Subject*: [mg47843] Re: Wrong Limit*From*: "David W. Cantrell" <DWCantrell at sigmaxi.org>*Date*: Wed, 28 Apr 2004 06:56:41 -0400 (EDT)*References*: <200404260641.CAA06357@smc.vnet.net> <c6l76k$ikg$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Andrzej Kozlowski <akoz at mimuw.edu.pl> wrote: > First of all, Mathematica 5.0 gives: > > Sum[1/k^p, {k, 1, Infinity}] > > Zeta[p] > > which is correct so there is no real need to take any limits. Still, > your observation seems to reveal a bug in Mathematica 5.0. which may be > related to one that was already discussed here recently. I see at the end of your post that you demonstrate a bug in getting Limit[PolyGamma... If that was the bug discussed here recently, I seem to have overlooked that thread. But in any event, Ray's observation also reveals a bug in getting Limit[HarmonicNumber... Note first that we have, correctly, In[1]:= HarmonicNumber[Infinity, 3] Out[1]= Zeta[3] but then, incorrectly, In[2]:= Limit[HarmonicNumber[n, 3], n -> Infinity] Out[2]= Infinity Perhaps the Limit[PolyGamma... bug and the Limit[HarmonicNumber... bug are related. I don't know. David Cantrell > First, look at this: > > Sum[1/k^3,{k,1,m}] > > HarmonicNumber[m, 3] + PolyGamma[2, 1]/2 + Zeta[3] > > This looks strange, but in fact is correct since: > > FullSimplify[PolyGamma[2,1]/2+Zeta[3]] > > 0 > > Now > > FullSimplify[Sum[1/k^3,{k,1,m}]] > > PolyGamma[2, 1 + m]/2 + Zeta[3] > > This is still correct: > > PolyGamma[2,1+m]/2==HarmonicNumber[m,3]+PolyGamma[2,1]/2//FullSimplify > > True > > However, it tells us that Limit[PolyGamma[2, 1 + m]/2,m->Infinity] > ought to be zero, while Mathematica gives: > > Limit[PolyGamma[2,1+m]/2,m->Infinity] > > Infinity > > Andrzej Kozlowski > Chiba, Japan > http://www.mimuw.edu.pl/~akoz/ > > On 26 Apr 2004, at 15:41, Ray wrote: > > > In Mathematica 4.2, if s[n_]:= Sum[1/k^p,{k,1,n}], then the output for > > Limit[s[n],n->Infinity] was Limit[HarmonicNumber[n,p],n->Infinity]. > > Under 5.0.1, the answer to Limit[s[n],n->Infinity] is given incorrectly > > as Infinity for odd p and the actual numerical value for even p. Anyone > > know why Mathematica now gives an incorrect result here for odd p.

**References**:**Wrong Limit***From:*Ray <rayfg@optonline.net>