The definition of the argument is $\arg(z)=\text{Im}(\ln(z))$. Its partial derivative with respect to $z$ would then be
$$
\frac{\partial \arg(z)}{\partial z}=
\frac{\partial}{\partial z}\frac{\ln(z)-\ln(z^*)}{2i}
= -\frac{i}{2z}.
$$
What you see looks like twice the real part of this expression:
With[{z = 2. + 5 I},
{Arg'[z], 2Re[-I/(2z)]}]
(* {-0.172414, -0.172414} *)
I don't know in which sense this is the "correct" answer. It could be that what is actually calculated is not the partial derivative with respect to $z$, but rather the partial derivative with respect to the real part of $z$:
$$
\frac{\partial \arg(z)}{\partial\text{Re}(z)}
=\frac{\partial \arg(z)}{\partial z}\frac{\partial z}{\partial\text{Re}(z)}
+\frac{\partial \arg(z)}{\partial z^*}\frac{\partial z^*}{\partial\text{Re}(z)}\\
=\frac{\partial \arg(z)}{\partial z}
+\frac{\partial \arg(z)}{\partial z^*}
= -\frac{i}{2z}+\frac{i}{2z^*}
= -\frac{\text{Im}(z)}{|z|^2}
$$
With[{z = 2. + 5 I},
{Arg'[z], 2Re[-I/(2z)], -Im[z]/Abs[z]^2}]
(* {-0.172414, -0.172414, -0.172414} *)
Trace[ Arg'[1. + I], TraceInternal -> True ]
$\endgroup$Trace[ Arg'[1. + I], TraceInternal -> True ]
mean. May be numerics gone mad or something :) so just change1.0
to1
in the example given and thenArg
will no longer do what you show. $\endgroup$Arg
, but I wasn't paying too much attention. $\endgroup$