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$

If $C_r$ denotes the upper half circle from $r$ to $-r$, then the map $\gamma:t\in [0,\pi]\mapsto re^{it}$ is a good oriented parametrization of $C_r$.
Thus, you just have to compute this integrale using $\gamma$ and see what happens. 


*

*First of all, for any $r>0$, $$\int_{C_r}\dfrac{dz}{z}=\int_{0}^{\pi} \dfrac{ire^{it}}{re^{it}}dt=i\pi$$

*Then, for the second integral, you get : $$\int_{C_r}\dfrac{e^{iz}-1}{z}dz=i\int_{0}^{\pi}[\exp(rie^{it})-1]dt.$$
Since $|e^{\omega}-1|\leq e^{|\omega|}-1$ for any $\omega\in \mathbb C$, you get for any $r>0$ : $$\left|\int_{C_r}\dfrac{e^{iz}-1}{z}dz\right|\leq \int_{0}^{\pi}|\exp(rie^{it})-1|dt\leq \int_{0}^{\pi}|e^r-1|dt=\pi(e^r-1)$$
But the right hand side goes to $0$ when $r$ goes to $0$ so you finaly obtain $$\lim_{r\to 0} \int_{C_r}\dfrac{dz}{z} + \int_{C_r}\dfrac{e^{iz}-1}{z}dz =i\pi.$$

