Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

If I type

Sum[f[x],{x,m,Infinity}]-Sum[f[x],{x,m+3,Infinity}]

I would like Mathematica to return something like

Sum[f[x],{x,m,m+2}]

or maybe

f[m]+f[m+1]+f[m+2]

But it doesn't seem to want to do this (maybe because it's worried that the difference makes no sense if the sums don't converge?). Is there a simple way to let Mathematica know I would like it to make this kind of simplification?

share|improve this question
    
A dirty way :ClearAll[s]; s /: s[f[x], {x, a_, b_}] - s[f[x], {x, c_, b_}] := s[f[x], {x, c + 1, a}]; simp[x_] := (x /. Sum -> s /. s -> Sum); simp[Sum[f[x], {x, m + 3, Infinity}] - Sum[f[x], {x, m, Infinity}]] –  belisarius Mar 2 at 22:58
    
Don't you want -Sum[f[x], {x, m, m+2}] instead? –  Rahul Narain Mar 3 at 1:32
    
@RahulNarain: Indeed. I changed the example midway through posting and failed to change the second line. Going back to fix this now. –  WillO Mar 3 at 4:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.