       Re: FullSimplify regress?

• To: mathgroup at smc.vnet.net
• Subject: [mg81408] Re: FullSimplify regress?
• Date: Sat, 22 Sep 2007 03:27:22 -0400 (EDT)
• References: <52E282C5-DA4D-4206-95DB-DEB5AEBA0958@mimuw.edu.pl>

```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:= Re[x]+Re[y]//FullSimplify
Out= Re[x] + Re[y]

In:= Im[z]*Re[w] + Im[w]*Re[z]//FullSimplify
Out= Im[z] Re[w] + Im[w] Re[z]

in V6.0 it does

In:= Re[x]+Re[y]//FullSimplify
Out= Re[x + y]

In:= Im[z]*Re[w] + Im[w]*Re[z]//FullSimplify
Out= 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:= 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= 0

Best Regards,