Re: Simplification and Arg[]

*To*: mathgroup at smc.vnet.net*Subject*: [mg66727] Re: Simplification and Arg[]*From*: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>*Date*: Sat, 27 May 2006 21:03:56 -0400 (EDT)*Organization*: The Open University, Milton Keynes, UK*References*: <e4r7qm$mmh$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

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/mathematica/functions/ComplexExpand [2] http://documents.wolfram.com/mathematica/functions/ArcTan