Complex Numbers and Square Roots Suppose $z = a+bi$ and $w = u+iv$. Let $\displaystyle a = \left(\frac{|w|+u}{2} \right)^{1/2}$ and $\displaystyle b = \left(\frac{|w|-u}{2} \right)^{1/2}$. Show that $z^2 = w$ if $v \geq 0$ and $(\bar{z})^{2} = w$ if $v \leq 0$.
So $|w| = \sqrt{u^2+v^2}$. So this is just a matter of computing $(a+bi)^2$ and $(a-bi)^2$ and substituting in the values?
Source: Chapter 1, Problem 10 from Principles of Mathematical Analysis by Rudin
 A: HINT:
The key is:  if $v \geq 0 \Longrightarrow  (v^{2})^\frac{1}{2}=v$ and if $v \leq 0 \Longrightarrow  (v^{2})^\frac{1}{2}=-v$
For the first part Note that :
$$z^{2}=a^{2}-b^{2}+2ab \imath = \frac{|w|+u}{2}-\frac{|w|-u}{2}+2\imath \left(\frac{|w|^{2}-u^{2}}{4} \right)^\frac{1}{2} = $$ 
$$ u + 2 \imath \left(\frac{\left(\sqrt{u^{2}+v^{2}}\right)^{2}-u^{2}}{4}\right)^\frac{1}{2}= u+2 \imath \left(\frac{v^{2}}{4}\right)^\frac{1}{2} = u + \imath (v^{2})^\frac{1}{2} = u+v\imath = w$$
The other is same, using $-v$ (in the key) and expanding $\bar{z}$.
A: This is related to what Gunnar Magnusson said above. First suppose $|w| = 1$. Then $u = \cos(\theta)$ and $v = \sin(\theta)$ for some $\theta \in (-\pi,\pi]$, so that $w = e^{i\theta}$. Then $a = ({1 + \cos(\theta) \over 2})^{1 \over 2}$ and $b = ({1 - \cos(\theta) \over 2})^{1 \over 2}$. By the half-angle formulas, $a = \cos{\theta \over 2}$. Also, $ b= \sin{\theta \over 2}$ when $v \geq 0$, while $b =
-\sin{\theta \over 2}$ when $v < 0$. 
So if $v \geq 0$, $z = a + ib = \cos{\theta \over 2}+ i\sin{\theta \over 2} = e^{i{\theta \over 2}}$, while if $v < 0$, $\bar{z} = a - ib = \cos{\theta \over 2}+ i\sin{\theta \over 2} = e^{i{\theta \over 2}}$. Thus in the first case, $z^2 = w$, while in the second case $(\bar{z})^2 = w$. This is what you want.
If $|w| \neq 1$, the above proves it for ${w \over |w|}$ in place of $w$. Multiplying everything through by $|w|$ then gives your result.
