MathGroup Archive 2003

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

Search the Archive

Re: Problem with Sum

  • To: mathgroup at smc.vnet.net
  • Subject: [mg44045] Re: Problem with Sum
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Sun, 19 Oct 2003 01:10:40 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Actually the explanation seems rather simple and essentially agrees 
with my hypothesis. Observe:


Sum[(-1)^m*(DiscreteDelta[1 - 2*m] -
     2*DiscreteDelta[3*m + 1]), {m, -a, a}]


2*(-1)^(2/3)*UnitStep[-(1/3) + a]*UnitStep[1/3 + a] +
   I*UnitStep[-(1/2) + a]*UnitStep[1/2 + a]


In[76]:=
% /. a -> 3

Out[76]=
I + 2*(-1)^(2/3)

On the other hand

Sum[(-1)^m*(DiscreteDelta[1 - 2*m] -
     2*DiscreteDelta[3*m + 1]), {m, -3, 3}]

0

What this means is that in order to obtain an answer for "general" 
limits Mathematica treats m as essentially a continuous variable. When 
you evaluate an infinite sum it is this "continuous" formula that is 
used. On the other hand, when you evaluate sum with finite limits m is 
assumed to take only integer values. This certainly gives the 
impression of inconsistency. On the other hand, there are certainly 
many cases when a "general formula" for arbitrary limits can only be 
given by using this kind of approach. Still, it would be better if we 
were able to specify (perhaps by means of an option) if we wish the 
first interpretation (which basically treats summation as integration) 
or the second one, which sums over integer values of m in the usual 
way, to be used.

Andrzej Kozlowski
Yokohama, Japan
http://www.mimuw.edu.pl/~akoz/
http://platon.c.u-tokyo.ac.jp/andrzej/



On Saturday, October 18, 2003, at 04:12 PM, Andrzej Kozlowski wrote:

> On Friday, October 17, 2003, at 06:14 PM, Mariusz Jankowski wrote:
>
>> Hello, can someone explain the following result:
>>
>> Sum[(-1)^m * (DiscreteDelta[1 - 2*m] - 2*DiscreteDelta[1 + 3*m]), {m,
>> -Infinity, Infinity}]
>>
>> gives I + 2 (-1)^(2/3)
>>
>> Shouldn't the sum evaluate to zero, since for any value of m the
>> summand is identically zero. Note that
>>
>> Sum[(-1)^m * (DiscreteDelta[1 - 2*m] - 2*DiscreteDelta[1 + 3*m]), {m,
>> -10, 10}] returns 0, as expected.
>>
>> This looks like a bug, is it?
>>
>> Thanks, Mariusz
>>
>>
>>
>>
> Hello Mariusz,
>
> It is difficult to say if such things should be considered bugs or not,
> since the answer does have a sensible interpretation. It is possible to
> interpret
>
> In[1]:=
> Sum[(-1)^m*(DiscreteDelta[1 - 2*m] -
>      2*DiscreteDelta[3*m + 1]), {m, -Infinity, Infinity}]
>
> Out[1]=
> I + 2*(-1)^(2/3)
>
>
> as meaning the same as:
>
> In[2]:=
> Integrate[(-1)^x*(DiracDelta[x - 1/2] -
>      2*DiracDelta[x + 1/3]), {x, -Infinity, Infinity}]
>
> Out[2]=
> I + 2*(-1)^(2/3)
>
> Of course if this is indeed what is done one would expect it to be
> documented somewhere!
>
>
> Andrzej Kozlowski
> Yokohama, Japan
> http://www.mimuw.edu.pl/~akoz/
> http://platon.c.u-tokyo.ac.jp/andrzej/
>
>
>


  • Prev by Date: Re: Can someone tell me why NDso
  • Next by Date: Re: recode procedural algorithm to faster functional module
  • Previous by thread: RE: RE: Problem with Sum
  • Next by thread: Nonlinear PDE fitting to Data