Re: FullSimplify regress?
- To: mathgroup at smc.vnet.net
- Subject: [mg81408] Re: FullSimplify regress?
- From: Adam Strzebonski <adams at wolfram.com>
- Date: Sat, 22 Sep 2007 03:27:22 -0400 (EDT)
- References: <52E282C5-DA4D-4206-95DB-DEB5AEBA0958@mimuw.edu.pl>
- Reply-to: adams at wolfram.com
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