Open mwageringel opened 3 years ago
I get a slightly different behavior, but still buggy. Working w/ Maxima 5.44.0 on macOS.
With domain: real
(default), I get "Is 1 zero or nonzero?" for the question, and if I respond nz
, then I get a result (I didn't check it):
(-(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
With domain: complex
, I get the same question and same result.
Not sure where the question is coming from. I will try to investigate a little.
trace(?asksign1)
and then trying it again shows the expression which confuses asksign is 4*x2<sup>2*cos(y)</sup>2-4*x2^2
. In a fresh session, I get the buggy behavior with just
(%i1) asksign (4*x2^2*cos(y)^2-4*x2^2);
Is x2 zero or nonzero?
nz;
(%o1) pos
(%i2) assume(x2 > 0);
(%o2) [x2 > 0]
(%i3) asksign (4*x2^2*cos(y)^2-4*x2^2);
Is 1 zero or nonzero?
nz;
(%o3) pos
(%i4) asksign(4*x*cos(y)-4*x);
Is x positive, negative or zero?
p;
(%o4) pos
(%i5) assume(x>0);
(%o5) [x > 0]
(%i6) asksign(4*x*cos(y)-4*x);
Is 1 zero or nonzero?
nz;
(%o6) pos
(%i7) asksign(x*cos(y)-x);
Is 1 zero or nonzero?
nz;
(%o7) pos
That's the simplest example I found. The presence of cos(y)
seems important; without it I don't see the bug:
(%i8) asksign(x*y-x);
Is y - 1 positive, negative or zero?
p;
(%o8) pos
(%i9) asksign(x*foo(y) - x);
Is foo(y) - 1 positive, negative or zero?
p;
(%o9) pos
Just to be clear, assume(x > 0)
is enough; assumptions on other variables, and the setting of domain
, and the presence of integrate
aren't required.
I've opened https://sourceforge.net/p/maxima/bugs/3677/ to track this bug.
Sage development has entered the release candidate phase for 9.3. Setting a new milestone for this ticket based on a cursory review of ticket status, priority, and last modification date.
When computing this integral, Maxima asks whether 1 is zero or nonzero:
Attempting to add this as an assumption fails:
See also this upstream bug https://sourceforge.net/p/maxima/bugs/3218/ and this thread on sage-support.
Component: symbolics
Keywords: maxima, integral
Issue created by migration from https://trac.sagemath.org/ticket/30816