t.integrate(t, 0, 4*a - a^2) # LaTeX: \int_{0}^{4a - a^2} t dt
1/2*a^4 - 4*a^3 + 8*a^2
assume(a, 'real')assume(a > 1)assume(a < 3) # now 0 < a < 4, so 4*a - a^2 > 0t.integrate(t, 0, 4*a - a^2) # hangs, eventually produces RuntimeError
bool(4*a - a^2 > 0)
In Maxima it works just fine,
besselexpand : true; display2d : false; domain : complex; keepfloat : true; load(to_poly_solve); load(simplify_sum); load(diag);
assume(a>1);
assume(a<3);
integrate(t,t, 0, 4*a-a^2);
On Monday, July 27, 2020 at 4:55:39 PM UTC-7, rjf wrote:In Maxima it works just fine,You should probably qualify that. Perhaps it works fine with the default settings that maxima uses, but there are combinations on settings that don't seem so unreasonable for which the failure can be observed in maxima directly:
that crashed for me.It reminds me of an old joke ..<synopsis>Man goes to doctor and says, It hurts when I do this <contortion>.Doctor says, don't do <contortion>.
Maxima and Macsyma before it was basically written with real variables inmind. It would be nice to know exactly what behavior Sage expectsthat requires domain:complex.
realWhen domain is set to complex, sqrt (x^2) will remain sqrt (x^2) instead of returning abs(x).
I guess I still haven't seen an explanation of whatbehavior in maxima is expected by setting domain to complex.
The development of Macsyma, and Maxima, in a manner similar to that of Sage,was/is essentially the accumulation of contributions from many hands.Sometimes pieces added later have unanticipated effects on oldercode. So this is not entirely unexpected.I think that the assume() code, has been from early implementationrather disappointing from the perspective of reliability, specification,algorithms, and interfaces.Trying to accumulate information about types (A is real) and geometry(A>1) and algebra (A^3 > B^4) and trigonometry (sinh(a+b)>0), and decidewhich deductions to make as data is stored, or as accessed... is difficult,if not techically impossible to do completely. The documentation points out that thededuction mechanism is "not very strong".
As for posting trac bug reports for Sage, I think that postingbugs that have been specifically traced to Maxima, should bereported in some reproducible form to a current stand-alone
version of Maxima. I don't know if this is doneroutinely but it seems advisable. A few people
The original versions of the code were written by different people.The assume() code was written by yet another.