Re: Re: TraditionForm Appears to be Inconsistent

*To*: mathgroup at smc.vnet.net*Subject*: [mg99673] Re: [mg99606] Re: TraditionForm Appears to be Inconsistent*From*: Andrzej Kozlowski <akoz at mimuw.edu.pl>*Date*: Sun, 10 May 2009 05:20:44 -0400 (EDT)*References*: <9293149.1241693402776.JavaMail.root@n11> <gu0bal$fsj$1@smc.vnet.net> <200905090720.DAA29931@smc.vnet.net>

As often the main point here is that computer algebra programs do not exist primarily to produce a familiar looking and pleasing output. Of course, other things being equal it is not a bad thing if they do so, but often other things are not equal. And the main "other thing" in this case is performance of algebraic transformations and simplifications. I am always surprised (and amused) to see how many people with technical knowledge and skills seem not to have noticed that computers are not human and they have to work by means of general and often rather "dumb" algorithms ("dumb" in the sense that they often ignore the existence of a much simpler way of achieving the same outcome). I am even more surprised to see that there are also some users who seem to believe that certain features of Mathematica are there because of whims of the programmers or even their wish to annoy (certain?) users. Frankly, this sounds like a great idea to me and if I were a Mathematica developer it might even be true but I am sure that the nice people working for Wolfram Research could not be farther from this thought. So if not to annoy users or to satisfy their own passion for the bizarre, why do they do it? Would you believe that there is a research and reason behind this? Concerning the example that causes so much irritation: note that actually Mathematica does not have any particular preference for Csc over Sin or the other way round. After all: 1/Csc[x] Sin[x] but on the other hand: 1/Sin[x] Csc[x] It should not take a genius to notice that what this two transformations applied by Mathematica automatically, i.e. without Simplify being called, have in common, is that they do what most clever elementary school children do: avoid fractions if they can be avoided. The reason for that is that Mathematica's general algorithms perform worse in the presence of fractions than when dealing with polynomials (and here I am referring to "polynomials" in a rather general sense which admits the variables them selves to be transcendental functions such as sin). This phenomenon is actually a special case of the general principle of all computer algebra - expressions should be reduced to "standard forms" (or normal or canonical forms) as soon as possible. This principle derives form the fact that the most important and most difficult task in computer algebra is "showing" that two expressions are equal, or that one expression is 0. Now, obviously the more complicated the expression the more complicated this problem becomes. If even very simple expressions were allowed to enter into more complex ones in different (but equivalent) forms, when they actually ought to cancel, then after certain transformations are applied, it may no longer be possible to see that they should have been cancelled in the beginning. So the way to prevent this happening is to reduce them as soon as possible to a single "standard form" and cancel them as soon as one gets the chance. Most, if not all, of the simplifications that Mathematica applies automatically consist of this sort of "reduction to standard form". Their purpose lies in computer algebra, not in the desire to produce output in a form pleasing to the majority of "science and engineering professionals" or to annoy them. These "rules" are not made up by Mathematica programmers as they happily go along programming. That does not mean that all standard forms are necessarily unique: there has always been some dispute about the best canonical forms for certain types of expressions because often choosing a form involves a conflict of values - for example it is much easier to cancel out terms in polynomial expressions if they are always expanded but expanded expressions take up much more memory. Think of (x+y)^10000. This is the reason why Mathematica does not automatically expand polynomials and does not immediately notice that (x + y)^2 - x^2 - y^2 - 2*x*y -x^2 - 2*x*y + (x + y)^2 - y^2 is actually 0. But in most other cases canonical expressions are chosen to facilitate the solution of the "zero equivalence problem". This problem, by the way, has been proved to be unsolvable for any sufficiently rich class of functions involving just elementary functions (by D.Richardson in Journal of Symblic Logic 1968). Thus one should not be surprised that there are expressions involving only elementary functions give zero when any numerical value is substituted for the variable but Mathematica is unable to show that they are equal. What is actually surprising is that this happens as rarely as it does. And it this that explains why Mathematica does all these "irritating simplifications". If all you want is to get the sort of output you know and love, than you should obviously be using a tool, that is meant for this purpose, e.g. TeX. Andrzej Kozlowski On 9 May 2009, at 16:20, AES wrote: > In article <gu0bal$fsj$1 at smc.vnet.net>, > "David Park" <djmpark at comcast.net> wrote: > >> >> One just has to get used to what simplifications Mathematica >> automatically >> does and which ones it doesn't do. Some of the automatic ones are >> annoying, >> such as 1/Sin[x] -> Csc[x]. >> > > This particular one has always been particularly puzzling for me. > In my > experience at least, more or less everyone uses Sin and Cos in writing > out any expressions containing these functions, and practically no one > ever uses Sec and Csc. > > Moreover, I'd make a small bet that if you took a large random > sample of > science and engineering professionals, approaching half of them would > get the relationships between Sin and Cos, and Sec and Csc, wrong. > ("Let's see -- it's COsine and COsecant, and then Sin and Secant -- > right?") > > Is there some fundamental mathematical or logical reason behind > Mathematica's choice? Or some strongly embedded or historical > convention in the field of symbolic algebra that leads to this being > done? >

**References**:**Re: TraditionForm Appears to be Inconsistent***From:*AES <siegman@stanford.edu>

**Re: ColorFunction on a linux system (xorg) loses graphics**

**Spectral graph theory of the Buckyball**

**Re: Re: TraditionForm Appears to be Inconsistent**

**Re: TraditionForm Appears to be Inconsistent**