MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: FullSimplify regress?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg81421] Re: FullSimplify regress?
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Sun, 23 Sep 2007 04:26:55 -0400 (EDT)
  • References: <52E282C5-DA4D-4206-95DB-DEB5AEBA0958@mimuw.edu.pl> <46F453E9.4060903@wolfram.com>

On 22 Sep 2007, at 08:29, Adam Strzebonski wrote:

> Andrzej Kozlowski wrote:
>> *This message was transferred with a trial version of CommuniGate 
>> (tm) Pro*
>> In Mathematica 5.2:
>> FullSimplify[ComplexExpand[ArcTan[Cos[Arg[z w]-Arg[z]-
>>     Arg[w]],Sin[Arg[z w]-Arg[z]-Arg[w]]],{z,w},TargetFunctions-> 
>> {Re,Im}]]
>> 0
>> In Mathematica 6.01:
>> FullSimplify[ComplexExpand[
>>      ArcTan[Cos[Arg[z*w] - Arg[z] - Arg[w]],
>>        Sin[Arg[z*w] - Arg[z] - Arg[w]]], {z, w},
>>      TargetFunctions -> {Re, Im}]]
>>  ArcTan[Cos[ArcTan[Re[w], Im[w]] + ArcTan[Re[z],
>>          Im[z]] - ArcTan[Re[w]*Re[z] - Im[w]*Im[z],
>>          Re[z*Im[w] + w*Im[z]]]],
>>    -Sin[ArcTan[Re[w], Im[w]] + ArcTan[Re[z], Im[z]] -
>>          ArcTan[Re[w]*Re[z] - Im[w]*Im[z],
>>            Re[z*Im[w] + w*Im[z]]]]]
>> This looks like a bit of a regress to me.
>> Andrzej Kozlowski
>
> Since FullSimplify always works with the simplest form found so far,
> adding simplification rules may result in preventing other rules from
> working for some expressions.
>
> In V5.2 FullSimplify did not simplify the following expressions:
>
> In[1]:= Re[x]+Re[y]//FullSimplify
> Out[1]= Re[x] + Re[y]
>
> In[2]:= Im[z]*Re[w] + Im[w]*Re[z]//FullSimplify
> Out[2]= Im[z] Re[w] + Im[w] Re[z]
>
> in V6.0 it does
>
> In[1]:= Re[x]+Re[y]//FullSimplify
> Out[1]= Re[x + y]
>
> In[2]:= Im[z]*Re[w] + Im[w]*Re[z]//FullSimplify
> Out[2]= Re[z Im[w] + w Im[z]]
>
> However, for the particular expression from your example,
> simplifying a sum of real parts prevents another, more useful
> in this case, simplification.
>
> If you explicitly apply TrigToExp before FullSimplify,
> V6.0 can simplify the expression to zero.
>
> In[3]:= FullSimplify[TrigToExp[ComplexExpand[
>      ArcTan[Cos[Arg[z*w] - Arg[z] - Arg[w]],
>        Sin[Arg[z*w] - Arg[z] - Arg[w]]], {z, w},
>      TargetFunctions -> {Re, Im}]]]
>
> Out[3]= 0
>
> Best Regards,
>
> Adam Strzebonski
> Wolfram Research


Thanks. This is  very reasonable and, in fact, as I had exected.  
However, this example strengthens a thought I have been having for  
some time, which is that perhaps Mathematica needs a new function,  
distinct form FullSimplify, for proving algebraic identities  
(including exact numerical ones). I am referring to something that a  
culd hbe used to verify an identity like

ArcTan[Cos[Arg[z w]-Arg[z]-Arg[w]],Sin[Arg[z w]-Arg[z]-Arg[w]]]==0

A user who wants to evaluate this sort of expression is not really  
asking for the "simplest form" of the left hand side but only wants  
to know if it can be shown that it is 0 or not. This seems to me to  
be really quite a different question and the whole approach with  
reducing complexity does not appear the most natural one. In fact, in  
such a situation it would be natural to apply sequences of  
transformations such as CompexExpand, TrigToExp and many others to  
the left hand side whether they individually  increase or decrease  
complexity. Of course one would need some strategy of limiting the  
number of different combinations of different transformations but the  
guiding principle should be trying to reduce the given expression to  
standard forms and well known identities rather than reducing some  
particular transformation by means of certain transformation  
functions. (In addition numerical methods based on substitution of  
random values should be used to try to disprove the identity). Such a  
function would be, of course, in many ways similar to FullSimplify  
(it might even use FullSimplify) but it could be optimized for a  
different purpose. (Although Reduce can sometimes be used in this way  
it is clearly far from "optimized" for this purpose. For example, the  
answer returned by

Reduce[Cos[x]^2 + Sin[x]^2 == 1, x]

(Element[C[1], Integers] && x == 2*Pi*C[1] + Pi) ||
    NotElement[(x - Pi)/(2*Pi), Integers]

is a rather convoluted way of saying "all complex numbers x".)

Andrzej Kozlowski


  • Prev by Date: Re: Any Mathematica 6 book yet?
  • Next by Date: Re: Integrate not very aggressive about taking constants out of integrals
  • Previous by thread: Re: FullSimplify regress?
  • Next by thread: Re: Re: FullSimplify regress?