defint or sqrt bug?



On Dec. 18, 2011, Barton Willis wrote
------------------------------
>A workaround: (not so terrific when a or b are not real)
>
> (%i1) load(abs_integrate)$
> (%i2) myint(e,x,a,b) := simp_assuming(integrate(e,x,a,b), min(a,b) <=x, x 
> <= max(a,b))$
>
> (%i6) myint(myint(1, y, 0,sqrt(1-x^2)),x,-1,1);
> (%o6) %pi/2
----------------------------------------------
I like your  approach, which I have abbreviated to
the minimum for my task.  (The user could
check that a and b are real)

(%i1) load("unwind_protect.lisp");

(%o1) 
"C:/PROGRA~1/MAXIMA~1.1-G/share/maxima/5.25.1/share/contrib/unwind_protect.lisp"

(%i2) simp_assuming(e, [fcts]) ::=
  buildq([e,fcts], unwind_protect((apply(assume, fcts), expand(e,0,0)), 
apply(forget,fcts)))$

(%i3) myint(e,x,a,b) := simp_assuming(integrate(e,x,a,b), min(a,b) <=x, x <= 
max(a,b))$

(%i4) myint(myint(1, y, 0,sqrt(1-x^2)),x,-1,1);

(%o4) %pi/2

(%i5) myint(myint(1, y, -sqrt(1-x^2),sqrt(1-x^2)),x,-1,1);

(%o5) %pi
-------------------------------
Ted