Updates:
Cc: [email protected] [email protected] [email protected] [email protected]

Comment #4 on issue 2723 by asmeurer: What should summation() do with non-integer limits?
http://code.google.com/p/sympy/issues/detail?id=2723

As Mathematica or Maple have no problems with this why should it be forbidden or not working nicely in Sympy?

Maples gives me:

sum(exp(a*x), x=-1/2..1/2);
1

which I think means it is only summing over the integers in the range [-1/2, 1/2], which is just 0. WolframAlpha does give your result: http://www.wolframalpha.com/input/?i=sum(exp(a*x)%2C+x%3D-1%2F2..1%2F2)

The problem is that the summation is not well-defined in the way that you want it to be. SymPy computes the sum by first computing the indefinite sum and then plugging in the limits (similar to the fundamental theorem of calculus for integration). Doing that gives the result that SymPy returns, as I showed in comment 1.

My guess (and I could be completely wrong here), is that for spin variables, they use a convenient notation that the summation takes place on integers offset by 1/2 (or whatever). Maybe one of our physicists will know. If this is indeed the case, then you can perhaps add a function to the physics module (or maybe one already exists) that does this for you.

I'd also like to see if Mateusz or anyone else knows more about this from a mathematical standpoint as I really haven't encountered summations with non-integer limits before.

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to