For Programmers: Free Programming Magazines  


Home > Archive > Mathematica > May 2006 > Re: Simplification and Arg









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Simplification and Arg
Jean-Marc Gulliet

2006-05-27, 10:07 pm

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.
>

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}
> ]


Hi Andrew,

What you need is *ComplexExpand* [1]:

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

Out[1]=
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}
> ]


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

Out[2]=
ArcTan[a, b]

In[3]:=
FullSimplify[ComplexExpand[Arg[a + I*b], {a, b},
TargetFunctions -> {Re, Im}], {a > 0, b > 0}]

Out[3]=
b
ArcTan[-]
a

For the difference between Out[2] (without information on the quadrant)
and Out[3] (with information on the quadrant) see [2].

Best regards,
Jean-Marc

[1] http://documents.wolfram.com/mathem...s/ComplexExpand

[2] http://documents.wolfram.com/mathem...unctions/ArcTan

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com