Re: Sqrt of complex number

*To*: mathgroup at smc.vnet.net*Subject*: [mg126716] Re: Sqrt of complex number*From*: Richard Fateman <fateman at cs.berkeley.edu>*Date*: Sat, 2 Jun 2012 05:42:30 -0400 (EDT)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com*References*: <jpspgr$hdj$1@smc.vnet.net> <201205290948.FAA06757@smc.vnet.net> <jqa1l1$bjp$1@smc.vnet.net>

On 6/1/2012 2:22 AM, danl at wolfram.com wrote: > >> [...] >> What is the definition of the principal root of sqrt((x-y)^2)? how does >> it differ from the principal root of sqrt((y-x)^2)? > > One waits until x and y have been supplied with actual values... If you give numerical values to x and y, there is no difference between (x-y)^2 and (y-x)^2 :) > > >>> You might _prefer_ that Mathematica return all possible values of a >>> multi-valued function, >> >> maybe, but maybe not. Maybe there should be another system that does >> multi-valued functions correctly. > > Who would build it? Oh, I was thinking of some PhD student. Who would use it? What features would it have that existing systems do not? I would hope it would have fewer "features" meaning that it would work mathematically correctly as opposed to having ideas/features/excuses/ bugs injected by program designers That is to say, what would be the structure and semantics of "multi-valued function objects"? If an ordinary structure looks like Plus[x,y] then the multivalued object could be something like OneOf[x,y] or OneOf[Hold[Table[n*Pi,{n,0, Inf}] or Root[ ...,n]. Note that there is already a multivalued object in Mathematica, namely Interval[{a,b}] which should mean One (unspecified) number between a and b. (Mathematica sometimes conflates this with the notion of the continuous range of numbers between a and b. This is probably a mistake in some circumstances, but it often doesn't seem to matter.) The semantics would be essentially: A op OneOf[B] -> OneOf[A op B] e.g. A+ OneOf[Hold[Table[n*Pi,{n,0, Inf}] OneOf[Hold[Table[A+ n*Pi,{n,0, Inf}] (If I am misusing "Hold" I apologize. I think you get the idea.) see also http://www.cs.berkeley.edu/~fateman/papers/sets.pdf > And is this a problem of sufficient merit to warrant the R&D resources needed to address it? PhD students working under an NSF grant are low cost, if not free. I suppose that the "merit" may be a business decision. In that case the question is "Can one can make just as much money delivering the wrong answer as the right one?" > > >> but that would raise a host of difficulties -- >> sure, it is part of the design. That's why certain integrals come out >> wrong because the chosen "principal value" happens to be the wrong value. >> Fixing these errors without doing the mathematics correctly is perhaps >> far more difficult than doing the mathematics right and avoiding the >> errors entirely. This was understood by some of the builders of the >> earlier systems, but Wolfram based his design on the old systems -- with >> their problems -- rather than coming up with a solution. >> [...] > > Okay, it was really this that I wanted to comment upon. > It is relatively uncommon for an integral to "come out wrong" due to use of principal values. > It happens, yes. In some fairly dark corners of indefinite integration. >In definite integrals, in cases where path singularities go undetected, >or limits at the singularities are not correctly found. If one's goal is to encode all of mathematics into a computer system, then one must deal with even the "relatively uncommon cases". If one's goal is to encode a subset of mathematics (dependably, reliably, robustly, correctly) into a computer system, then one must deal with even the "relatively uncommon cases" that occur in that subset of mathematics. Here it appears that we have a system that will solve relatively common problems correctly but sometimes without warning gives incorrect answers to well-formed questions. > > As you surely know, there are indeed researchers who work on ways to >avoid principal value issues arising from following paths, e.g. > by "unwinding number". Yes If you discuss this with them (as I have), >you will learn that they are not particularly closer than the rest >of us to addressing these vexing issues of definite integration. Maybe they need better tools, say representation of multivalued functions. There were at Berkeley at least 2 MS projects under my supervision that went off in this direction -- conformal mapping, (Adam Dingle), and another that tried not very successfully to write a simplifier for multivalued expressions. I think the MKM people (who intend to study mathematical "knowledge") worry about this more than "practical" system builders. Certainly someone intending to use a computer to prove mathematical theorems cannot just ignore the occasional contradiction. > I would venture to say that they are, like the rest of us, much >closer to retirement than to sorting out such problems. In the current movie "Best Exotic Marigold Hotel" there is the line.. ?Everything will turn out alright in the end, and if it?s not alright (at present), then it?s not the end!? RJF > > Daniel Lichtblau > Wolfram Research > >

**Re: Flattening a hypermatrix into an ordinary matrix**

**Re: Flattening a hypermatrix into an ordinary matrix**

**Re: Sqrt of complex number**

**Announcing JavaTools 2.0**