# Complex analysis integral residuum

I am asked to evaluate, principal value of $$\int_{-\infty}^\infty\frac{\cos(x)}{a^2-x^2} \, dx=\pi \frac{\sin (a)}{a},a>0$$

If we start from $$\oint\limits_{C}\frac{e^{iz}}{a^2-z^2}dz,a>0$$ the line $$C$$ is composed of the half circle $$\Gamma$$, pole circles at $$-a,a, \gamma_1,\gamma_2$$ whose circumferences are ($$r,r_1,r_2$$), and a portion of the $$x$$-axis. If we use the Cauchy remainder theorem, we get $$\begin{split} \int_0^\pi \frac{e^{ir\cos \theta -r\sin \theta}} {a^2-r^2e^{2-\theta}} ire^{i\theta} \, d\theta &+ \int_{-r}^{-a-r_2} f(x) \, dx + J_2 \\ &+ \int_{-a+r_2}^{a-r_1} f(x) \, dx + J_1 + \int_{a+r_1}^r f(x) \, dx = 0 \end{split}$$ Since $$\left|\int_0^\pi \frac{e^{ir\cos \theta -rsin \theta}}{a^2-r^2 e^{2-\theta}}ire^{i\theta} \, d\theta\right|\leq{\frac{\pi r}{r^2-a^2},(r>a)}$$ We get $$\lim_{n \to \infty}\int_0^\pi \frac{e^{ir\cos \theta -r\sin \theta}}{a^2-r^2e^{2-\theta}}ire^{i\theta} \, d\theta=0$$ Evaluating residuum at $$J_{1}$$ and $$J_{2}$$ we get $$J_1=\operatorname{Res}f(a)=\lim_{x \to a}(a-x)\frac{e^{ix}}{(a-x)(a+x)} =\frac{e^{ia}}{2a}$$ and $$J_2= \operatorname{Res}f(-a)=\lim_{x \to -a}(a+x)\frac{e^{ix}}{(a-x)(a+x)}=\frac{e^{-ia}}{2a}$$ In my book the author got $$J_{1}=\frac{\pi i}{2a}e^{ia}\land J_2=-\frac{\pi i}{2a} e^{-ia}$$ Where does the $$\pi i$$ come from ? also, why - in the second one? Is it because the residuum is at $$-a$$? Then, adding those two gives us the result, but still, where does $$\pi$$ come from?

• Im just confused where does the $\pi i$ come from, also the - in the second one. – Vuk Stojiljkovic Sep 25 at 20:25

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.

• Sure. There is a factor of $i$ inside the second and fourth integrals of $(1)$. The integration extends from $\phi=\pi$ to $\phi=0$. Does that help? – Mark Viola Sep 25 at 21:21
• Let me ask something, the values of the integrals, 2 and 4 are the residuums of their functions? Can you evaluate them with great detail? Sorry if im asking a dumb question, im still a bit confused....Even tho i got the right answer...Let me ask again, i evaluate 2 and 4 like this, $$\lim_{z \to a}(z-a)\frac{e^{iz}}{(a-z)(a+z)}=-\frac{e^{ia}}{2a}$$ and i multiply them both with $\pi i$ because the range is $\pi$ and they boith have $i$ in their integral forms? – Vuk Stojiljkovic Sep 25 at 21:37
• I'll evaluate the second one. Note that we have \begin{align} \lim_{r\to 0^+}\int_\pi^0 \frac{e^{i(-a+re^{i\phi})}}{a^2-(-a+re^{i\phi})^2}\,ire^{i\phi}\,d\phi&=-ie^{-ia}\lim_{r\to 0^+}\int_0^\pi \frac{re^{i\phi}e^{ire^{i\phi}}}{re^{i\phi}(2a-re^{i\phi})}\,d\phi\\\\ &=-ie^{-ia}\lim_{r\to 0^+}\int_0^\pi \frac{e^{ire^{i\phi}}}{2a-re^{i\phi}}\,d\phi\\\\ &=-ie^{-ia}\int_0^\pi \frac1{2a}\,d\phi\\\\ &=-\frac{i\pi e^{-ia}}{2a} \end{align} – Mark Viola Sep 25 at 22:05
• I got it! Thank you very much for your help ! I solved the other one and got it all right! – Vuk Stojiljkovic Sep 25 at 22:25
• You're welcome. My pleasure. – Mark Viola Sep 25 at 22:31


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}
• (+1) I like this one my friend. – Mark Viola Sep 26 at 1:27
• Thanks, Mark.${}$ – Felix Marin Sep 26 at 2:37
• @MarkViola Thanks, Mark. – Felix Marin Oct 6 at 16:56
• Of course; my pleasure Felix. – Mark Viola Oct 6 at 16:57

The Cauchy Principal Value $$\mathrm{PV}\int_{-\infty}^\infty\frac{\cos(x)}{a^2-x^2}\,\mathrm{d}x$$ is the integral along a path that looks like this

where the gaps on each side of the points are the same, infinitesimal, size.

To compute the integral along the disjoint contours above, we connect those contours with counter-clockwise semi-circles around the two singularities, which adds $$\pi i$$ times the sum of the residues at those singularities:

Note that \require{cancel} \begin{align} \operatorname*{Res}_{z=a}\left(\frac{\cos(z)}{a^2-z^2}\right) &=\operatorname*{Res}_{z=a}\frac1{2a}\left(\frac{\cos(z)}{a-z}+\cancel{\frac{\cos(z)}{a+z}}\right)\\ &=-\frac{\cos(a)}{2a} \end{align} and \begin{align} \operatorname*{Res}_{z=-a}\left(\frac{\cos(z)}{a^2-z^2}\right) &=\operatorname*{Res}_{z=-a}\frac1{2a}\left(\cancel{\frac{\cos(z)}{a-z}}+\frac{\cos(z)}{a+z}\right)\\ &=\frac{\cos(a)}{2a} \end{align} Thus, the sum of the residues at the singularities is $$0$$.

We now write $$\cos(z)=\frac{e^{iz}+e^{-iz}}2$$ and close the contour with two huge semi-circles:

$$\gamma^-$$ consists of the bumpy contour along the real axis and lower (green) semi-circle. $$\frac12\oint_{\gamma^-}\frac{e^{-iz}}{a^2-z^2}\,\mathrm{d}z=0$$ since there are no singularities inside $$\gamma^-$$.

$$\gamma^+$$ consists of the bumpy contour along the real axis and upper (red) semi-circle. \begin{align} \frac12\oint_{\gamma^+}\frac{e^{iz}}{a^2-z^2}\,\mathrm{d}z &=\frac12\oint_{\gamma^+}\frac{e^{iz}}{2a}\left(\frac1{a-z}+\frac1{a+z}\right)\mathrm{d}z\\ &=\frac{2\pi i}{4a}\left(-e^{ia}+e^{-ia}\right)\\[6pt] &=\frac\pi{a}\sin(a) \end{align} Since the integrals along the semi-circular contours vanish as radius of the circle goes to $$\infty$$, we get that the integral along the bumpy, real-axis contour is $$\int_\text{bumpy}\frac{\cos(z)}{a^2-z^2}\,\mathrm{d}z=\frac\pi{a}\sin(a)$$

The integral along the bumpy, real-axis contour is the principal value integral plus $$\pi i$$ times the sum of the residues at the singularities, which was $$0$$. Therefore, we get that $$\bbox[5px,border:2px solid #C0A000]{\mathrm{PV}\int_{-\infty}^\infty\frac{\cos(x)}{a^2-x^2}\,\mathrm{d}x=\frac\pi{a}\sin(a)}$$

Real Approach \require{cancel} \begin{align} \mathrm{PV}\int_{-\infty}^\infty\frac{\cos(x)}{a^2-x^2}\,\mathrm{d}x &=\mathrm{PV}\int_{-\infty}^\infty\frac{\cos(x)}{2a}\left(\frac1{a-x}+\frac1{a+x}\right)\mathrm{d}x\tag1\\ &=\mathrm{PV}\int_{-\infty}^\infty\frac{\cos(x)}{a}\frac1{a+x}\,\mathrm{d}x\tag2\\ &=\mathrm{PV}\int_{-\infty}^\infty\frac{\cos(x)\cos(a)+\sin(x)\sin(a)}{a}\frac1{x}\,\mathrm{d}x\tag3\\[9pt] &=\frac{\cos(a)}a\,\underbrace{\mathrm{PV}\int_{-\infty}^\infty\frac{\cos(x)}x\,\mathrm{d}x}_0+\frac{\sin(a)}a\,\underbrace{\mathrm{PV}\int_{-\infty}^\infty\frac{\sin(x)}x\,\mathrm{d}x}_\pi\tag4\\ &=\pi\frac{\sin(a)}a\tag5 \end{align} Explanation:
$$(1)$$: partial fractions
$$(2)$$: distribute then substitute $$x\mapsto-x$$ in the left sum
$$(3)$$: substitute $$x\mapsto x-a$$
$$(4)$$: distribute
$$(5)$$: integral of an odd function is $$0$$ and $$\int_{-\infty}^\infty\frac{\sin(x)}{x}\,\mathrm{d}x=\pi$$

Integral of Sinc

This can be tackled in a couple of real analytic ways. One is using equation $$(9)$$ of this answer. Another is \begin{align} \int_{-\infty}^\infty\frac{\sin(x)}x\,\mathrm{d}x &=\color{#C00}{\sum_{k\in\mathbb{Z}}}\int_0^\pi\sin(x)\color{#C00}{\frac{(-1)^k}{x+k\pi}}\,\mathrm{d}x\tag6\\ &=\int_0^\pi\sin(x)\color{#C00}{\csc(x)}\,\mathrm{d}x\tag7\\[9pt] &=\pi\tag8 \end{align} Explanation:
$$(6)$$: use $$\sin(x+\pi)=-\sin(x)$$
$$(7)$$: apply equation $$(25)$$ of this answer
$$(8)$$: integrate