Re: Problem with a sum
- To: mathgroup at smc.vnet.net
- Subject: [mg53893] Re: Problem with a sum
- From: Maxim <ab_def at prontomail.com>
- Date: Wed, 2 Feb 2005 06:25:56 -0500 (EST)
- References: <ctniaq$evd$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
On Tue, 1 Feb 2005 09:32:10 +0000 (UTC), <ncc1701zzz at hotmail.com> wrote: > Hello. > > I would like to ask you a question about a sum in a problem I have > found in Mathematica 5.1. > > The sum is the following: > > Sum[(k^2 - (1/2))/(k^4 + (1/4)), {k, 1, 1000}] > > I have no problems with the sum in that form, but the following one > doesn't work: > > > s=Sum[(k^2 - (1/2))/(k^4 + (1/4)), {k, 1, m}] > s /. m->1000 > > > It gives a long result with hypergeometric functions. Also, it cannot > be converted to a number with N[], due to some kind of ComplexInfinity > problem. FullSimplify doesn't help, neither. > > > > Also, if I evaluate it to Infinity, I cannot get the value symbolically > nor numerically, except if I use NSum[], that gives me the right > result, 1. > > I don't know if I'm doing something wrong, it is a bug, a limitation or > whatever. > > > Thanks a lot for your help. > > Best regards. > > Here's what I get in version 5.1: In[1]:= s=Sum[(k^2 - (1/2))/(k^4 + (1/4)), {k, 1, m}] Out[1]= (1 + m)/((-1 - (1 - I)*m)*(1 + (1 + I)*m)) + HypergeometricPFQ[{1/2 - I/2, 1/2 + I/2, 2}, {3/2 - I/2, 3/2 + I/2}, 1] - HypergeometricPFQ[{3/2 - I/2, 3/2 + I/2, 2}, {5/2 - I/2, 5/2 + I/2}, 1]/5 - HypergeometricPFQ[{2, (3/2 - I/2) + m, (3/2 + I/2) + m}, {(5/2 - I/2) + m, (5/2 + I/2) + m}, 1]/(5 + 6*m + 2*m^2) + HypergeometricPFQ[{2, (5/2 - I/2) + m, (5/2 + I/2) + m}, {(7/2 - I/2) + m, (7/2 + I/2) + m}, 1]/(13 + 10*m + 2*m^2) + RootSum[5 + 16*#1 + 24*#1^2 + 16*#1^3 + 4*#1^4 & , PolyGamma[0, -#1]/(1 + 3*#1 + 3*#1^2 + #1^3) & ]/8 - RootSum[5 + 16*m + 24*m^2 + 16*m^3 + 4*m^4 + 16*#1 + 48*m*#1 + 48*m^2*#1 + 16*m^3*#1 + 24*#1^2 + 48*m*#1^2 + 24*m^2*#1^2 + 16*#1^3 + 16*m*#1^3 + 4*#1^4 &, PolyGamma[0, -#1]/(1 + 3*m + 3*m^2 + m^3 + 3*#1 + 6*m*#1 + 3*m^2*#1 + 3*#1^2 + 3*m*#1^2 + #1^3) & ]/8 Mathematica's answer is wrong because HypergeometricPFQ[{1/2 - I/2, 1/2 + I/2, 2}, {3/2 - I/2, 3/2 + I/2}, 1] is equal to Infinity and we have an indeterminate expression of the form Infinity - Infinity. However, in this case we can obtain the correct answer by replacing HypergeometricPFQ[..., 1] with HypergeometricPFQ[..., z] and taking the limit at 1. Mathematica is unable to compute this limit as well (it will return DirectedInfinity[0]), but here is a way to make it work: In[2]:= Limit[s /. HypergeometricPFQ[La_, Lb_, 1] :> Series[HypergeometricPFQ[La, Lb, z], {z, 1, 0}] // Normal, z -> 1, Direction -> 1] Out[2]= (2*m^2)/(1 + 2*m + 2*m^2) You can verify that it gives the correct result for m = 1000 and also for m tending to Infinity. Also the problem can be solved by breaking the summand in two terms: In[3]:= Sum[#, {k, m}]& /@ Apart[(k^2 - 1/2)/(k^4 + 1/4)] // FullSimplify Out[3]= (2*m^2)/(1 + 2*m*(1 + m)) Maxim Rytin m.r at inbox.ru