Re: Re: Simplification and Arg[]

*To*: mathgroup at smc.vnet.net*Subject*: [mg66616] Re: [mg66603] Re: [mg66593] Simplification and Arg[]*From*: Andrzej Kozlowski <akoz at mimuw.edu.pl>*Date*: Wed, 24 May 2006 03:01:55 -0400 (EDT)*References*: <NDBBJGNHKLMPLILOIPPOAEPPEPAA.djmp@earthlink.net>*Sender*: owner-wri-mathgroup at wolfram.com

David, I don't think this is only a question of "rhetorics'. It is actually related to the issue, which naturally arises from the original post: why Simplify and FullSimplify do not use ComplexExpand, which they easily could do. The reason is exactly the same why they do not use Expand: because ComplexExpand only in very rare situations results in an expression that is "simpler" than the input as measured by any natural ComplexityFunction. It is only in special cases when certain cancellations take place that applying ComplexExpand leads to a simplification. Also, a judicious choice of TargetFuncitons is usually required. Giving this function a misleading name would, in my opinion, actually result in confusion and a lot more complaints from misguided users than is the case now. Andrzej Kozlowski On 23 May 2006, at 11:05, David Park wrote: > Andrzej, > > Well, it was a rhetorical question. Technically ComplexExpand may > be the > correct term. Yet, I think that in most cases where it is used, > users expect > a simplification. Also it is a real problem for new users that they so > frequently overlook ComplexExpand. It is a source of many postings to > MathGroup. They don't overlook Simplify and FullSimplify! I'll bet > if it was > called ComplexSimplify it wouldn't be overlooked. Of course, it's > too late > now anyway. > > David Park > djmp at earthlink.net > http://home.earthlink.net/~djmp/ > > From: Andrzej Kozlowski [mailto:akoz at mimuw.edu.pl] To: mathgroup at smc.vnet.net > > > *This message was transferred with a trial version of CommuniGate > (tm) Pro* > > On 23 May 2006, at 07:14, David Park wrote: > >> Andrew, >> >> For doing complex algebra the BIG, BIG command is ComplexExpand. >> One can >> hardly get along without it. But for some reason, users starting >> out with >> complex algebra on Mathematica frequently overlook it. (Maybe they >> should >> have called it ComplexSimplify?) > > > I don't think so: it quite properly called ComplexExpand because it > "expands". In fact, for purely real expressions it will usually > return the same output as Expand: > > > > ComplexExpand[(a + b)*(c + d)] > > > a*c + b*c + a*d + b*d > > > On the other hand if a and b are complex, the expression returned by > ComplexExpand will certainly in general not be simpler than the > original one: > > > > ComplexExpand[(a + b)*(c + d), {a, b, c, d}] > > > (-Im[a])*Im[c] - Im[b]*Im[c] - Im[a]*Im[d] - Im[b]*Im[d] + Re[a]*Re > [c] + Re[b]*Re[c] + Re[a]*Re[d] + Re[b]*Re[d] + > I*(Im[c]*Re[a] + Im[d]*Re[a] + Im[c]*Re[b] + Im[d]*Re[b] + Im[a]*Re > [c] + Im[b]*Re[c] + Im[a]*Re[d] + Im[b]*Re[d]) > > > I do not think I would call this "simplifying", would you? ;-) > > Andrzej Kozlowski > Tokyo, Japan > > > >