Find real and imaginary parts of $\cot(\frac{\pi}{4}-i\ln 2)$.
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!
$$\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}$$
note that $$L=\cot (\pi/4-i\ln(2)))=\frac{1}{\tan (\pi /4 -i\ln(2))}=\frac{1+\tan (i \ln(2))}{1-\tan (i\ln(2))}=\frac{1+i\tanh (\ln(2))}{1-i\tanh (\ln(2))}$$ Where we've used the fact that $\tan(ix)=i\tanh(x)$. Therefore after multiplying and dividing by $1+i\tanh(\ln(2))$ we get $$\cot (\pi/4-i\ln(2))) = \frac{ (1+i\tanh(\ln(2))^2}{1+\tanh ^2(\ln (2))} = \frac{1-\tanh ^2 (\ln(2))+2i\tanh (\ln (2))}{1+\tanh ^2(\ln (2))}=\frac{1-\tanh^2(\ln(2))}{1+\tanh^2(\ln(2))}+\frac{2\tanh(\ln(2))}{1+\tanh ^2(\ln (2))}i$$ Using the fact that $\tanh (\ln(x))=\frac{x^2-1}{x^2+1}$ we get $$L=\frac{1-9/25}{1+9/25}-\frac{2(3/5)}{1+9/25}i= \frac{8}{17}+\frac{15}{17}i$$ These are the correct real and imaginary parts.