Let $f: \mathbb{R} \to \mathbb{R}$ be a real function and let $z \in \mathbb{C}$ be a complex number such that $$ f(x)=|x \cdot z| $$ Let's calculate the derivative of $f$
if we applicate the derivation rules: $$ f'(x)=\dfrac{x \cdot z}{|x \cdot z|} \cdot z $$ but it's wrong indeed $$ f(x)=|x \cdot z| = |x| \cdot |z| $$ and now $$ f'(x)=\dfrac{x}{|x|} \cdot |z| $$ so what's the derivative of $f$?
In general what's the derivative of absolute value of a function $|f(x,z)|$ respect the real variable $x$ and $z \in \mathbb{C}$?
Thanks.