Logarithm of complex numbers I am studying complex analysis and in our class we took the following identities:
$$\lim_{\epsilon \rightarrow 0^+}\log(-x + i\epsilon)= \log(x) + i\pi$$
$$\lim_{\epsilon \rightarrow 0^+}\log(-x - i\epsilon)= \log(x) - i\pi$$
where $x>0$ and the following commentary it is said:
An important property of the logarithm was used in the complex. If one approaches the branching section along the negative real axis from above or below, then the imaginary part of the function value jumps by $2\pi$.
Can someone explain to me these identities and this comment that was said?
 A: Given $z\in\mathbb{C}\setminus \{0\}$, we define the logarithm of $z$ to be the set
$$
log(z)=\{w\in \mathbb{C}: e^w=z\}
$$
As the esponential function is strictly positive and strictly growing in the positive real numbers, we have that for every $x\in\mathbb{R}^+$, there is a unique logarithm, that we denote as $Log(x)$. 
So if $w=x+iy\in log(z)$, then $|z|=|e^w|=e^{Re(w)}=e^x$, in consequence $Log(|z|)=x$ and also that $z=e^w=e^{x+iy}=e^xe^{iy}=|z|e^{iy}$, that means $y\in arg(z)$.
By the other side, we have that $e^w\iff \exists k\in\mathbb{Z}:w=2\pi ik$, then $e^{w-Log(|z|)-iy}=1$, which means that $w-Log(|z|)-iy=2\pi ik$ for some $k\in\mathbb{Z}$, that is $w=Log(|z|)+i(y+2k\pi)$, but as we know arguments of $z$ come in this fashion, we conclude that
$$
log(z)=Log(|z|)+i\;arg(z)=\{Log(|z|)+iy :y\in arg(z)\}
$$
We have the problem of defining a continuous logarithm over the complex numbers, which translates as the problem of defining a continuous argument over the complex numbers. But we know that this isn't possible, so we need to restrict ourselves in some subspace in which everything works fine. Let $\alpha\in\mathbb{R}$ we define $H_\alpha=\{-re^{i\alpha}:r\geq 0\}$. We can now define $$Arg_\alpha(z)=arg(z)\cap ]\alpha-\pi,\alpha+\pi[$$
Which defines a unique argument for $z\in\mathbb{C}\setminus H_\alpha$. And in the same fashion we define $$log_\alpha(z)=Log(|z|)+i\;Arg_\alpha(z)$$
Which defines a unique logarithm for $z\in\mathbb{C}\setminus H_\alpha$.
Now take $\alpha=\pi$, this election may seem arbitrary but if you try to interpret the set $\mathbb{C}\setminus H_\pi$, you will is not completely arbitrary, altough it is not the only option, but maybe the most natural.
We have that $log_\pi(-x+i\epsilon)=Log(|-x+i\epsilon|)+i\;Arg_\pi(-x+i\epsilon)$, but this function $log_\pi$ is continuous, so $$\underset{\epsilon \to 0}{\lim}log_\pi(-x+i\epsilon)=Log(\underset{\epsilon \to 0}{\lim}|-x+i\epsilon|)+i\;Arg_\pi(\underset{\epsilon \to 0}{\lim}-x+i\epsilon)=Log(x)+i\pi$$
And as we have said if we take out the "$\alpha$" we have that the arguments come in the form $\theta+i2k\pi$ where $\theta$ is an argument and $k\in\mathbb{Z}$, so in fact for every integer $k$
$$\underset{\epsilon \to 0}{\lim}log(-x+i\epsilon)=Log(x)+i\pi(2k+1)$$
If you take $k=0$ and $k=-1$ you'll get your desired results. This last equality is not totally formal because of the fact that you can't define the logarithm over $\mathbb{C}\setminus\{0\}$.

Extra:
Now I will elaborate on the fact, if you don't the proof of it, that there is no continuous function $f:C(0,1)\to\mathbb{R}$ such that $f(z)\in arg(z)$.
Proof:
Suppose there is such a function with these properties, then for every $z\in C(0,1)$ we have that $z=\cos(z)+i\sin(z)$, so $f$ is injective. As we have supposed that $f$ is continuous and we have that $C(0,1)$ is connected and compact, we have that $f(C(0,1))\subset \mathbb{R}$ is connected and compact, so there are $a,b\in\mathbb{R}$ such that $a<b$ and $f(C(0,1))=[a,b]$. Now, let $c\in]a,b[$ and $w\in C(0,1)$ such that $f(w)=c$, then $f(C(0,1)\setminus\{w\})=[a,c[\cup ]c,b]$, but the former set is a connected set and the latter is not, and this is not possible because $f$ is continuous, so we get a contradiction.
A: I think the log you are referring to is the one defined on $\Omega = \mathbb{C} \setminus (-\infty, 0]$. Let $\Sigma = \{(x, y) \in \mathbb{C} : y \in (-\pi, \pi)\}$. Note that $\exp : \Sigma \to \Omega$ is bijective; the way to see this is to visualize in terms of polar coordinates: $e^z = e^xe^{iy}$. Then $\log : \Omega \to \Sigma$ is defined as the inverse to $\exp$. The fact that $\log$ is holomorphic follows from the inverse function theorem since $e^z \neq 0$.
Now if you look in polar coordinates for $z = re^{i\theta} \in \Omega$, then $\log(z) = \log(r) + i\theta$. Now for $z$ in the left half plane, above the real axis, $\theta$ is near $\pi$, while for $z$ below the real axis, $\theta$ is near $-\pi$. And as $z$ approaches the real axis from above, $\theta$ approaches $\pi$, while if $z$ approaches the real axis from below, $\theta$ approaches $-\pi$. This explains those limit identities.
