Consider the following simplification
(Sqrt[A] Sqrt[Conjugate[A]])/Sqrt[A Conjugate[A]] // FullSimplify
(Sqrt[Conjugate[A]] Sign[A])/Sqrt[A]
I am a bit confused by this output. I would have expected Mathematica to return just 1
, since
$$A=|A|e^{i(\phi+2\pi n)}~~~,~~~A^*=|A|e^{-i(\phi+2\pi n)}~~~,~~~n\in\mathbb{Z}\,,$$
obviously leads to
$$\frac{\sqrt{A}\sqrt{A^*}}{\sqrt{AA^*}}=\frac{|A|\sqrt{e^{i(\phi+2\pi n)}}\sqrt{e^{-i(\phi+2\pi n)}}}{|A|}=e^{i\frac{\phi+2\pi n}{2} -i\frac{\phi+2\pi n}{2}}=1$$
on all branches $n\in \mathbb{Z}$.
Instead, we get the above output, where I'm not even sure what Sign
of a complex number is supposed to mean. What is going on? Is there a way to make Mathematica simplify this properly?
EDIT:
Just to convince everyone that there is nothing special going on for Arg[A] >= Pi
, see the following plot
Plot3D[ReIm[(Sqrt[x Exp[I \[Phi]]] Sqrt[x Exp[-I \[Phi]]])/Sqrt[ x Exp[I \[Phi]] x Exp[-I \[Phi]]]], {x, 0, 50}, {\[Phi], 0, 20 \[Pi]}]
Real part is always 1, imaginary part is always 0.
EDIT2:
It seems that the trouble of $\sqrt{(-1)\cdot(-1)}$ vs $\sqrt{-1}\cdot \sqrt{-1}$ is addressed even in the relevant wikipedia article. There it is pointed out that $\sqrt{z^*}\neq \sqrt{z}^*$ when the principal square root function is considered. I guess Mathematica uses exactly that principal function version, which explains why it does not return what I expected.
Personally, I would have preferred if on the field of complex numbers we had non-identical $(-1)=e^{i \pi}$ and $(-1)^*=e^{-i \pi}$, which would resolve the issue and make $\sqrt{z^*}= \sqrt{z}^*$ true. But that's not standard, so I guess I can't expect it from Mathematica either.
Sign
documentation: "For non-zero complex numbersz
,Sign[z]
is defined asz/Abs[z]
". $\endgroup$