bug in integrate, is anyone working on this?



On 6/2/2012 11:07 AM, Stavros Macrakis wrote:
> Rich,
>
> Doesn't it come down to the semantics of sqrt(x^2)?
Yes, but it is a little more involved, in that the argument revolves 
around whether you
are asking about the sqrt(9) where the 9 comes from sqrt(x^2) evaluated 
at x=3 or
sqrt(9) where the 9 comes from sqrt(x^2) evaluated at x=-3.

That is, more people are willing to state that sqrt(9) being 3 because
"if you meant the other sqrt, you would have said -sqrt(9)" than the 
next argument..

Draw a graph of sqrt(x^2) for x in [-1,1]
>  If "sqrt" means "positive square root", then this is abs(x) (Maxima's 
> normal behavior).  But if you treat sqrt as multivalued, then you need 
> some way to decide whether sqrt(x^2) for negative x is x=-abs(x) or -x 
> = abs(x).  One reasonable way to do this is as the analytic 
> continuation of sqrt(x^2) for positive x, which would make sqrt(x^2) 
> -> +/- x.
>
> So the current Maxima results are arguably correct (with the arbitrary 
> choice of +x rather than -x over the whole range). Mathematica's 
> result is clever because it includes that pesky sqrt in the result. 
>  Cf. Mathematica's integrate(sqrt(x^2),x) => x*sqrt(x^2)/2.
>
> What does Mathematica do for definite integrals?
>
>              -s
>
> On Sat, Jun 2, 2012 at 1:25 PM, Richard Fateman 
> <fateman at eecs.berkeley.edu <mailto:fateman at eecs.berkeley.edu>> wrote:
>
>     sin(x)^2/sqrt(1-cos(x)^2);
>
>     integrate(%,x,-1,1)  returns 0, but the integrand is
>     always non-negative.
>
>     integrate(%,x)  returns cos(x)  which is not
>     right either.
>
>     Mathematica gives  -cot(x)*sqrt(sin(x)^2)   :)
>
>     This kind of integration problem is not new.
>
>
>     RJF
>
>     _______________________________________________
>     Maxima mailing list
>     Maxima at math.utexas.edu <mailto:Maxima at math.utexas.edu>
>     http://www.math.utexas.edu/mailman/listinfo/maxima
>
>