As the title says, I have to solve: $\operatorname{cotan}(z) = 2 + i$
I have gotten this far:
$$\tan(z) = \frac{1}{2+i} = \frac{2}{5} - \frac{1}{5}i$$
I thought, maybe writing $z=x+iy$ would work. I found the following online (via complex exponential): $$\tan(x+iy) = \frac{\sin(2x)+i\sinh(2y)}{\cosh(2y)+\cos(2x)}.$$
But equating the real and imaginary parts does not really give me something I can work with (or is it just rough work?). Any hints or tips would be appreciated!
The way I do these problems is writing $\tan$ as a quotient of complex exponentials. Let $w=\frac{2}{5}-\frac{1}{5}i$, then \begin{align} \frac{\sin z}{\cos z} &= w \\ \frac{e^{iz}-e^{-iz}}{e^{iz}+e^{-iz}} &= iw \\ \frac{1-e^{-2iz}}{1+e^{-2iz}} &=iw \\ 1-e^{-2iz} &= iw(1+e^{-2iz}), \text{ so } e^{-2iz} = \frac{1-iw}{1+iw}. \end{align} Let's first calculate that last fraction: $$\frac{1-iw}{1+iw} = \frac{1}{2}-\frac{1}{2}i = \frac{1}{2}\sqrt{2}e^{-i\pi/4+2k\pi i}$$ I'm sure you can verify this. Now taking the complex logarithm on both sides yields \begin{align} -2iz &= \text{Log}\left(\frac{1}{2}\sqrt{2}e^{-i\pi/4+2k\pi i}\right) = \ln\frac{1}{2}\sqrt{2} + i\left(-\frac{\pi}{4}+2\pi k\right)\\ z &= \left(\frac{\pi}{8} + k\pi\right)+\frac{1}{4}i\ln 2 \end{align}