I saw a solution of how to use complex analysis to integrate $\int_{-\infty}^{\infty} \frac{\cos x}{x} dx$ which uses the contour that traverses an upper semi circle of radius $R$ in the positive direction followed by the line segment from $-R$ to $-\epsilon$ then the upper semi circle of radius $\epsilon$ in the negative direction followed by the line segment from $\epsilon$ to $R$. Everything makes sense to me except computing $\lim_{\epsilon \rightarrow 0} \int_{C_\epsilon} \frac{e^{iz}}{z}dz$. Everywhere I have looked, the limit is computed by taking the limit inside the integral. Why can this be done? I think it has to do with dominated convergence but what is the dominating integrable function?
Thanks in advance.
To be completely rigorous and apply the dominated convergence theorem, we need to convert the function family $\{e^{ire^{i\theta}}\}_{r>0}$ to a sequence $\{e^{\frac{i}{n}e^{i\theta}}\}_{n=1}^{\infty}$ via the change of variable $r=\frac{1}{n}$. Keeping in mind that we are on the measure space $[-\pi,0]$, it is not too hard to see that $|e^{-\frac{1}{n}\sin\theta}| \leq e^{-\sin\left(\frac{-\pi}{2}\right)} = e$ on our measure space. So now we are ready to show the crucial inequality which will allow us to apply the dominated convergence theorem:
$$|e^{\frac{i}{n}e^{i\theta}}| = |e^{-\frac{1}{n}\sin\theta}| < e \text{ for all } n \in \mathbb{N} \text{ and } \theta \in [-\pi,0]$$
Thus, we can use the constant function $g \equiv e$ as our dominating function. This is integrable because we are on a finite measure space.