Find all complex numbers $z$ such that $e^z=1+2i$ I'm not sure how to do this. I would really love it if someone would talk me through it. I know we must somehow solve 
$$
z=\log1+2i
$$
Another idea I had is that we know that $e^{2\pi i}=1$ and $e^{\pi i/2}=i$, so
$$
1+2i=e^{2\pi i}+2e^{\pi i/2}
$$
and maybe this would help but I don't yet see how.
 A: We know by Euler's Formula that $$re^{i\theta} = r\cos\theta +ir\sin\theta$$$r$ will be equal to the magnitude of the complex number, i.e., $$\sqrt{\textrm{Re}(z)^2 + \textrm{Im}(z)^2} = \sqrt 5$$So, we look for all $\theta$ such that $\cos\theta = \frac1{\sqrt 5}$ and $\sin\theta = \frac2{\sqrt 5}$. Can you solve this from here?
A: First of all, note that\begin{align}1+2i&=\sqrt5\left(\frac1{\sqrt5}+\frac2{\sqrt5}i\right)\\&=\sqrt5e^{\arccos\left(\frac1{\sqrt5}\right)i}\\&=e^{\log\sqrt5+\arccos\left(\frac1{\sqrt5}\right)i}.\end{align}So, now you have one solution of the equation $e^z=1+2i$:$$z=\log\sqrt5+\arccos\left(\frac1{\sqrt5}\right)i.$$And I suppose that you know that $e^z=1$ if and only if $z=2\pi ni$, for some integer $n$. Now, put it all together…
A: Use that $$e^z=e^x\cos(y)+ie^x\sin(y)$$ if $$z=x+iy$$
and you will get
$$e^x\cos(y)-1+i(e^x\sin(y)-2)=0$$
A: We note that
$1 + 2i = \sqrt 5 \left (\dfrac{1}{\sqrt 5} + i\dfrac{2}{\sqrt 5} \right); \tag 1$
set
$z = x + iy; \tag 2$
then 
$e^z = e^{x + iy} = e^x e^{iy} = e^x(\cos y + i \sin y) = \sqrt 5 \left (\dfrac{1}{\sqrt 5} + i\dfrac{2}{\sqrt 5} \right); \tag 4$
thus the modulus of $e^z$ is
$\vert e^z \vert = \vert e^x(\cos y + i \sin y) \vert = \vert e^x \vert \vert \cos y + i \sin y \vert = e^x = \sqrt 5; \tag 5$
the only real $x$ satisfying this equation is
$x = \ln \sqrt 5 = \dfrac{1}{2} \ln 5; \tag 6$
returning to (4) and using (5):
$e^{iy} = \cos y + i \sin y = \dfrac{1}{\sqrt 5} + i \dfrac{2}{\sqrt 5}; \tag 7$
it follows from (7) that there is a unique
$y_0 \in \left [0, \dfrac{\pi}{2} \right ] \tag 8$
with
$\tan y_0 = \dfrac{\sin y_0}{\cos y_0} = 2 \tag 9$
and
$e^{iy_0} = \cos y_0 + i\sin y_0 = \dfrac{1}{\sqrt 5} + i \dfrac{2}{\sqrt 5}; \tag{10}$
setting 
$z = x + iy \tag{11}$
with $x$ and $y$ as in (5)-(6) and (10), respectively, we write
$z = \ln \sqrt 5 + iy_0; \tag{12}$
we check (12):
$e^z = e^{\ln \sqrt 5 + iy_0} = e^{\ln \sqrt 5}e^{iy_0} = \sqrt 5 ( \cos y_0 + i \sin y_0) = \sqrt 5 \left ( \dfrac{1}{\sqrt 5} + i \dfrac{2}{\sqrt 5} \right ) = 1 + 2i; \tag{13}$
having found $x \in \Bbb R$ and $y_0 \in [0, 2\pi]$ satisfying (13), we may search for other solutions.  If $w = \sigma + i\omega \in \Bbb C$ is such that
$e^{\sigma + i\omega} = e^w = e^z = e^{x + iy_0} = 1 + 2i, \tag{14}$
then it follows exactly as above that
$e^\sigma = \sqrt 5 = e^x, \; \sigma = \ln \sqrt 5 = x; \tag{15}$
then
$e^{i\omega} = e^{iy_0} = \dfrac{1}{\sqrt 5} + i \dfrac{2}{\sqrt 5} \tag{16}$
or
$e^{i(\omega - y_0)} = 1; \tag{17}$
it follows that
$\omega - y_0 = 2n\pi, \; n \in \Bbb Z, \tag{18}$
whence
$\omega = y_0 + 2n \pi, \; n \in \Bbb Z; \tag{19}$
it is easy to see that every $\omega$ given by (19) satisfies
$e^{i\omega} = e^{i(y_0 + 2n\pi)} = e^{iy_0} e^{2n \pi i} = e^{iy_0}; \tag{20}$
we have seen that (19) is both necessary and sufficient for
$e^z = e^{x + iy} = e^{x + i\omega} = 1 + 2i; \tag{21}$
thus every solution is of the form
$z = \ln \sqrt 5 + i(y_0 + 2n\pi). \tag{22}$
