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.
Arg[1 + I a] /. Arg[1 + I*x_] :> ArcTan[x]
$\endgroup$Arg[1 + I a] /. Arg -> arg
, where 'arg' is given below. Thanks! $\endgroup$