-
-
Notifications
You must be signed in to change notification settings - Fork 641
Open
Description
Something seems to be going wrong in maxima_lib:
sage: integrate(sin(x), x)
-cos(x)
sage: integrate(sin(x)*exp(x), x)
1/2*(sin(x) - cos(x))*e^x
sage: integrate(sin(x)*exp(x)/x, x)
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (580, 0))
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/home/mcneil/sagedev/sage-5.1.beta1/devel/sage-hack/sage/<ipython console> in <module>()
/home/mcneil/sagedev/sage-5.0/local/lib/python2.7/site-packages/sage/misc/functional.pyc in integral(x, *args, **kwds)
726 """
727 if hasattr(x, 'integral'):
--> 728 return x.integral(*args, **kwds)
729 else:
730 from sage.symbolic.ring import SR
/home/mcneil/sagedev/sage-5.0/local/lib/python2.7/site-packages/sage/symbolic/expression.so in sage.symbolic.expression.Expression.integral (sage/symbolic/expression.cpp:33707)()
[...]
/home/mcneil/sagedev/sage-5.0/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.pyc in max_to_sr(expr)
1536 op=max_op_dict[op_max]
1537 max_args=cdr(expr)
-> 1538 args=[max_to_sr(a) for a in max_args]
1539 return op(*args)
1540 elif expr.symbolp():
/home/mcneil/sagedev/sage-5.0/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.pyc in max_to_sr(expr)
1537 max_args=cdr(expr)
1538 args=[max_to_sr(a) for a in max_args]
-> 1539 return op(*args)
1540 elif expr.symbolp():
1541 if not(expr in max_sym_dict):
TypeError: op_mul expected 2 arguments, got 1
This happens in 5.0 and beyond. Unfortunately I don't have a 4.8 at hand so I can't track it down before that.
Strangely enough, if you do it again, you get a different error:
/home/mcneil/sagedev/sage-5.0/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.pyc in sr_integral(self, *args)
745 raise ValueError, "Computation failed since Maxima requested additional constraints; using the 'assume' command before integral evaluation *may* help (example of legal syntax is 'assume(" + s[4:k] +">0)', see `assume?` for more details)\n" + s
746 else:
--> 747 raise error
748
749 def sr_sum(self,*args):
RuntimeError: ECL says: Error executing code in Maxima: conjugate: wrong number of arguments.
So -- and this might be independent -- something's stateful which probably shouldn't be.
CC: @kcrisman
Component: symbolics
Keywords: integral
Issue created by migration from https://trac.sagemath.org/ticket/13071