| 1 | initial version |
At the end of the traceback you get a very explicit error message
AttributeError: 'sage.rings.polynomial.polynomial_rational_flint.Polynomial_rational_flint'
object has no attribute 'operator'
The point is that the result of the .sage() function in your situation was not a symbolic expression but a polynomial. And a polynomial does not have this .operator() function that you are using in
sage: isinstance(anti.operator(), sage.symbolic.integration.integral.IndefiniteIntegral)
You can see the very same error with
sage: anti.operator()
In this situation, if you want to check whether the object anti is an indefinite integral you can do
anti.parent() is SR and isinstance(anti.operator(), sage.symbolic.integration.integral.IndefiniteIntegral)
(Note that your way of checking that no integral remains unevaluated is not very strong.)
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.