Real part of $\sqrt{ai-1}$ Is there a way to find the real and imaginary parts of
$$
z=\sqrt{ai-1},\qquad a>0
$$
where $i=\sqrt{-1}$.  Thanks.  I do not know what to to do.
Note
$$
i=e^{i\pi/2}=\cos \frac{\pi}{2}+i\sin \frac{\pi}{2}.
$$

Convert $ai-1$ into polar form. Let $ai-1 = r(\cos\theta + i\sin\theta)$. Then 
$$\begin{align*}
a &= r\sin\theta\\-1 &= r\cos\theta\\
r^2 &= (r\sin\theta)^2 + (r\cos\theta)^2\\
&= a^2 + 1\\
r &= \sqrt{a^2 + 1}\\
\tan \theta &= \frac{r\sin\theta}{r\cos\theta}\\
&= -a\\
\theta &= \pi - \tan^{-1} a
\end{align*}$$
Let $r(\cos\theta + i\sin\theta) = [p(\cos\phi + i\sin\phi)]^2 = p^2(\cos2\phi + i\sin2\phi)$ for $p\ge 0$.
Then $p^2 = r$ and $p = \sqrt r$. Also, there are two arguments $\phi\in[0,2\pi)$ that will satisfy $2\phi\equiv \theta \pmod {2\pi}$:
$$\phi_1 = \frac\theta 2,\quad \phi_2 = \frac{\theta + 2\pi}2$$
So one of the roots is
$$\begin{align*}
p(\cos\phi_1 + i\sin\phi_1) &= \sqrt[4]{a^2+1}\left[\cos\frac{\pi-\tan^{-1}a}2 + i\sin\frac{\pi-\tan^{-1}a}2\right]\\
&= \sqrt[4]{a^2+1}\left[\sin\frac{\tan^{-1}a}2 + i\cos\frac{\tan^{-1}a}2\right]\\
\end{align*}$$
and the other root is
$$\begin{align*}
p(\cos\phi_2 + i\sin\phi_2) &= \sqrt[4]{a^2+1}\left[\cos\frac{3\pi-\tan^{-1}a}2 + i\sin\frac{3\pi-\tan^{-1}a}2\right]\\
&= \sqrt[4]{a^2+1}\left[-\sin\frac{\tan^{-1}a}2 - i\cos\frac{\tan^{-1}a}2\right]\\
\end{align*}$$
Simplify the nested inverse tangent in (co)sine using half-angle formulae.
$$\begin{align*}
\sin\frac{\tan^{-1} a}2 &= \operatorname{sgn} a \sqrt{\frac{1-\cos\tan^{-1}a}2}\\
&= \operatorname{sgn} a\sqrt{\frac{1-\frac1{\sqrt{a^2+1}}}2}\\
&= \operatorname{sgn} a\sqrt{\frac{\sqrt{a^2+1} - 1}{2\sqrt{a^2+1}}}\\
\cos\frac{\tan^{-1} a}2 &= \sqrt{\frac{1+\cos\tan^{-1}a}2}\\
&= \sqrt{\frac{1+\frac1{\sqrt{a^2+1}}}2}\\
&= \sqrt{\frac{\sqrt{a^2+1} + 1}{2\sqrt{a^2+1}}}
\end{align*}$$
For this question, $\operatorname{sgn} a$ is always $1$.
