Open rtoy opened 4 months ago
Imported from SourceForge on 2024-07-08 10:24:21 Created by robert_dodier on 2020-11-15 05:59:37 Original: https://sourceforge.net/p/maxima/bugs/3677/#7661
Incidentally this bug report was inspired by https://trac.sagemath.org/ticket/30816 , where the problematic expression is:
(%i1) assume(x1 > 0, x2 > 0, notequal(cos(y), 0));
(%o1) [x1 > 0, x2 > 0, notequal(cos(y), 0)]
(%i4) integrate (sqrt(x1^2 - 2*x1*x2*cos(y) + x2^2), x1);
Is 1 zero or nonzero?
nz;
(%o4) (-(x2^2*cos(y)^2*log(2*sqrt((-2*x1*x2*cos(y))+x2^2+x1^2)
-2*x2*cos(y)+2*x1))
/2)
+(x2^2*log(2*sqrt((-2*x1*x2*cos(y))+x2^2+x1^2)-2*x2*cos(y)+2*x1))/2
-(x2*cos(y)*sqrt((-2*x1*x2*cos(y))+x2^2+x1^2))/2
+(x1*sqrt((-2*x1*x2*cos(y))+x2^2+x1^2))/2
which can be simplified to
(%i5) asksign (4*x2^2*cos(y)^2-4*x2^2);
Is 1 zero or nonzero?
nz;
(%o5) pos
Imported from SourceForge on 2024-07-08 10:24:24 Created by robert_dodier on 2020-11-15 05:59:55 Original: https://sourceforge.net/p/maxima/bugs/3677/#6a33
Imported from SourceForge on 2024-07-08 10:24:19 Created by robert_dodier on 2020-11-15 05:54:31 Original: https://sourceforge.net/p/maxima/bugs/3677
Maxima 5.44.0 + SBCL 2.0.9 on macOS.
Without
assume(x > 0)
, there's a different bug; see #3676.Relevant bit of the stack trace:
Looks like ASKSIGN1 has decided to call ENSURE-SIGN about whether 1 is zero or nonzero. Not sure what's going on there.