How does integrate handle %i?



Karl-Dieter Crisman wrote:
> Dear list,
>
> The following session seems to indicate that integrate "chooses"
> different square roots of negative one depending on the context (note
> that the last output is precisely minus the penultimate output).  Is
> there any flag to set which would ensure that I get the same answer
> from integrating both f and g from 9 to 16?  Thank you!
>
> Maxima 5.19post http://maxima.sourceforge.net
> using Lisp SBCL 1.0.24
> Distributed under the GNU Public License. See the file COPYING.
> Dedicated to the memory of William Schelter.
> The function bug_report() provides bug reporting information.
> (%i1) f:sqrt(25-x)*sqrt(1+1/(4*(25-x)));
>                                 1
> (%o1)                  sqrt(---------- + 1) sqrt(25 - x)
>                             4 (25 - x)
>
>   
[snip]
> (%i4) radcan(f);
>                               %i sqrt(4 x - 101)
> (%o4)                         ------------------
>                                       2
>   
The issue is not integrate but radcan.  f and radcan(f) are different. 
In fact g = -f over the range from 9 to 16 and if you evaluate the
integrals, you'll see that they are, in fact, negatives of each other.

Ray