defint or sqrt bug?



 

--Barton

-----maxima-bounces at math.utexas.edu wrote: -----


On 12/17/11, Barton Willis <willisb at unk.edu> wrote:

>> (%i3) integrate (integrate (1+sin(5*x*y+y^2), y, -sqrt(1-x^2),
>> sqrt(1-x^2)), x, -1, 1);
>> defint: lower limit of integration must be real; found -sqrt(1-x^2)
>
> This is a bug. Try tracing sign--Maxima fails to recognize that 1-x^2 is pz.

I dunno. Given that the inner integral is evaluated before the outer one,
there's no way to know that x > -1 and x < 1.

Oh, I thought the calls to make-global-assumptions, assume, and with-new-context in $defint
did sometime useful--apparently not always:

(%i4) defint (defint (1+sin(5*x*y+y^2), y, -sqrt(1-x^2),sqrt(1-x^2)), x, -1, 1);
  1> (MAKE-GLOBAL-ASSUMPTIONS)
    2> (ASSUME ((MGREATERP) *Z* 0))
    <2 (ASSUME ((MGREATERP) *Z* 0))
    2> (ASSUME ((MGREATERP) EPSILON 0))
    <2 (ASSUME ((MGREATERP) EPSILON 0))
    2> (ASSUME ((MLESSP) EPSILON 1.0E-8))
    <2 (ASSUME ((MLESSP) EPSILON 1.0E-8))
    2> (ASSUME ((MGREATERP) PRIN-INF 1.0E8))
    <2 (ASSUME ((MGREATERP) PRIN-INF 1.0E8))
  <1 (MAKE-GLOBAL-ASSUMPTIONS
         (((MGREATERP) PRIN-INF 1.0E8) ((MLESSP) EPSILON 1.0E-8)
          ((MGREATERP) EPSILON 0) ((MGREATERP) *Z* 0)))
  1> (ASSUME (($NOTEQUAL)
              ((MPLUS SIMP) 1 ((MTIMES SIMP) -1 ((MEXPT SIMP) $X 2)))
              0))
  <1 (ASSUME ((MNOT) (($EQUAL) 1 ((MEXPT SIMP) $X 2))))
defint: lower limit of integration must be real; found -sqrt(1-x^2)
 -- an error. To debug this try: debugmode(true);