       Re: Have I found a bug?

• To: mathgroup at smc.vnet.net
• Subject: [mg84232] Re: Have I found a bug?
• From: Louise Hoffman <louise.hoffman at gmail.com>
• Date: Fri, 14 Dec 2007 14:59:14 -0500 (EST)
• References: <200712140855.DAA07725@smc.vnet.net> <fjtrgn\$cv8\$1@smc.vnet.net>

```> Integrating k[x] by hand, you obtain : (1/2)*Log[Abs[1-x^2]] , which is =
> (1/2)Log[1-x^2] if -1<x<1.
> So, if -1<x<1, you obtain as final result :
> E^(-(1/2)Log[1-x^2]]=1/Sqrt[1-x^2]
> Is it so?

Yes, exactly =)

> Well, you have not to forget that if Abs[x]>1, then
> 1/2)*Log[Abs[1-x^2]]=(1/2)*Log[x^2-1] and you would so obtain the same =
> result as Mathematica.

How did you figure out that Abs[1-x^2]=x^2-1 ?

> The reason is very simple : "Integrate" gives a primitive which is =
> defined only modulo an arbitrary constant. Mathematica works in the =
> complex space, so you can for example choose the integrating constant =
> I*Pi/2.

This is very interesting. Is it possible to tell Mathematica to only
work in R^2?

> Integrating k[x], you would, with -1<x<1, have obtained :
> (1/2)Log[Abs[1-x^2]]+I*Pi/2 = (1/2)Log[1-x^2]+I*Pi/2
> And so, your final result would be :
> E^(-((1/2)Log[1-x^2]+I*Pi/2))=1/Sqrt[1-x^2]*E^(-I*Pi/2)=1/Sqrt[1-x^2]=
> *(-I)
> But as -1<x<1, Sqrt[1-x^2]=Sqrt[-1*(x^2-1)]=-I*Sqrt[x^2-1]
> (because if a and b are negative, Sqrt[a*b]=-Sqrt[a]*Sqrt[b] )
> So you finally obtain : 1/(-I*Sqrt[x^2-1])*(-I)=1/Sqrt[x^2-1]
> Which is also the same result as Mathematica.
>
> So I definitively think Mathematica is doing very well!

I can sure see that now =)

The strange thing though is, that 1/Sqrt[1-x^2] is the "right" answer,
as I need it to bring a Chebyshev's ODE on SL form.