Is there a trick to establish $z = \tan \left[ \frac{1}{i} \log \left( \sqrt{ \frac{1+iz}{1-iz} } \right) \right]$? Im trying to show that 
$$ z = \tan \left[ \frac{1}{i} \log \left( \sqrt{ \frac{1+iz}{1-iz} } \right) \right] $$
My first thought is to use the fact that $\sin x = \frac{ e^{ix} - e^{-ix} }{2i } $ and $\cos x = \frac{ e^{ix} + e^{-ix} }{2} $ to write 
$$ \tan x = \frac{ e^{ix } - e^{-ix} }{i( e^{ix} + e^{-ix} ) } $$
But using this, it looks like it will some very nasty calculations. Is there a trick to do this?
 A: The following argument establishes a definite domain $\Omega'\subset {\mathbb C}$ on which the stated identity is valid using the principal values of $\sqrt{\mathstrut}$ and $\log$.
We start with the slit region $\Omega:=\{z\in{\mathbb C}\>|\>z\ne it, t\in{\mathbb R}, |t|\geq1\}$. The Moebius map
$$T: \quad z\mapsto w:={1+iz\over 1-iz}$$
maps $\Omega$ onto the $w$-plane with the negative real axis removed. The principal value $w\mapsto\sqrt{w}$ is well defined there and maps the slit $w$-plane onto the right half plane. On the latter, the principal value of the logarithm is well defined, so that we arrive at ${\rm Log}\sqrt{w}$, situated in a horizontal strip of width $\pi$ with the real axis as centerline. The points
$$\zeta:={1\over i}{\rm Log}\sqrt{w}$$
therefore fill the vertical strip
$$S:=\left\{\zeta=\xi+i\eta\in{\mathbb C}\>\biggm|\>-{\pi\over2}<\xi<{\pi\over 2}\right\}\ .$$
Put $\Omega':=\Omega\cap S$. I claim that  one has 
$$q(z):=\tan\left({1\over i}{\rm Log}\sqrt{1+iz\over 1-iz}\right)=z\qquad\forall z\in \Omega'\ .$$
Proof. By definition, 
$$\tan\zeta={1\over i}{e^{i\zeta}-e^{-i\zeta}\over e^{i\zeta}+e^{-i\zeta}}\ .$$
In the case at hand we have $\zeta:={1\over i}{\rm Log}\sqrt{w}$, so that we obtain
$$q(z)={1\over i}{\sqrt{w}-1/\sqrt{w}\over \sqrt{w}+1/\sqrt{w}}={1\over i}{w-1\over w+1}=\ldots=z\ .$$
A: Your idea of writing
$$\tan x = \frac{ e^{ix } - e^{-ix} }{i( e^{ix} + e^{-ix} ) },$$
is a good start. Substituting $x=\frac{1}{i}\log\sqrt{\tfrac{1+iz}{1-iz}}$ shows that
$$\tan x=\frac{1}{i}\frac{\sqrt{\frac{1+iz}{1-iz}}-\sqrt{\frac{1-iz}{1+iz}}}{\sqrt{\frac{1+iz}{1-iz}}+\sqrt{\frac{1-iz}{1+iz}}}.$$
Mutiplying the numerator and denominator by $\sqrt{(1+iz)(1-iz)}$ yields
$$\tan x=\frac{1}{i}\frac{(1+iz)-(1-iz)}{(1+iz)+(1-iz)}=\frac{1}{i}\frac{2iz}{2}=z,$$
which isn't as nasty a calculation as you might have feared.
A: Hint Inverse trigonometric functions are usually extended to the complex plane as follows:
$$\arctan z = \int_0^z \frac{\mathrm dx}{1 + x^2},\qquad z \notin \{i,-i\},$$
where the part of the imaginary axis that does not strictly lie between $-i$ and $i$ is the cut between the principal branch and the other branches.
One can then express the inverse tangent via the complex logarithm:
$$\arctan z = \frac12i\left[\ln(1 - iz) - \ln(1 + iz)\right].$$
