<s>[INST] solve the equation: $\cos (z) = 1 + i$ , $z \in ℂ$. I want to solve the equation:  $\cos (z) = 1 + i$  , $z \in ℂ$.
I started by saying $\cos (z) = \frac {e^{iz} + e^{-iz}}{2}$.
I am therefore led to solve:
$$e^{iz} + e^{-iz} = 2 + 2i $$ this implies that $$e^{2iz}+1 =(2 + 2i) e^{iz}$$
By setting $x = e^{iz}$
Consider the equation:
$$x^2-(2 + 2i) x + 1 = 0$$
which is equivalent to solving the equation $$ x^2-2 \sqrt{2} e^{i \frac {\pi}{4}} x + 1 = 0$$
then $$ (x- \sqrt{2} e^{i \frac{\pi}{4} })^2 + 1 + 2i = 0$$
We set $$w = x- \sqrt {2} e^{i \frac{\pi}{4}}$$ so $$w^2 = -1-2i$$ But I can't seem to continue. An idea please.
 [/INST] At this point
$x^2-(2 + 2i) x + 1 = 0.$
Applying the quadratic formula:
$x = 1+i \pm \sqrt {2i - 1}:$
$(1+i + \sqrt {2i - 1})(1+i - \sqrt {2i- 1}) = 2i - (2i-1) = 1$
This means we can let $e^{iz} = 1+i + \sqrt {2i - 1}$ and $e^{-iz} = 1+i - \sqrt {2i - 1}$
$iz = \ln (1+i + \sqrt {2i - 1})\\
z = -i\ln (1+i + \sqrt {2i - 1})$
</s>