-
-
Notifications
You must be signed in to change notification settings - Fork 679
Closed
Description
When SymPy can't evaluate an integral, such as integrate((log(x)*log(log(x))), x, algorithm='sympy'), it returns "AttributeError: 'Integral' object has no attribute 'sage'". It should just return an unevaluated integral, the way it does when Maxima is used.
Another example from #15256:
sage: a = integrate(sin(x)*tan(x), x, algorithm='sympy')
...
/usr/local/sage/sage-5.11/local/lib/python2.7/site-packages/sage/symbolic/integration/external.pyc in sympy_integrator(expression, v, a, b)
37 else:
38 result = sympy.integrate(ex, (v, a._sympy_(), b._sympy_()))
---> 39 return result._sage_()
40
41 def mma_free_integrator(expression, v, a=None, b=None):
AttributeError: 'Integral' object has no attribute '_sage_'
sage:
sage:
sage: %debug
> /usr/local/sage/sage-5.11/local/lib/python2.7/site-packages/sage/symbolic/integration/external.py(39)sympy_integrator()
38 result = sympy.integrate(ex, (v, a._sympy_(), b._sympy_()))
---> 39 return result._sage_()
40
ipdb> print result
Integral(sin(x)*tan(x), x)
Depends on #20204
CC: @kcrisman @asmeurer @williamstein
Component: calculus
Keywords: sympy, integrate
Author: Ralf Stephan
Branch/Commit: 119f46f
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/14723