Solving $e^z = 1 $ in complex plane I am solving the equation $e^z = 1 $ in $\mathbb{C}$. The book says, other than $z = 0$, $z = 2 \pi k i$ for $ k \in \mathbb{Z}$ is also the solution. It explains the solution by saying that $e^z$ is periodic function so that
$1 = e^z = e^{2\pi k i}$
However I want to know how the identity is derived to solve other cases such as $e^z = 2 $.

Let $z=x+iy$ where $x, y$ are real.  Then $e^z = 2$ means
$$
e^x\cos y + i e^x\sin y = 2,
\\
e^x\cos y = 2\quad\text{and}\quad e^x\sin y = 0
$$
Now $e^x \ne 0$ for all $x$, so from $e^x\sin y = 0$ we get $\sin y = 0$, and thus
$y = n\pi$ for some $ n \in \mathbb Z$.  From this we get $\cos y = \cos(n\pi) = (-1)^n$.  But $e^x > 0$ for all $x$, so we must have $n$ even, say $n=2k$.  Finally,
$2 = e^x\cos y = e^x\cos(2k\pi)= e^x$, so $x=\ln 2$.  Conclusion: $z = \ln 2 + i2k\pi$.
