TITLE: Q: Find all values of $z such that cos(z) is purely imaginary
QUESTION [5 upvotes]: I haven't got a memo for the answer of this question. So I just wanted to find out if my approach and answer is correct and sufficient.
Thank you.
Let $b\in \mathbb{R}\backslash\{0\}$
$$\begin{align}cos(z)=ib\\
\frac{1}{2}(e^{iz}+e^{-iz})=ib\\
e^{iz}+e^{-iz}=2ib
\end{align}$$
Let $w=e^{iz}$, then
$$\begin{align}
w+w^{-1}=2ib\\
w^2 -2ibw + 1=0
\end{align}$$
$w=\frac{2ib \pm \sqrt{(-2ib)^2 -4(1)(1)}}{2(1)}=ib \pm\frac{\sqrt{-4b^2-4}}{2}=ib \pm\frac{2i\sqrt{b^2+1}}{2}=i(b\pm\sqrt{b^2+1})$
For $w=e^{iz}=i(b+\sqrt{b^2+1})$
$$\begin{align}
e^{iz}=i(b+\sqrt{b^2+1})\\
e^{ix}e^{-y}=e^{i\frac{\pi}{2}}(b+\sqrt{b^2+1})\\
\end{align}$$
Thus, $x=\frac{\pi}{2}+2n\pi$, $\forall n\in \mathbb{Z}$, and $y=-ln(b+\sqrt{b^2+1})$
For $w=e^{iz}=i(b-\sqrt{b^2+1})$
$$\begin{align}
e^{iz}=-i(-b+\sqrt{b^2+1})\\
e^{ix}e^{-y}=e^{-i\frac{\pi}{2}}(-b+\sqrt{b^2+1})\\
\end{align}$$
Thus, $x=-\frac{\pi}{2}+2n\pi$, $\forall n\in \mathbb{Z}$, and $y=-ln(-b+\sqrt{b^2+1})$
Therefore $cos(z)$ is purely imaginary when $\\$
$z=\frac{\pi}{2}+2n\pi+i(-ln(b+\sqrt{b^2+1}))$
or, when
$z=-\frac{\pi}{2}+2n\pi+i(-ln(-b+\sqrt{b^2+1}))$ $\forall n\in \mathbb{Z},b\in \mathbb{R}\backslash\{0\}$

REPLY [2 votes]: By using addition formula and $\begin{cases}\cos(ia)=\cosh(a)\\\sin(ia)=i\sinh(a)\end{cases}\quad$ you get for $(x,y)\in\mathbb R^2$:
$$\cos(z)=\cos(x+iy)=\cos(x)\cosh(y)-i\sin(x)\sinh(y)$$
Since all of $\cos(x),\sin(x),\cosh(y),\sinh(y)$ are real numbers, this quantity is purely imaginary when either $\cos(x)$ or $\cosh(y)$ is zero.
But $\cosh(y)\ge 1$, so the only possibility is $x=\frac{\pi}2+k\pi,\ k\in\mathbb Z$ and $$\cos(z)=-i\,(-1)^k\sinh(y)$$

Note that $\sinh^{-1}(b)=\ln(b+\sqrt{b^2+1})$ (see https://en.wikipedia.org/wiki/Hyperbolic_functions) appear in your solution but you don't really need this calculation, as $\sinh$ is a bijective function of the reals, we just can have anything for $y=\Im(z)$.
Also you have $2n\pi$ while you should have $n\pi$, check where you made the mistake.