TITLE: How to compute $\sqrt{i + 1}$
QUESTION [18 upvotes]: Possible Duplicate:
How do I get the square root of a complex number? 

I'm currently playing with complex numbers and I realized that I don't understand how to compute $\sqrt{i + 1}$. My math program, sage, returns     
$$1.09868411346781 + 0.455089860562227*i$$
How does sage compute that number? I don't even see how one could rewrite $\sqrt{i + 1}$ in a number of the form $a+bi$.

REPLY [9 votes]: Hint $\ $ Applying my Simple Denesting Rule and rationalizing denominators yields
$$\rm \sqrt{1 + {\it i}\,}\, =\, \sqrt{\alpha}+ {\it i}\,\sqrt{-\alpha'}\quad for\quad \alpha,\alpha' \,=\, \frac{1\pm\sqrt{2}}2$$
Indeed, squaring it yields $\rm\,\ \alpha+\alpha'\! + 2 \sqrt{-\alpha\alpha'}\:{\it i}\: =\, 1 + {\it i}$