Re: "just a bug" !; Mathematica 4
- To: mathgroup at smc.vnet.net
- Subject: [mg27804] Re: "just a bug" !; Mathematica 4
- From: Lawrence Walker <lwalker701 at earthlink.net>
- Date: Fri, 16 Mar 2001 04:38:02 -0500 (EST)
- Organization: Morgan State University: COMSARE
- References: <N6mm6.17728$0r1.43475@ralph.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi Peter, Try changing the limits of integration variables to be different from any variables you called out within the integrand. That is, you can try sol=Integrate[Sqrt[(r - x)(r + x)], {x, -a, a}] instead of sol=Integrate[Sqrt[(r - x)(r + x)], {x, -r, r}] and then Limit[sol, r -> a] (* this step took a while to execute on my machine *) This should give the expected solution in versions 4.0 and 4.1. Lawrence pl10-mac wrote: > Hi, > > I've just noticed this issue : Integrate[Sqrt[(r - x)(r + x)], {x, -r, r}] > > Okay - so version 3 works but version 4 doesn't. > > I've read all the eloquent remarks, but the bottom line is surely this: > > A maths package costing well over 1,000 pounds and written by some of the finest > mathematicians and programmers in the world - should be able to integrate > > Integrate[Sqrt[(r - x)(r + x)], {x, -r, r}] > > Pete Lindsay > > > From: David Withoff <withoff at wolfram.com> To: mathgroup at smc.vnet.net > > Date: Sun, 25 Feb 2001 00:53:20 -0500 (EST) > > To: mathgroup at smc.vnet.net > > Subject: [mg27804] [mg27396] [mg27396] Re: [mg27364] Re: A bug of Integrate[] in > > Mathematica 4.1 (and 4.0) > > > >>>> Thank you for the report. Integrate[] appears to be behaving > >>>> erroneously in all of the cases you present. I have notified > >>>> the the developers of the problems. Unfortunately, there does > >>>> not appear to be a workaround. > >>> > >>>> Unfortunately, there are no bug lists available, and I will > >>>> not be informed of the status of the bug until it is fixed. > >>>> Most likely, a patch will not be made available. > >> > >> I think this behaviour of Wolfram Research should be made public > >> somewhere on the web! Why do these guys not care about BUGS? A software > >> developer should fix his bugs and make this bug fixes available to the > >> users of his product. > > > > The unfortunate misstatements quoted above from technical support are > > at best misleading, and basically are just plain wrong. For that, we > > certainly apologize. Unfortunately, now that this misinformation is on > > the web, it has a life of its own. > > > > It is of course abundantly false that there are no bug lists, no bug > > workarounds, that people are never notified of bug fixes, and so forth. > > Many if not most of the items in the support.wolfram.com web site > > (the bug list) describe bugs or other behaviors that people find > > troublesome, and many of those items include fixes and workarounds. > > This and other information is also frequently distributed in other ways, > > both to technical support people and to users. > > > > In fact, if one strips away the generalizations and takes a close > > look at the specific examples that have been raised here, it turns > > out that in all of these cases solutions have already been provided > > and/or the problems are already discussed in the bug list and/or > > the reported behaviors are not really bugs at all. > > > > Regarding the following particular examle: > > > >> Another annoying bug in Integrate is its handling of branch cuts in real > >> integrals. A "nice" example is the area of a half circle. You may try if > >> there has something changed in version 4.1 compared to 3.0 or 4.0. > >> Reporting this bug they did not admit that it is one at all because > >> Integrate would do "complex integrals". After my reply that then there > >> should be a possibility to define the path of integration in the complex > >> plane I never got a convincing answer ;-(. So here is my example: > >> > >> Correct is the following: > >> > >> In[1]:== Integrate[Sqrt[r^2-x^2],{x,-r,r},Assumptions->{r>0}] > >> > >> 2 > >> Pi r > >> Out[1]== ----- (correct area of a half circle!) > >> 2 > >> > >> Now doing the same integral with a mathematically identical integrand: > >> > >> In[1]:== Integrate[Sqrt[(r-x)(r+x)],{x,-r,r},Assumptions->{r>0}] > >> > >> 2 > >> Pi r Sqrt[r ] > >> Out[1]== ------------- > >> 4 > >> > >> In[2]:== Simplify[%,r>0] > >> > >> 2 > >> Pi r > >> Out[2]== ----- (WRONG factor 1/2) > >> 4 > >> > >> The reason is that Mathematica simply puts the boundaries which are on > >> the branch points of the integrand in the indefinite integrals which are > >> along branchcuts without proper I epsilon-descriptions (well known in > >> quantum theory) > > > > that class of bugs is described in the bug list > > (http://support.wolfram.com/Kernel/Symbols/System/Integrate.html). > > > > If someone didn't want to admit that this was a bug it was probably > > because they weren't sure, and didn't want to admit to something > > without knowing if it was true. If someone said specifically that > > this wasn't a bug, or tried to offer some explanation involving > > complex integrals (or quantum theory) then they were mistaken. > > It's just a bug. Probably it will be fixed in the next major release. > > Development of algorithms to do this sort of thing is a very difficult > > problem in mathematics, and yes it can be annoying that this problem > > has not yet been solved. As soon as all problems have been solved > > then we can all go on vacation. > > > > Dave Withoff > > Wolfram Research > > > > -- ------------------------------------------------------------ (\___/) The fear of the LORD is the beginning of (o\ /o) wisdom: a good understanding have all they /|:.V.:|\ that do his commandments: his praise \\:::::// endureth for ever. Psa 111:10 -----`"" ""`------------------------------------------------ Lawrence A. Walker Jr., M.Eng./Ph.D. Candidate Morgan State University Clarence M. Mitchell School of Engineering COMSARE (Center Of Microwave/Satellite And RF Engineering) (443)885-1453 ------------------------------------------------------------