Skip to main content

complex - ComplexExpand and Arg function



Why does the command ComplexExpand[Arg[a]] gives Arg[a] instead of 0? Isn't it that ComplexExpand supposed to assume all unspecified variable to be real, and the argument of real variable is 0?



Answer



The function ComplexExpand itself does not know what is a, complex, real and so on. One needs to instruct Mma about it. For example,


    Simplify[ComplexExpand[Arg[a]], a > 0]

(* 0 *)


Here is another example:


    Simplify[ComplexExpand[Arg[a]], a < 0]

(* \[Pi] *)

On the other hand, if one does not fix the sign of a, but only that it is Real, Mma assumes that it can have the both signs and leaves the both possibilities:


Simplify[ComplexExpand[Arg[a]], a \[Element] Reals]

(* Arg[a] *)


Even more this is valid, if a may be complex:


Simplify[ComplexExpand[Arg[a]]]

(* Arg[a] *)

Have fun!


Comments