coping with messages from integrate



Maxima should never be asking questions involving variables that don't
appear in the input -- that is a bug.

On Mon, Nov 21, 2011 at 14:30, Edwin Woollett <woollett at charter.net> wrote:

> I'm not complaining, and I know Maxima needs user input
> to proceed, even though the answer does not depend on
> the user's input.
>
> I guess the user of integrate should use these
> questions from Maxima as an indication that the definite integral
> below should be checked using other means?
> ------------------------------**------------------------------**---------
> Maxima 5.25.1 http://maxima.sourceforge.net
> using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (a.k.a. GCL)
>
>
> (%i1) integrate(acos(%i*x),x,-2,3);
>
> Is  W35620  positive or negative?
>
> pos;
> Is  W37394  positive or negative?
>
> pos;
> (%o1) %i*(-3*log(sqrt(10)+3)-2*log(**sqrt(5)-2)+sqrt(10)-sqrt(5))+**
> 5*%pi/2
>
> (%i3) float(rectform(integrate(acos(**%i*x),x,-2,3)));
>
> Is  W40485  positive or negative?
>
> pos;
> Is  W42259  positive or negative?
>
> neg;
> (%o3) 7.853981633974483-1.**641858744669991*%i
> (%i4) float(rectform(integrate(acos(**%i*x),x,-2,3)));
>
> Is  W44437  positive or negative?
>
> neg;
> Is  W46056  positive or negative?
>
> pos;
> (%o4) 7.853981633974483-1.**641858744669991*%i
> (%i5) float(rectform(integrate(acos(**%i*x),x,-2,3)));
>
> Is  W49147  positive or negative?
>
> neg;
> Is  W50766  positive or negative?
>
> neg;
> (%o5) 7.853981633974483-1.**641858744669991*%i
> ------------------------------**------------------------------**--
> One way to check just the floating point answer is
>  using quad_qag, for example, as in:
> ------------------------------**----------------
>
> (%i6) check(ex,var,v1,v2) :=
>   (print("  integrate = ",
>       float(rectform(integrate(ex,**var,v1,v2)))),
>
>    print("  quad real = ",
>       part(quad_qag(realpart(ex),**var,v1,v2,3),1)),
>
>    print("  quad imag = ",
>       part(quad_qag(imagpart(ex),**var,v1,v2,3),1)))$
>
> (%i7) check(acos(%i*x),x,-2,3)$
>
> Is  W52944  positive or negative?
>
> pos;
> Is  W54718  positive or negative?
>
> pos;
>  integrate =  7.853981633974483-1.**641858744669991*%i
>  quad real =  7.853981633974482
>  quad imag =  -1.64185874466999
> ------------------------------**-----------
>
>
> Ted Woollett
>
> ______________________________**_________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/**mailman/listinfo/maxima<http://www.math.utexas.edu/mailman/listinfo/maxima>;
>