Open kedlaya opened 4 years ago
It seems that this might be a Maxima antiderivative issue.
Z = integral(integral(1, (z, 0, sqrt((1-x^2-2*y^2)/3))), (y,0,sqrt((1-x^2)/2)))
integral(Z,x)
<same explosion>
If we imitate the Sage Maxima,
domain:complex;
X:integrate(1,z,0,sqrt((1-x^2-2*y^2)/3));
assume(x<1);
assume(x>-1);
Y:integrate(X,y,0,sqrt((1-x^2)/2));
display2d:false;
integrate(Y,x,0,1);
This reveals
%pi/(3*2^(3/2))
Is this what you would expect?
I think we got rid of the abs_integrate
package so I would not expect that to be part of the problem (try load(abs_integrate)
to test), and I did get some related errors in some intermediate steps, but I am not finding this particular error in Maxima - yet. Hopefully this initial debug helps somebody track it down further.
Moving tickets to milestone sage-9.2 based on a review of last modification date, branch status, and severity.
Moving to 9.4, as 9.3 has been released.
Changed keywords from none to integral
isolation of the issue in maxima integration:
sage: f=-1/12*(sqrt(3)*sqrt(2)*x^2 - sqrt(3)*sqrt(2))*arcsin(4/3*sqrt(-1/2*x^2 +1/2)/sqrt(-8/9*x^2 + 8/9))
sage: f.integrate(x,0,1)
1/36*sqrt(6)*pi
sage: f.integrate(x,0,1,algorithm='maxima')
BOUM!!
simplified bug
sage: f = x^2*arcsin(1/3*sqrt(-x^2 + 1)/sqrt(-1/9*x^2 + 1/9))
sage: f.integrate(x,0,1,algorithm='maxima')
where in fact the square roots inside do cancel each other.
If you can try this inside of the most recent Sage Maxima (I think mine might be a little old), then we can report that upstream.
Maxima 5.42.2 http://maxima.sourceforge.net
using Lisp ECL 16.1.2
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);
Nice tracking this down.
here it goes
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);
Upstream: Reported upstream. No feedback yet.
Thanks! This is now Maxima bug 3906.
one can even remove the x**2
factor, the bug remains the same.
on the other hand,
maxima: f:asin(2*sqrt(-x + 1)/sqrt(-4*x + 4));
asin((2*sqrt(1-x))/sqrt(4-4*x))
maxima: integrate(f,x,0,1);
gives another error:
CODE:
integrate(f,x,0,1);
Maxima ERROR:
`quotient' by `zero'
Changed upstream from Reported upstream. No feedback yet. to Reported upstream. Developers acknowledge bug.
This symbolic double integral works fine:
but the analogous triple integral breaks:
On the other hand, even for the same region of integration this does not arise for other choices of integrand:
Is this an upstream issue?
Upstream: Reported upstream. Developers acknowledge bug.
Component: calculus
Keywords: integral
Issue created by migration from https://trac.sagemath.org/ticket/29059