What is the value of $\ln \left(e^{2 \pi i}\right)$ I know that $$e^{2 \pi  i} = 1$$
so by taking the natural logarithm on both sides
$$\ln \left(e^{2 \pi  i}\right)=\ln (1)=0$$
however, why isn't this $2 \pi i$ as expected? Is it beacuse logarithms can only provide real values?
 A: The problem is that in the complex numbers, the exponential function is no longer one-to-one, since $\exp(z + 2\pi i) = \exp z$. Thus it's no longer possible to define a proper inverse for it: if all I tell you about a number is its exponential, you don't know how many multiples of $2\pi i$ I've added.
There are a few possible fixes to this. One is to consider the logarithm as a multi-valued function, or more correctly a relation, so that $\log 1 "=" 2\pi i k$ for every integer $k$. This is sometimes convenient e.g. when solving equations.
Another is to define not the logarithm but a logarithm, that is to pick an arbitrary choice of imaginary part to get a well-defined function you can use. You may, for example, declare you're interested only in value with imaginary part between $-\pi$ and $\pi$ (let's say exclusive on the lower bound and inclusive on the upper) or $0$ and $2\pi$, or anything else you like. Sadly, this forces your logarithm function to be discontinuous, but if you slice a line out of the complex plane from $0$ down the negative reals, you can at least make the logarithm continuous everywhere other than on that line – you'll have something like imaginary part $-\pi$ on one side of the line and imaginary part $\pi$ on the other side. This is called a "branch cut" and you are choosing a "branch" of the logarithm.
A: $$e^x=e^{2n\pi ix}\forall n\in\mathbb{Z}$$
To see why, use Euler's formula: $e^{\pi i}=-1\implies e^{2n\pi i}=1\forall n\in\mathbb{Z}$. So, $e^{2\pi i}=e^{0}=1$. Now, for a function to have an inverse, it must be injective, which $e^x$ isn't (for the above reason). To resolve this, you can view the natural logarithm as a function whose domain is a Riemann surface that covers $\mathbb{C}\setminus\{0\}$. Or, you can restrict the domain of $e^x$ to a region that does not contain $x,y$ such that $y-x=2n\pi i,\forall n\in\mathbb{Z}$. This causes the "problem" you mentioned above.
A: Note that
$$e^{2\pi i}=e^{2\pi k i}$$
So you get
$$\ln (e^{2\pi i})=2\pi k i,\quad k\in\mathbb{Z}$$
with the principal value for $k=0$.
