Complex analysis integral residuum

I suspect that the author meant to write $\pi i$ times the residue terms. And the residue at $z=a$ is given by

$$\lim_{z\to a}(z-a)\frac{e^{iz}}{a^2-z^2}=-\frac{e^{ia}}{2a}$$


So, in order to provide support of your analysis, let's start from scratch and evaluate the closed contour integral

$$\begin{align} 0&=\oint_C\frac{e^{iz}}{a^2-z^2}\,dz\\\\ &=\int_{-R}^{-a-r}\frac{e^{ix}}{a^2-x^2}\,dx+\int_\pi^0 \frac{e^{i(-a+re^{i\phi})}}{a^2-(-a+re^{i\phi})^2}\,ire^{i\phi}\,d\phi\\\\ &+\int_{-a+r}^{a-r}\frac{e^{ix}}{a^2-x^2}\,dx+\int_\pi^0 \frac{e^{i(a+re^{i\phi})}}{a^2-(a+re^{i\phi})^2}\,ire^{i\phi}\,d\phi\\\\ &+\int_{a+r}^R \frac{e^{ix}}{a^2-x^2}\,dx+\int_0^\pi \frac{e^{iRe^{i\phi}}}{a^2-(Re^{i\phi})^2}\,iRe^{i\phi}\,d\phi\tag1 \end{align}$$

The last integral on the right-hand side of $(1)$ vanishes as $R\to\infty$. And as $r\to 0^+$, the second and fourth integrals on the right-hand side of $(1)$ approach $-\frac{i\pi e^{-ia}}{2a}$ and $\frac{i\pi e^{ia}}{2a}$, respectively.

We find, therefore, that the Cauchy Principal Value of the integral of interest is

$$\begin{align} \text{PV}\left(\int_{-\infty}^\infty \frac{\cos(x)}{a^2-x^2}\,dx\right)&=\lim_{r\to 0^+}\left(\int_{-\infty}^{-a-r}\frac{\sin(x)}{a^2-x^2}\,dx+\int_{-a+r}^{a-r}\frac{\sin(x)}{a^2-x^2}\,dx\\\\ +\int_{a+r}^\infty\frac{\sin(x)}{a^2-x^2}\,dx\right)\\\\ &=\frac{\pi\sin(a)}{a} \end{align}$$

as was to be shown.


$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$ $\ds{\large\mbox{An}\ alternative:}$


With $\ds{\Lambda > \verts{a}}$: \begin{align} &\bbox[5px,#ffd]{\mrm{P.V.} \int_{-\Lambda}^{\Lambda}{\cos\pars{x} \over a^{2} - x^{2}}\,\dd x} \\[5mm] = &\ {1 \over 2\verts{a}}\,\mrm{P.V.}\int_{-\Lambda}^{\Lambda}{\cos\pars{x} \over x + \verts{a}}\,\dd x - {1 \over 2\verts{a}}\,\mrm{P.V.}\int_{-\Lambda}^{\Lambda}{\cos\pars{x} \over x - \verts{a}}\,\dd x \\[5mm] = &\ {1 \over 2\verts{a}}\,\mrm{P.V.}\int_{-\Lambda + \verts{a}}^{\Lambda + \verts{a}} {\cos\pars{x - \verts{a}} \over x}\,\dd x + \pars{~\verts{a} \mapsto -\verts{a}~} \\[5mm] = &\ {1 \over 2\verts{a}}\,\mrm{P.V.}\int_{-\Lambda + \verts{a}}^{\Lambda - \verts{a}} {\cos\pars{x - \verts{a}} \over x}\,\dd x \\[2mm] + &\ {1 \over 2\verts{a}} \int_{\Lambda - \verts{a}}^{\Lambda + \verts{a}} {\cos\pars{x - \verts{a}} \over x}\,\dd x+ \pars{~\verts{a} \mapsto -\verts{a}~} \\[5mm] = &\ {1 \over 2\verts{a}}\int_{0}^{\Lambda - \verts{a}} {\cos\pars{x - \verts{a}} - \cos\pars{-x - \verts{a}} \over x}\,\dd x \\[2mm] + &\ {1 \over 2\verts{a}} \int_{\Lambda - \verts{a}}^{\Lambda + \verts{a}} {\cos\pars{x - \verts{a}} \over x}\,\dd x+ \pars{~\verts{a} \mapsto -\verts{a}~} \\[5mm] = &\ {\sin\pars{\verts{a}} \over \verts{a}}\ \underbrace{\int_{0}^{\Lambda - \verts{a}} {\sin\pars{x} \over x}\,\dd x} _{\ds{\to \color{red}{\large{\pi \over 2}}\ \mrm{as}\ \Lambda\ \to \infty}} \\[2mm] + &\ {1 \over 2\verts{a}}\ \underbrace{\int_{\Lambda - \verts{a}}^{\Lambda + \verts{a}} {\cos\pars{x - \verts{a}} \over x}\,\dd x} _{\ds{\color{red}{\Large\S :}\ \to \color{red}{\large 0}\ \mrm{as}\ \Lambda\ \to \infty}} + \pars{~\verts{a} \mapsto -\verts{a}~} \end{align}
Then, as $\ds{\Lambda \to \infty}$, \begin{align} &\bbox[5px,#ffd]{\mrm{P.V.} \int_{-\infty}^{\infty}{\cos\pars{x} \over a^{2} - x^{2}}\,\dd x} = {\pi\sin\pars{\verts{a}} \over 2\verts{a}} + {\pi\sin\pars{-\verts{a}} \over 2\pars{-\verts{a}}} \\[5mm] = &\ \bbx{\pi\,{\sin\pars{a} \over a}} \\ & \end{align}
$\ds{\color{red}{\Large\S :}}$ Note that \begin{align} 0 & < \verts{\int_{\Lambda - \verts{a}}^{\Lambda + \verts{a}} {\cos\pars{x - \verts{a}} \over x}\,\dd x} \\[5mm] & < \int_{\Lambda - \verts{a}}^{\Lambda + \verts{a}} {\dd x \over x} = \ln\pars{\Lambda + \verts{a} \over \Lambda - \verts{a}} \,\,\,\stackrel{\mrm{as}\ \Lambda\ \to\ \infty}{\to}\,\,\, \color{red}{\Large 0} \end{align}