See https://trac.sagemath.org/ticket/29059#comment:11
Maxima 5.45.0 https://maxima.sourceforge.io using Lisp ECL 21.2.1 Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) domain:complex; (%o1) complex (%i2) f:x^2*asin(1/3*sqrt(-x^2 + 1)/sqrt(-1/9*x^2 + 1/9)); 2 2 sqrt(1 - x ) (%o2) x asin(--------------) 2 1 x 3 sqrt(- - --) 9 9 (%i3) integrate(f,x,0,1); expt: undefined: 0 to a negative exponent. -- an error. To debug this try: debugmode(true);
I see the error with domain = real, so I guess it doesn't hinge on that.
I see the error in a few different ways. In addition to
integrate(f, x, 0, 1)
shown above, I see it inintegrate(f, x)
and inload(antid); antidiff(f, x, u);
.However, I don't see it in
risch(f, x)
. I guess that different paths lead to the place the error is happening, or happen to call something else.A little bit more info. Tracing some of the usual suspects shows
which looks like INTEGRATOR has made a change of variable and transformed the integrand into something (the argument of the last call to INTEGRATOR shown above) is identically zero; eventually some function downstream from INTFORM notices that.
I guess INTEGRATOR should verify the transformation is valid before going ahead.
For what it's worth, the argument to
asin
is just 1, so the antiderivative forf
is just%x^3*%pi/6
(that agrees withrisch
).Test cases for this problem. This is a bit of an experiment, to put in some cases which can be copied into the test suite, and making use of "milestone" values to track whether there are test cases, and whether they've been copied into the test suite. Anyway here it is.
Having test cases in a bug report is great.
Would it make s|nse to add these test cases to the test suite immediately? That way if the bug tracker ever gets lost the big still is kinda visible and if some unrelated change improves things we get an info that something has improved.