Re: Simplification and Arg[]

• To: mathgroup at smc.vnet.net
• Subject: [mg66597] Re: [mg66593] Simplification and Arg[]
• From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
• Date: Mon, 22 May 2006 18:14:26 -0400 (EDT)
• References: <200605220230.WAA23212@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```On 22 May 2006, at 11:30, Andrew Moylan wrote:

> Should Mathematica be able to simplify the following expression?
> (It is
> easily seen to be zero under the given condition, x > 0.)
>
> FullSimplify[
> 	Arg[1 + I * x] + Arg[1 - I * x],
> 	{x > 0}
> ]
>
> In particular, I would have expected the following to yield ArcTan[b /
> a], from which the above expression is easily reduced to zero:
>
> FullSimplify[
> 	Arg[a + I b],
> 	{a > 0, b > 0}
> ]
>
> Any ideas?
>
> Cheers,
>
> Andrew
>
> P.S. Apologies if I have sent this twice; my original message seems
> not
> to have worked.
>

You do not even need the condition x>0: it is enough that x is real.

ComplexExpand[Arg[1 + I * x] + Arg[1 - I * x],TargetFunctions->{Re,Im}]

0

Simplify and FullSimplify by default do not make use of ComplexExpand.
Of course, if you wish you can make Simplify use ComplexExpand:

Simplify[Arg[1 + I*x] + Arg[1 - I*x],
TransformationFunctions ->
{ComplexExpand[#1, TargetFunctions -> {Re, Im}] & ,
Automatic}]

0

Note that doing this automatically involves the assumption that x is
real, so it would not be a good idea to permanently append
ComplexExpand to the  TransformationFunctions, except when the
assumptions imply that the variables involved are real. However, it
is not difficult to write a version of Simplify or FullSimplify which
will make use ComplexExpand in a way that is compatible with the
assumptions about the variables (real or complex). That it is not
done by default is probably due to the facts that, on the one hand,
ComplexExpand is a high complexity function, and on the other, it
usually leads to more rather than less complex expressions (after all
it "Expands").

Note also that:

ComplexExpand[Arg[a + I*b], TargetFunctions -> {Re, Im}]

ArcTan[a, b]

so the assumption about a and b being positive are again not needed.

Andrzej Kozlowski
Tokyo, Japan

```

• Prev by Date: Re: stytax error
• Next by Date: Re: stytax error
• Previous by thread: Simplification and Arg[]
• Next by thread: Re: Simplification and Arg[]