We can use the fact that eiz=cos(z)+isin(z) and e-iz=cos(z)-isin(z), so eiz+e-iz=2cos(z); similarly 2isin(z)=eiz-e-iz, therefore 2isin(z)/2cos(z)=itan(z)=(eiz-e-iz)/(eiz+e-iz).
Therefore, itan(z)=(e2iz-1)/(e2iz+1), which can also be written tan(z)=-i(e2iz-1)/(e2iz+1) by multiplying both sides by -i.
If tan(z)=t, then z=tan-1(t), so if t=a+ib,
t=-i(e2iz-1)/(e2iz+1);
let y=e2iz, then t=-i(y-1)/(y+1), ty+t+iy-i=0, y(t+i)+t-i=0, y=e2iz=(i-t)/(i+t).
2iz=ln((i-t)/(i+t)) and z=(1/2i)ln((i-t)/(i+t)). Since z=tan-1(t)=(1/2i)ln((i-t)/(i+t)).
Because t=a+ib, we can substitute for t:
tan-1(a+ib)=(1/2i)ln((i-a-ib)/(i+a+ib)).
There are ways of expressing this using hyperbolic trigonometry.
sinh(x)=½(ex-e-x), cosh(x)=½(ex+e-x), tanh(x)=sinh(x)/cosh(x)=(ex-e-x)/(ex+e-x).
If x is replaced by ix, sinh(ix)=½(eix-e-ix)=½(cos(x)+isin(x)-cos(x)+isin(x))=isin(x), isin(x)=sinh(ix).
And, similarly, cosh(ix)=½(cos(x)+isin(x)+cos(x)-isin(x))=cos(x), cos(x)=cosh(ix).
isin(x)/cos(x)=itan(x)=tanh(ix).
It follows that isin(ix)=sinh(-x)=-sinh(x), sin(ix)=isinh(x); cosh(-x)=cosh(x)=cos(ix), tan(ix)=itanh(x).