OK:
(%i1) integrate(1/(1+sin(x)^2),x,0,2*%pi), %piargs : true;
(%o1) sqrt(2)*%pi
Not OK when %piargs : false
(%i2) integrate(1/(1+sin(x)^2),x,0,2*%pi), %piargs : false;
(%o2)
(sqrt(2)*atan(sqrt(2)*tan(2*%pi)))/2-(sqrt(2)*atan(sqrt(2)*tan(0)))/2
(%i3) ''%;
(%o3) 0
Barton Willis
2007-07-21
Dan Gildea
2007-07-23
Logged In: YES
user_id=1797506
Originator: NO
see also 1741705
Barton Willis
2008-11-09
Another example:
OK:
(%i1) integrate(1/x,x,minf,inf);
Principal Value
(%o1) 0
Not OK:
(%i2) integrate(1/x,x,minf,inf), %piargs : false;
Maxima encountered a Lisp error:
Error in MACSYMA-TOP-LEVEL [or a callee]: Bind stack overflow.
Here the problem seems to be that %piargs : false allows simpatan2 to return a
nounform instead of using the services of atan2neg --> asksign-p-or-n --> $asksign -->
asksign01 --> .... The definite integration code sends some crazy things to asksign (try trace(asksign), integrate(1/x,x,minf,inf):
1 Enter asksign [prin-inf-epsilon+x]
So fixing this in a reasonable way it tricky.