#16643: integrate() infinite loop
---------------------------------------+------------------------
Reporter: rws | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.3
Component: symbolics | Resolution:
Keywords: integration, maxima | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
---------------------------------------+------------------------
Comment (by nbruin):
The following helps perhaps to locate the problematic code. The following
fragment does complete (but after considerable time):
{{{
from sage.interfaces.maxima_lib import *
args=((tan(x)^2 + 1)*(x + tan(x))*e^tan(x) + (tan(x)^2 + 2)*e^tan(x), x)
expr=EclObject(([max_integrate],[sr_to_max(SR(a)) for a in args]))
result=maxima_eval(expr)
max_to_sr(result)
}}}
this is the code the integrator would execute, and it does return the
integral unevaluated. So somehow we're avoiding the error above.
Indeed, the difference seems to be how you feed the expression. Sage
actually DOES return this integral (unevaluated), it just takes longer.
The difference is in how you give the integral. The expression for the
derivative that maxima computes gives the result above. However, the form
computed by sage still works. If you do in maxima
{{{
...
(%i6) f: (tan(x)^2 + 1)*(x + tan(x))*exp(tan(x)) + (tan(x)^2 +
2)*exp(tan(x));
(%o6) %e^tan(x)*(tan(x)^2+2)+%e^tan(x)*(tan(x)+x)*(tan(x)^2+1)
(%i7) integrate(f,x);
(%o7)
'integrate(%e^tan(x)*(tan(x)^2+2)+%e^tan(x)*(tan(x)+x)*(tan(x)^2+1),x)
}}}
everything is fine.
So the only report for Maxima is the above question why ECL runs into an
error for the particular integral given there. This integral is not the
one encountered with the original sage script and the sage code does
finish correctly (albeit after a rather long time).
--
Ticket URL: <http://trac.sagemath.org/ticket/16643#comment:2>
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/d/optout.