If $z=x+iy$ is the answer of the equation $\cos(z)=-3$ What is the value of $x$? 
If $z=x+iy$ is the answer of the equation $\cos(z)=-3$. What is the value
of $x$?
$1)x=2k\pi-\frac{\pi}2 , k\in \mathbb{Z}$
$2)x=2k\pi+\frac{\pi}2 , k\in \mathbb{Z}$
$3)x=k\pi+\frac{\pi}2 , k\in \mathbb{Z}$
$4)x=k\pi-\frac{\pi}2 , k\in \mathbb{Z}$

I saw a similar question here, and I tried to solve it but I got stock at a point. Here is my try:
$$\cos z=\frac{e^{iz}+e^{-iz}}{2}=-3\Rightarrow e^{iz}+e^{-iz}+6=0$$
After using the substitution $e^{iz}=t$  we get $t^2+6t+1=0$. Hence $e^{i(z+2k\pi)}= -3\pm\sqrt8$ and
$$i(z+2k\pi)=\ln(-3\pm2\sqrt2)$$
From here I don't know how to continue.

\begin{align}
z &= 2\pi k \pm \cos^{-1}(-3), \; k \in \mathbb{Z}\\
&= 2\pi k \pm \frac{\pi}{2} \pm \sin^{-1}(3)\\
& = 2\pi k \pm \frac{\pi}{2} \pm i\ln\left(\sqrt{1 - 3^2} - 3i\right)\\
& = 2\pi k \pm \frac{\pi}{2} \pm i\ln\left(i\left(2\sqrt{2} - 3\right)\right)\\
& = 2\pi k \pm \frac{\pi}{2} \pm i\ln(i) \pm i\ln\left(2\sqrt{2} - 3\right)\\
& = 2\pi k \pm \frac{\pi}{2} \mp \frac{\pi}{2} \pm i\ln\left(2\sqrt{2} - 3\right)\\
& = 2\pi k \pm i\ln\left(2\sqrt{2} - 3\right)\\
& = 2\pi k \mp \pi  \pm i\ln\left(3 - 2\sqrt{2}\right)
\end{align}
$$\therefore \boxed{\Re(z) = (2n + 1)\pi, \; n \in \mathbb{Z}}$$
Reference: Inverse trigonometric functions: Logarithmic forms
