Find real and imaginary parts of $\cot(\frac{\pi}{4}-i\ln 2)$.

complex numberscomplex-analysis

Question: Find real and imaginary parts of $\cot(\frac{\pi}{4}-i\ln 2)$.

My attempt: There are quite a few algebra steps in my solution, so here is the summary: We can write $\cot(\frac{\pi}{4}-i\ln 2)$ as $\frac{\cos(\frac{\pi}{4}-i\ln 2)}{\sin(\frac{\pi}{4}-i\ln 2)}=i\frac{e^{i(\frac{\pi}{4}-i\ln 2)}+e^{-i(\frac{\pi}{4}-i\ln 2)}}{e^{i(\frac{\pi}{4}-i\ln 2)}-e^{-i(\frac{\pi}{4}-i\ln 2)}}=i(\frac{i\sqrt{2}}{\sqrt{2}})=-1$. So, the imaginary part is $0$ and the real part is $-1$. I believe this to be true, but maybe I went wrong somewhere? Also, would there be a nice way for me to verify this answer using some other elementary technique? Thank you!

Best Answer

$$\cot \left(\frac{\pi }{4}-a\right)=\frac{\sin (a)+\cos (a)}{\cos (a)-\sin (a)}$$ $$\cot \left(\frac{\pi }{4}-ia\right)=\frac{\sin (ia)+\cos (ia)}{\cos (ia)-\sin (ia)}=\frac{\cosh (a)+i \sinh (a)}{\cosh (a)-i \sinh (a)}=\text{sech}(2 a)+i \tanh (2 a)$$ Now make $a=\log(b)$ $$\cot \left(\frac{\pi }{4}-i\log(b)\right)=\frac{1+i b^2}{b^2+i}=\frac{2 b^2}{b^4+1}+i\,\frac{b^4-1}{b^4+1}$$