Solving a trigonometric equation for purely imaginary numbers

HINT

Use that by Euler’s formula

$$\cos x=\frac{e^{ix}+e^{-ix}}2$$


W.K.T $$\cos(x) = \left(e^{ix} + e^{-ix}\right)/2$$ So, $$\cos(z) = \left(e^{iz} + e^{-iz}\right)/2 = 2$$ $$ \left(e^{iz} + e^{-iz}\right) = 4$$ $$ e^{2iz} +1 = 4e^{iz}$$ $$ y^2-4y+1=0$$ where $$ y= e^{iz}$$ which is a quadratic $$y=\left(\frac{4\pm\sqrt {16-4}}{2}\right)$$ $$e^{iz}=\left(\frac{4\pm\sqrt {16-4}}{2}\right)$$ $$=2\pm \sqrt3$$ $$iz= \ln(2\pm\sqrt3)$$ $$z=-\ln(2\pm\sqrt3)i$$