# Validate equalities among Square roots for a simple expression

I am trying to validate this property:

$$\sqrt{1-z}=\sqrt{-(-1+z)}=(\text{}\pm i) \sqrt{-1+z}$$

FullSimplify[Sqrt[1 - z] == I Sqrt[(-1 + z)]]


I have seen how we need to be specially careful when trying to check equalities among square root expressions, and generally using Assumptions and setting some values as Reals,Positives, etc, gets the job done.

However I can't say for sure what would I need to add as an assumption in this case, since there are no other parameters than the constants i and 1.

The Sqrt of a number -- like all functions -- is single-valued for a given input. The root is taken to minimize its phase, so whether it is plus or minus depends on the input.

FullSimplify[Sqrt[1 - z] == I Sqrt[(-1 + z)] /. z -> #] & /@ {5 + 3 I, -5 +
3 I, 5 - 3 I, -5 - 3 I}

(* {False, False, True, True} *)

FullSimplify[Sqrt[1 - z] == -I Sqrt[(-1 + z)] /. z -> #] & /@ {5 + 3 I, -5 +
3 I, 5 - 3 I, -5 - 3 I}

{True, True, False, False}

Assuming[z > 1, Sqrt[1 - z] == I Sqrt[(-1 + z)] // FullSimplify]

(* True *)

Assuming[z < 1, Sqrt[1 - z] == -I Sqrt[(-1 + z)] // FullSimplify]

(* True *)


Graphically,

ReImPlot[#, {z, -5, 5}] & /@ {Sqrt[1 - z], I Sqrt[(-1 + z)]}


ReImPlot[#, {z, -5, 5}] & /@ {Sqrt[1 - z], -I Sqrt[(-1 + z)]}


• This is an interesting way of seeing it, thanks for your complete explanation!
– Jmtz
Commented Jul 29, 2023 at 0:53