#15256: incorrect behavior when algorithm='sympy' fails to find an integral
------------------------+-----------------------------
Reporter: was | Owner:
Type: defect | Status: new
Priority: minor | Milestone: sage-5.13
Component: calculus | Keywords:
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
------------------------+-----------------------------
What happens:
{{{
sage: a = integrate(sin(x)*tan(x), x, algorithm='sympy')
---------------------------------------------------------------------------
AttributeError Traceback (most recent call
last)
<ipython-input-1-27db75e497e4> in <module>()
----> 1 a = integrate(sin(x)*tan(x), x, algorithm='sympy')
/usr/local/sage/sage-5.11/local/lib/python2.7/site-
packages/sage/misc/functional.pyc in integral(x, *args, **kwds)
745 """
746 if hasattr(x, 'integral'):
--> 747 return x.integral(*args, **kwds)
748 else:
749 from sage.symbolic.ring import SR
/usr/local/sage/sage-5.11/local/lib/python2.7/site-
packages/sage/symbolic/expression.so in
sage.symbolic.expression.Expression.integral
(sage/symbolic/expression.cpp:40833)()
/usr/local/sage/sage-5.11/local/lib/python2.7/site-
packages/sage/symbolic/integration/integral.pyc in integrate(expression,
v, a, b, algorithm)
681 if not integrator:
682 raise ValueError, "Unknown algorithm: %s" % algorithm
--> 683 return integrator(expression, v, a, b)
684 if a is None:
685 return indefinite_integral(expression, v)
/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)
}}}
What should happen:
{{{
sage: a = integrate(sin(x)*tan(x), x, algorithm='sympy')
sage: a
<get back a formal integral>
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/15256>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.