Definite integrals with complex analysis Can anyone explain me why:
$$\int_{C_r}\frac{1}{z} \mathrm{d}z+\int_{C_r}\frac{e^{iz}-1}{z}\mathrm{d}z\stackrel{r \to 0^+}{=}\pi i$$
$C_r$ is half circle from $r$ to $-r$

First integral you can calculate this way:
$\displaystyle{\int_{C_r} \frac{1}{z} dz=\int_{0}^{\pi} \frac{ie^{it}}{e^{it}}dt=\pi i}$
Now consider integral:
$\displaystyle{\int_{C_r \cup [-r,r]}\frac{e^z-1}{z}}$
It's zero because $\frac{e^z-1}{z}$ is analytic/holomorpfic function, so:
$\displaystyle{\int_{C_r}\frac{e^z-1}{z}=-\int_{-r}^{r}} \frac{e^x-1}{x} dx$
Next $\frac{e^x-1}{x}$ is continuous at $x=0$, so it's bounded near zero, so by Cauchy inequality:
$\displaystyle{|\int_{-r}^{r} \frac{e^x-1}{x} dx| \leq |2r\sup_{x \in [-r,r]}\frac{e^x-1}{x}}| \to_{r \to 0} 0$
