I was trying to calculate the Dirichlet integral using Complex integration and I was trying out a different substitution from the one that is usually employed to solve the problem, i.e. $\operatorname{f}\left(z\right) = {\rm e}^{{\rm i}z}/z$, that is I was trying to use the Residue theorem on $\sin\left(z\right)/z$ on a half circumference centered at the origin, extrema on real axis and radius $R \to \infty$.
- The integral over the entire curve vanishes because the function is analytic on the whole complex plane ( we can consider the analytic extension of the function to remove the singularity at zero ) so I am left calculating $$ \int_{0}^{\pi}{\rm i} \sin\left(R{\rm e}^{{\rm i}\theta}\right) {\rm d}\theta $$ which is the contribution of the contour integral from the half circumference.
- Here is my problem: in the limit $R\to\infty$ the integrand seems to diverge because by writing $$ \sin\left(z\right) = \frac{{\rm e}^{{\rm i}z} - {\rm e}^{-{\rm i}z}}{2{\rm i}} $$ and expanding the terms in the exponents I get a term ${\rm e}^{R\sin\left(\theta\right)}\times$(terms of modulus $1$) from ${\rm e}^{-{\rm i}z}$ whereas the first term contributes to zero in the limit.
Obviously the integral has to be finite, so what am I doing wrong ?.