<s>[INST] what are real and imaginary part of this expression I have $M:=\sqrt{\frac{a\cdot(b+ic)}{de}}$ and all variables $a,b,c,d,e$ are real. Now I am looking for the real and imaginary part of this, but this square root makes it kind of hard.
 [/INST] $$\sqrt{\frac{a(b+ic)}{de}}=\sqrt{\frac{a}{de}}\cdot\sqrt{b+ic}$$
Let $$\sqrt{b+ic}=x+iy$$
$$\implies b+ic=(x+iy)^2=x^2-y^2+2xyi$$
Equating the real & the imaginary parts, $b=x^2-y^2, c=2xy$
So, $b^2+c^2=(x^2-y^2)^2+(2xy)^2=(x^2+y^2)^2\implies x^2+y^2=\sqrt{b^2+c^2}$
We have $$x^2-y^2=b$$
$$\implies 2x^2=\sqrt{b^2+c^2}+b\implies x^2=\frac{\sqrt{b^2+c^2}+b}2$$
$$\implies x=\pm\frac{\sqrt{\sqrt{b^2+c^2}+b}}{\sqrt2}$$
and  $$\implies y^2=x^2-b=\frac{\sqrt{b^2+c^2}-b}2$$
$$\implies y=\pm\frac{\sqrt{\sqrt{b^2+c^2}-b}}{\sqrt2}$$
Now, the sign of $y=$ sign of $x\cdot$ sign of $c$ 
</s>