MathGroup Archive 2010

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

Search the Archive

Re: Why this can't be reduced by mathematica?!

  • To: mathgroup at smc.vnet.net
  • Subject: [mg114150] Re: Why this can't be reduced by mathematica?!
  • From: Valeri Astanoff <astanoff at gmail.com>
  • Date: Thu, 25 Nov 2010 05:58:02 -0500 (EST)
  • References: <iciul1$leo$1@smc.vnet.net>

On Nov 24, 12:58 pm, olfa <olfa.mra... at yahoo.fr> wrote:
> Hi Mathematica Community,
>
> Reduce[s==Sum[a[index], {index, i + 1, N}] - Sum[a[index], {index, j =
+
> 1, N}] &&
> j >= i,{s}]
>
> the output should be s==Sum[a[index], {index, i+1, j }]
>
> but it is not!
> Thank you.

Good day,

You can do it this way :

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[a[index], {index, i + 1, n}] - Sum[a[index], {index, j
+ 1, n}];

In[3]:= s // myCombine // Simplify[#, j >= i] &

Out[3]= Sum[a[index], {index, 1 + i, j}]

--
Valeri


  • Prev by Date: Efficient search for bounding list elements
  • Next by Date: Why does this pattern fail to match?
  • Previous by thread: Why this can't be reduced by mathematica?!
  • Next by thread: Re: Why this can't be reduced by mathematica?!