From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: int in R2008b, same integral?
Date: Sat, 13 Dec 2008 02:11:05 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 14
Message-ID: <ghv5jp$71n$>
References: <ghung9$3as$> <ghv2ee$h15$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1229134265 7223 (13 Dec 2008 02:11:05 GMT)
NNTP-Posting-Date: Sat, 13 Dec 2008 02:11:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: comp.soft-sys.matlab:506681

"Georgios" <> wrote in message <ghv2ee$h15$>...
> "Joerg Buchholz" <> wrote in message <ghung9$3as$>...
> > .......
> > Is there a way to make R2008b simplify 'sqrt(1/(1-x^2))' to '1/sqrt(1-x^2)'?
> No.  These are equivalent only over the range -1..1.  Outside of that range they are not equivalent, that is why you get a closed form answer for the first integral and not for the second.  Without integrating, try plugging in some numbers greater that 1 into both functions, and see what happens.  For example, using a value of x=1.3333, the first function yields  -1.133899898*I while the second one yields 1.133899899*I.  If you integrate using a bounded range, say -1..1, then you should get an answer of pi for both.  Once the range goes beyond this, the answers will differ with a sign change with respect to the imaginary variable.
> Regards,
> Georgios

  Well, that might be a reason, but in my opinion it's not a very good reason.  The square root function in the complex plane has two branches.  If one integrates half way around the singularity at z = 1 in a semi-circle, a different answer is obtained for a counterclockwise route than a clockwise one.  However, that is no reason for 'int' to misbehave itself for z restricted to the real interval (-1,+1).  The log(z) function has infinitely many branches about its z = 0 singularity but that would be no reason for 'int' to fail to furnish accurate answers for z restricted to positive reals.

Roger Stafford