MathGroup Archive 2010

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

Search the Archive

Re: A Bug in symbolic summation?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113175] Re: A Bug in symbolic summation?
  • From: Valeri Astanoff <astanoff at gmail.com>
  • Date: Sat, 16 Oct 2010 13:13:03 -0400 (EDT)
  • References: <i95tkd$65u$1@smc.vnet.net>

On 14 oct, 05:32, Fancy Airex <aoi... at gmail.com> wrote:
> I wish to do a basic symbolic manipulation of two summations.
>
> >      Sum[f[i], {i, 0, m}] - Sum[f[i], {i, 0, j}]
>
> but can't get the expected result
>
> >    Sum[f[i], {i, j+1, m}]
>
> I also tried
>
> >    Sum[f[i], {i, 0, m}] - f[0]
>
> but can't get the expected result
>
> >    Sum[f[i], {i, 1, m}]
>
> Though when I replace m with any definite number everything works
> fine.
>
> It seems that Mathematica can't change the minimum/maximum value of
> the summation variable i above in symbolic calculation...
>
> I also tried another system, but failed to do such symbolic computation.
>
> Did I miss any point here?
>
> Best,
> Rex

My suggestion :

In[1]:= myCombine[Sum[a_, {i_, i1_, i2_}] - Sum[a_, {i_, j1_,
j2_}]] :=
  Sum[a, {i, Min[i1, j1], Max[i1, j1] - 1}] +
  Sum[a, {i, Min[i2, j2] + 1, Max[i2, j2]}]


In[2]:= s = Sum[f[i], {i, 0, m}] - Sum[f[i], {i, 0, j}] ;

In[3]:= s // myCombine

Out[3]= Sum[f[i], {i, 1 + Min[j, m], Max[j, m]}]


In[4]:= % // Simplify[#, m > j] &

Out[4]= Sum[f[i], {i, 1 + j, m}]

--
Valeri Astanoff


  • Prev by Date: Library Archive webpage
  • Next by Date: Re: Pi vs its decimal approximation
  • Previous by thread: Re: A Bug in symbolic summation?
  • Next by thread: Re: Simplifying Logs