Integrating $\frac {e^{iz}}{z}$ over a semicircle around $0$ of radius $\epsilon$ I am trying to find the value of $\int_{-\infty}^{\infty} \frac{\sin (x)}{x}$ using residue theorem and a contour with a kink around $0$. For this, I need to find $\int_{C_\epsilon} \frac {e^{iz}} {z}$ where $C_\epsilon$ is the semicircle centred at $0$ with radius $\epsilon$ from $-\epsilon$ to $\epsilon$. I guess it is equal to half the residue of $\frac {e^{iz}} {z}$ at $0$. Is this true? Any help is appreciated.
 A: There is a theorem sometimes referred to as the fractional residue theorem.
If $z_{0}$  is a simple pole of $f(z)$, and $C_{\epsilon}$ is an arc of the circle $|z-z_{0}| = \epsilon$ of angle $\alpha$, then $\displaystyle\lim_{\epsilon \to 0} \int_{C_{\epsilon}} f(z) \ dz = \alpha i \ \text{Res} [f(z),z_{0}]$.
A: Note that $\dfrac{e^{iz}}{z}=\dfrac1z+O(1)$. Integrating this counter-clockwise around the semicircle of radius $\epsilon$ is
$$
\begin{align}
\int_\gamma\frac{e^{iz}}{z}\,\mathrm{d}z
&=\int_0^\pi\left(\frac1\epsilon e^{-i\theta}+O(1)\right)\,\epsilon\,ie^{i\theta}\,\mathrm{d}\theta\\
&=\int_0^\pi\frac1\epsilon e^{-i\theta}\,\epsilon\,ie^{i\theta}\,\mathrm{d}\theta
+\int_0^\pi O(1)\,\epsilon\,ie^{i\theta}\,\mathrm{d}\theta\\[9pt]
&=\pi i+O(\epsilon)\\[12pt]
\end{align}
$$
The residue at $0$ is $1$, so integrating around the full circle would give $2\pi i$.
A: Another approach you can use is Jordan's lemma. They provided you the hint to use $\int_{C_\epsilon} \frac {e^{iz}} {z}$ because the integral $\int_{-\infty}^{\infty} \frac{\sin (x)}{x}$ is an improper integral and does not satisfy the conditions of p.v. We can use Jordan's lemma here. Thus we have $$\int_{C_\epsilon} \frac {e^{iz}} {z}$$ take the limit of the pole, which is at $z=0$. Apply Jordan lemma, and since we used the identity $e^{iz}$ to replace $\sin(z)$, you will take the imaginary parts and then you are through. 
