I want to calculate $\displaystyle{ \int_{-\infty}^{\infty}\frac{\cos\left(\omega x\right)}{x^{2} + 25}\,{\rm d}x\,, \quad}$ for $\omega \in \mathbb{R}$
I thought of integrating along the line segment $\left[-R, R\right]$ and the semicircle $C = \left\{z: \left\vert z\right\vert = R, \; \Im z\geq 0\right\}$. In my book this is said to be a wrong method, but I don't understand why ( I even get the same result ).
Can someone explain me why this is wrong, and how it should be done instead?
$\newcommand{\+}{^{\dagger}} \newcommand{\angles}[1]{\left\langle #1 \right\rangle} \newcommand{\braces}[1]{\left\lbrace #1 \right\rbrace} \newcommand{\bracks}[1]{\left\lbrack #1 \right\rbrack} \newcommand{\dd}{{\rm d}} \newcommand{\isdiv}{\,\left.\right\vert\,} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\equalby}[1]{{#1 \atop {= \atop \vphantom{\huge A}}}} \newcommand{\expo}[1]{\,{\rm e}^{#1}\,} \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,} \newcommand{\ic}{{\rm i}} \newcommand{\imp}{\Longrightarrow} \newcommand{\ket}[1]{\left\vert #1\right\rangle} \newcommand{\pars}[1]{\left( #1 \right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\pp}{{\cal P}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,#2\,}\,} \newcommand{\sech}{\,{\rm sech}} \newcommand{\sgn}{\,{\rm sgn}} \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}} \newcommand{\ul}[1]{\underline{#1}} \newcommand{\verts}[1]{\left\vert #1 \right\vert} \newcommand{\yy}{\Longleftrightarrow}$ In this question the integral is solved by a few methods. One of them is by user17762 who set a differential equation for $\ds{{\rm I}\pars{\omega} \equiv \int_{-\infty}^{\infty}{\cos\pars{\omega x} \over x^{2} + 1}\,\dd x}$. Namely, ${\rm I}''\pars{\omega} - 25\,{\rm I}\pars{\omega} = -2\pi\,\delta\pars{\omega}$. The equation in the above mentioned question is slightly different due to a different parameters but both cases are similar after a suitable scaling. The above mentioned user solves the equation without the $-2\delta\pars{\omega}$ term and later use some arguments to arrive to the correct solution. One comment ( by Ron Gordon ) pointed out the existence of the Dirac delta term in the right hand side which indicates that ${\rm I}\pars{\omega}$ is a Green function. Here we'll solve the above mentioned differential equation by taking explicitly into account the Dirac delta term.
Then $${\large \int_{-\infty}^{\infty}{\cos\pars{\omega x} \over x^{2} + 25}\,\dd x = {1 \over5}\,\pi\expo{-5\verts{\omega}}} $$