I want to find the real part of the square root of a complex number $z$
$\operatorname{Re}(\sqrt(z))$
In general I am wondering if the following is true:
$\operatorname{Re}(\sqrt(z))$ = $\sqrt(\operatorname{Re}(z))$
Thanks
I want to find the real part of the square root of a complex number $z$
$\operatorname{Re}(\sqrt(z))$
In general I am wondering if the following is true:
$\operatorname{Re}(\sqrt(z))$ = $\sqrt(\operatorname{Re}(z))$
Thanks
On
As pointed out in another answer, $\Re\sqrt{z} \ne \sqrt{\Re z}$ for general $z$.
In general, for $z = x + iy = re^{i\theta}$ with $r \ge 0$ and $\theta \in (-\pi,\pi]$, the principal square root of $z$ is defined to be the number $\sqrt{r}e^{i\frac{\theta}{2}}$. This means
$$\Re\sqrt{z} = \sqrt{r}\cos\frac{\theta}{2}$$ If you apply the half angle formula for cosine and use the fact $$\frac{\theta}{2} \in\left (-\frac{\pi}{2},\frac{\pi}{2}\right)\implies \cos\frac{\theta}{2} \ge 0$$ You will find $\cos\frac{\theta}{2} = \sqrt{\frac{1+\cos\theta}{2}}$ and hence
$$\Re\sqrt{z} = \sqrt{\frac{r + x}{2}} = \sqrt{\frac{\sqrt{x^2+y^2} +x }{2}}$$ By a similar argument, you will find $$|\Im \sqrt{z}| = \sqrt{\frac{\sqrt{x^2+y^2}-x}{2}}$$ The sign of $\Im\sqrt{z}$ will be the same as the sign of $\theta$ and hence $y$. As a result, the principal square root is given by following formula:
$$\sqrt{z} = \sqrt{\frac{\sqrt{x^2+y^2} + x}{2}} + \verb/sign/(y)\sqrt{\frac{\sqrt{x^2+y^2}-x}{2}} i$$ where $\verb/sign/(y) = +1, 0, -1$ depends on whether $y$ is positive, zero or negative.
Let $\sqrt{z}=x+iy$, and suppose that $\Re(\sqrt z)=\sqrt{\Re(z)}$, then $$x=\sqrt{\Re(x^2-y^2+i2xy)}=\sqrt{x^2-y^2}$$
Thus it holds if and only if $\sqrt{z}\in\Bbb R_{\geq 0}$.