Re: Question about yet another bug in Sum

*To*: mathgroup at smc.vnet.net*Subject*: [mg35222] Re: [mg35204] Question about yet another bug in Sum*From*: Andrzej Kozlowski <andrzej at tuins.ac.jp>*Date*: Wed, 3 Jul 2002 05:13:20 -0400 (EDT)*Sender*: owner-wri-mathgroup at wolfram.com

I am not sure what exactly you mean by "the origin of the bug" (writing code too late at night?) but I can tell you for sure that it is do do with Limit (as usual, one might add). How do I know this? Well: << Calculus`Limit` Now: In[2]:= Sum[Exp[(-I)*Pi*n]*(n/(1 + n^2)), {n, 0, Infinity}] Out[2]= (1/4)*PolyGamma[0, 1/2 - I/2] + (1/4)*PolyGamma[0, 1/2 + I/2] - (1/4)*PolyGamma[0, 1 - I/2] - (1/4)*PolyGamma[0, 1 + I/2] A nice closed for answer. We can check it agrees numerically with yours: In[3]:= N[%]//Chop Out[3]= -0.269611 In fact we can check it symbolically: In[4]:= Unevaluated[(1/4)*PolyGamma[0,1/2-I/2]+(1/4)*PolyGamma[0,1/2+I/2]-(1/4)* PolyGamma[0,1-I/2]-(1/4)*PolyGamma[0,1+I/2]==-1/2* HypergeometricPFQ[{2,1+I,1-I},{2-I,2+I},-1]]//FullSimplify Out[4]= True So life is not so bad after all. Andrzej Kozlowski Toyama International University JAPAN http://platon.c.u-tokyo.ac.jp/andrzej/ On Tuesday, July 2, 2002, at 03:11 PM, Vladimir Bondarenko wrote: > Hello. > > Mathematica is a great environment. I observe that every time before it > becomes stronger, Mathematica expeciences a collapse ;-) > Now we at this leg of its majestic trajectory... > > Here is another bug in Sum. > > $Version > > "4.2 for Microsoft Windows (February 28, 2002)" > > Sum[Exp[-I Pi n] n /(1 + n^2), {n, 0, Infinity}] > > ACTUAL: Sum::"div": "Sum does not converge." > > EXPECTED: -1/2*HypergeometricPFQ[{2, 1 + I, 1 - I}, {2 - I, 2 + I}, > -1] > > CHECK-UP: N[%, 20]//Chop > > -0.26961050270800898180 > > NSum[Exp[-I Pi n] n/(1 + n^2), {n, 0, Infinity}, > WorkingPrecision->20]//Chop > > -0.269610502708010 > > This bug is present in 4.1, 4.0, 3.0. Version 2.2 leaves the sum > unevaluated. > > > Can anyone explain the origin of the bug? > > > Best, > > Vladimir Bondarenko > > > > >