Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1500 by [email protected]: Sum does not work with some arguments
http://code.google.com/p/sympy/issues/detail?id=1500

Hi everybody,

while doing some calculations I tripped over the following issue with the
summation (Sympy 0.6.4)

This works nicely:
>>> m = Symbol('m')
>>> Sum(m**2+exp(m), (m, -3.0/2, 3.0/2)).doit()
5.0 + (-exp(2.5) + exp(-1.5))/(1 - E)

Slightly modifying the argument and it fails here:
>>> Sum(m**2+m*exp(m), (m, -3.0/2, 3.0/2)).doit()
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File
"C:\PRogramme\Pythonxy\Python25\lib\site-packages\sympy\concrete\summations.py",
line 69, in doit
     f = eval_sum(f, (i, a, b))
   File
"C:\PRogramme\Pythonxy\Python25\lib\site-packages\sympy\concrete\summations.py",
line 232, in eval_sum
     value = eval_sum_symbolic(f.expand(), (i, a, b))
   File
"C:\PRogramme\Pythonxy\Python25\lib\site-packages\sympy\concrete\summations.py",
line 253, in eval_sum_symbolic
     lrsum = telescopic(L, R, (i, a, b))
   File
"C:\PRogramme\Pythonxy\Python25\lib\site-packages\sympy\concrete\summations.py",
line 212, in telescopic
     s = solve(L.subs(i, i + m) + R, m)[0]
   File
"C:\PRogramme\Pythonxy\Python25\lib\site-packages\sympy\solvers\solvers.py",  
line
245, in solve
     result = tsolve(f, *symbols)
   File
"C:\PRogramme\Pythonxy\Python25\lib\site-packages\sympy\solvers\solvers.py",  
line
773, in tsolve
     assert False, 'tsolve: at least one Function expected at this point'
AssertionError: tsolve: at least one Function expected at this point

I have noticed that it only fails with non-integer summation variables. So
in the eval_sum_symbolic code path.

Thanks for looking into this!
Alexander

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
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