Prove complex identity of $\frac{1}{z}$ $\log(\cdot)$ and $\sqrt{\cdot} $ are any branches of the logarithm and square root, respectively. Show that if $z \notin \{0, \pm i\}$, then the following identity holds:
$$\frac 1z =\cot\left [\frac{1}{i}\log\left (\sqrt{\frac{1+iz}{1-iz}}\right ) \right ]$$
 A: Whenever applicable 
\begin{align}
\cot \left [\frac 1i \ln\left ( \sqrt{\frac {1+iz}{1-iz}} \right )\right ] &= i \cdot\frac {\exp \left [\ln\left ( \sqrt{\frac {1+iz}{1-iz}} \right )\right ] + \exp \left [-\ln\left ( \sqrt{\frac {1+iz}{1-iz}} \right )\right ]}{\exp \left [\ln\left ( \sqrt{\frac {1+iz}{1-iz}} \right )\right ] - \exp \left [-\ln\left ( \sqrt{\frac {1+iz}{1-iz}} \right )\right ]} = \\
&= i \cdot \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}}} = i \cdot \frac {1+iz + 1 - iz}{1+iz - 1 + iz} = \\
&= i \cdot \frac 2{2iz} = \frac 1z
\end{align}
Some info
\begin{align}
\cot z &= \frac {\cos z}{\sin z} = \frac {\frac {e^{iz} + e^{-iz}}2}{\frac {e^{iz} - e^{-iz}}{2i}} = i \cdot \frac {e^{iz} + e^{-iz}}{e^{iz} - e^{-iz}} \tag 1 \\
-\ln z &= \ln \frac 1z \tag 2
\end{align}
A: We start by noting that $\varphi(z)=\frac{1+iz}{1-iz}$ is real and non-positive if and only if $z=it$ for a real $t$, $|t|\geq 1$. It would stand to reason, then, to define
$$\Omega = \mathbb{C}\setminus\{it:t\in\mathbb{R},|t|\geq1\},$$
and take the principal branches of square-root and logarithm defined on the entire plane except the non-positive real line. In this setting, $f:\Omega\to\mathbb{C}$ defined $f(z) = -i\log\sqrt{\varphi(z)}$ is well-defined and holomorphic. Also note that in this setting, the proposition amounts to
$$z = \tan f(z),$$
or, if you prefer, that defining $f$ is the proper way to extend the 'arctangent' analytically.
Well, to this end, note that $f(0) = 0$, and
$$f^\prime(z) = -i\frac{1}{\sqrt{\varphi(z)}}\frac{1}{2\sqrt{\varphi(z)}}\varphi^\prime(z) = \frac{1}{2i\varphi(z)}\frac{2i}{(1-iz)^2} = \frac{1}{1+z^2}.$$
It follows that for all $x\in\mathbb{R}$ we have $f(x)=\arctan x$, so
$$\tan f(x)-x\equiv 0,$$
but then, by the uniqueness theorem,
$$\tan f(z)-z\equiv 0$$
for all $z\in\Omega$ (which is an open, connected set containing the real line, with its many accumulation points).
