I have to compute the following contour integration using indented semicircular contour: $$\int_{0}^{\infty} \frac{\cos x}{a^2-x^2}\,dx$$
I have this approach. I consider the integral $\int fz)\,dz$, where $f(z) = \frac{e^{iz}}{a^2-z^2}$. I chose the contour $C$ to be a larger semicircle $|z| = R$. I find the pole of $f(z)$ on real axis which is $z=-a, a$. The larger semi circle now has tow indentations of semicircles at $z=-a$ and $z=a$ with radii $r_1$ and $r_2$ respectively.
From Cauchy's Residue theorem, I have: $$\int f(z)dz = 0$$ $$or, \int_{-R}^{-(r_1+a)}f(x)\,dx+\int_{\gamma_1}f(z)\,dz+\int_{-(a-r_1)}^{a-r_2}f(x)\, dx+\int_{\gamma_2}f(z)\,dz+\int_{a+r_2}^{R}f(x)\,dx+\int_{\Gamma}f(z)\,dz = 0$$
Taking $r_1,r_2 \rightarrow 0$ & $R\rightarrow \infty$, I summarize the above equation as follows: $$\int_{-\infty}^{\infty}f(x)\,dx+lim_{r_1 \rightarrow 0}\int_{\gamma_1}f(z)\,dz+lim_{r_2 \rightarrow 0}\int_{\gamma_2}f(z)\,dz+lim_{R \rightarrow \infty}\int_{\Gamma}f(z)\,dz = 0$$
Using Jordan's lemma, I can prove that $lim_{R \rightarrow \infty}\int_{\Gamma}f(z)\,dz = 0$. But I cannot really work with the indents' integrals. Like for the first indentation, I have(considering $z=r_1e^{i\theta}$): $$\lim_{r_1\rightarrow0}\int_{\gamma_1}\frac{e^{iz}}{a^2-z^2}\,dz$$ $$\text{or, } \lim_{r_1\rightarrow0}\int_{\pi}^{0}\frac{e^{ir_1e^{i\theta}}}{a^2-{r_1}^2e^{i2\theta}}\,ir_1e^{i\theta}d\theta$$
This term now cannot be reduced by me. So any help in this regard is appreciated. Thank you.
