Solution (source code)

= Solution

The <complex conjugate> is $z^*=x-iy$. From the complex <sine> and <cosine> identities,
$$
\sin(x-iy)=\sin x\cosh y-i\cos x\sinh y,\qquad
\cos(x-iy)=\cos x\cosh y+i\sin x\sinh y.
$$
Divide these expressions and multiply by the <complex conjugate> of the denominator. Its squared <modulus> is $\cos^2x\cosh^2y+\sin^2x\sinh^2y=(\cos2x+\cosh2y)/2$. The numerator simplifies using $\cosh^2y-\sinh^2y=1$ and the <double-angle formulas>. Thus
$$
\tan(z^*)=\frac{\sin2x-i\sinh2y}{\cos2x+\cosh2y},
\qquad\boxed{\Re\tan(z^*)=\frac{\sin2x}{\cos2x+\cosh2y},\quad\Im\tan(z^*)=-\frac{\sinh2y}{\cos2x+\cosh2y}.}
$$
These expressions apply except at the <poles> $y=0$, $x=\pi/2+k\pi$ with integer $k$, where the original <tangent function> is undefined.