Calculating $ \tan w$ for $ w = \dfrac{1} {i} \log\dfrac{1-iz} {1+iz}$ Let $ w = \dfrac{1} {i} \log\left(\dfrac{1-iz} {1+iz}\right)$ and calculate $\tan w$.
I begin by using the fact that
$$ \tan w =  \frac{\sin w}{\cos w} =  \frac1i\frac{e^{iw} - e^{-iw}}{e^{iw}+e^{-iw}}$$
I now replace $  w = \dfrac{1} {i} \log(\dfrac{1-iz} {1+iz})$ and get
$$\tan w = \frac{1} {i} \left(\frac{{e^{\log(\frac{1-iz} {1+iz})} - e^{-{\log(\frac{1-iz} {1+iz})}}}} {e^{\log(\frac{1-iz} {1+iz})} + e^{-\log(\frac{1-iz} {1+iz})}}\right). $$
It is at this point that i run into troubles. The next step should be to use the fact that
$$e^{-{\log(\frac{1-iz} {1+iz})}} = e^{{\log(\frac{1-iz} {1+iz})^{-1}}} = e^{{\log(\frac{1+iz} {1-iz})}}.  $$
The thing that i have a hard time grasping is why
$$e^{-{\log(\frac{1-iz} {1+iz})}} = e^{{\log(\frac{1-iz} {1+iz})^{-1}}} $$ is true for complex numbers aswell, since i've always worked under the assumption that the normal logarithmical rules doesn't always apply when it comes to complex numbers. How come it applies here?
 A: Use
$$e^{\log (a)} = a,$$
and
$$e^{-\log(a)} = \frac{1}{a}.$$
Then:
$$\tan w = \frac{1} {i} \left(\frac{{e^{\log\left(\frac{1-iz} {1+iz}\right)} - e^{-{\log\left(\frac{1-iz} {1+iz}\right)}}}} {e^{\log\left(\frac{1-iz} {1+iz}\right)} + e^{-\log\left(\frac{1-iz} {1+iz}\right)}}\right) = \\
= \frac{1}{i} \frac{\frac{1-iz}{1+iz} - \frac{1+iz}{1-iz}}{\frac{1-iz}{1+iz} + \frac{1+iz}{1-iz}} = \\
= \frac{1}{i} \frac{\frac{(1-iz)^2 - (1+iz)^2}{(1+iz)(1-iz)}}{\frac{(1-iz)^2 + (1+iz)^2}{(1+iz)(1-iz)}} = \\
= \frac{1}{i} \frac{(1-iz)^2 - (1+iz)^2}{(1-iz)^2 + (1+iz)^2} = \\
= \frac{1}{i} \frac{1-z^2-2iz - 1 + z^2 - 2iz}{1-z^2-2iz + 1 -z^2 + 2iz} = \\
= -\frac{1}{i} \frac{4iz}{2(1-z^2)} = \\
= \frac{2z}{z^2-1}.$$
A: Instead of asking whether then rule that $-\log a= \log\dfrac1a$ is true of all $a\in\mathbb C,$ it seems simpler to use the rule that $e^{-b}= \dfrac 1 {e^b}$ for $b\in \mathbb C.$ That tells you that
$$
e^{-\log a} = \frac 1 {e^{\log a}} = \frac 1 a.
$$
Then:
\begin{align}
\tan w & = \frac 1 i \left(\frac{e^{\log(\frac{1-iz} {1+iz})} - e^{-{\log(\frac{1-iz} {1+iz})}}} {e^{\log(\frac{1-iz} {1+iz})} + e^{-\log(\frac{1-iz} {1+iz})}}\right) \\[12pt]
& = {} \frac 1 i\cdot \frac{\frac{1-iz}{1+iz} - \frac{1+iz}{1-iz}}{\frac{1-iz}{1+iz} + \frac{1+iz}{1-iz}} = \frac 1 i \cdot \frac{(1-iz)^2 - (1+iz)^2}{(1-iz)^2 + (1+iz)^2}
\end{align}
and so on.
A: We can try in a separate way:
$$e^{iw}=\dfrac{1-iz}{1+iz}$$
Use https://qcweb.qc.edu.hk/math/Junior%20Secondary/Componendo%20et%20Dividendo.htm,
$$iz=\dfrac{1-e^{iw}}{1+e^{iw}}=-i\tan\dfrac w2$$
Now use $\tan2x$ formula
