Path: news.mathworks.com!not-for-mail 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$1@fred.mathworks.com> References: <ghung9$3as$1@fred.mathworks.com> <ghv2ee$h15$1@fred.mathworks.com> Reply-To: <HIDDEN> NNTP-Posting-Host: webapp-02-blr.mathworks.com Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Trace: fred.mathworks.com 1229134265 7223 172.30.248.37 (13 Dec 2008 02:11:05 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Sat, 13 Dec 2008 02:11:05 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 1187260 Xref: news.mathworks.com comp.soft-sys.matlab:506681 "Georgios" <gkokovid@yahoo.com> wrote in message <ghv2ee$h15$1@fred.mathworks.com>... > "Joerg Buchholz" <buchholz@hs-bremen.de> wrote in message <ghung9$3as$1@fred.mathworks.com>... > > ....... > > 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