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 05:21:02 +0000 (UTC) Organization: Draeger Medical Systems Inc Lines: 19 Message-ID: <ghvgnu$9mg$1@fred.mathworks.com> References: <ghung9$3as$1@fred.mathworks.com> <ghv2ee$h15$1@fred.mathworks.com> <ghv5jp$71n$1@fred.mathworks.com> Reply-To: <HIDDEN> NNTP-Posting-Host: webapp-05-blr.mathworks.com Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Trace: fred.mathworks.com 1229145662 9936 172.30.248.35 (13 Dec 2008 05:21:02 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Sat, 13 Dec 2008 05:21:02 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 1150820 Xref: news.mathworks.com comp.soft-sys.matlab:506692 "Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <ghv5jp$71n$1@fred.mathworks.com>... > "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 Some symbolic engines handle branch cuts better than others. I'm assuming that R2008b is using MuPad for this. I tried the above in native Maple, and got the same result; i.e. the answers were not the same. But Maxima returns arcsin(x) for both functions. I have no way of evaluating this in Matlab because I do not use the symbolic toolbox. Regards, Georgios