# Trying to get Arg[1 + I a] -> ArcTan[a]

Can Mathematica evaluate Arg[1+ I a] when a is a positive real in order to get ArcTan[a]?

For example (this is much simpler than the code I'm working with):

ComplexExpand[Im[1/Sqrt[1 + I a]]]


outputs

-(Sin[1/2 Arg[1 + I a]]/(1 + a^2)^(1/4)).


This is a calculation in the middle of my code, and I'm too lazy to replace Arg[1+ i a] for ArcTan[a] manually every time the code is run. Moreover, in the following lines of that code I would like to have only real variables in order to use the function Simplify instead of ComplexExpand, otherwise I get

ComplexExpand[ArcTan[a/b]]

-(1/2) Arg[1 - (I a)/b] + 1/2 Arg[1 + (I a)/b].


Note that

Simplify[-(Sin[1/2 Arg[1 + I a]]/(1 + a^2)^(1/4)), a ∈ Reals]


doesn't do anything.

• Does this simple replacement do what you want? If not, why? Arg[1 + I a] /. Arg[1 + I*x_] :> ArcTan[x] – Mr.Wizard Feb 27 '15 at 8:10
• Yes! It does, as well as Arg[1 + I a] /. Arg -> arg, where 'arg' is given below. Thanks! – Rol Feb 27 '15 at 9:49

It seems that a direct replacement (using ReplaceAll and RuleDelayed) may be adequate:
Arg[1 + I a] /. Arg[1 + I*x_] :> ArcTan[x]

ArcTan[a]

arg[num_] := ArcTan[ComplexExpand[Im[num]]/ComplexExpand[Re[num]]]