Today I noticed something weird concerning implicit sums. Apparently, Mathematica cannot recognize dummy indices as such and simplify accordingly. Consider:
Sum[Subscript[a, n],{n,1,q}]-Sum[Subscript[a, m],{m,1,q}]//FullSimplify
Obviously, the indices m and n are just labels and should not change the result. Yet the FullSimplify command does not yield zero. At some point I thought the program might be stuck because the nature of q is not clear. So I tried:
Sum[Subscript[a, n],{n,1,q},Assumptions->(q\[Element]Integers)]-Sum[Subscript[a, m],{m,1,q},Assumptions->(q\[Element]Integers)]//FullSimplify
This did not improve the situation. It appears to me that Mathematica should be able to recognize a dummy label in sums and simplify accordingly. Is there some function I am missing that facilitates that? Thanks for any help or suggestion!
EDIT:
As a more advanced example involving more than one summation index, consider the following:
Sum[2 Subscript[a,n] Subscript[b,m]-Subscript[a,m] Subscript[b,n],{n, 1, q},{m, 1, q}]//FullSimplify
Interestingly, if the factor of 2 is removed, the simplification occurs appropriately, but with the factor the result appears non-simplified.
Sum) they will subtracted to 0. – ybeltukov Oct 14 '14 at 21:39ReplaceAll:Sum[Subscript[a, n], {n, 1, q}] - Sum[Subscript[a, m], {m, 1, q}] /. m -> ngives0– Bob Hanlon Oct 14 '14 at 21:41