Evaluating $\int_0^\infty\frac{\cos(ax)}{x^2+1}dx$ without complex analysis or Fourier Transform

improper-integrals

I've been trying to see if there are any real methods of evaluating $$I(a)=\int_0^\infty\frac{\cos(ax)}{x^2+1}dx$$ without invoking the Fourier Transform. I thought about differentiating $I(a)$ but it did not lead me anywhere. Are there any ways to evaluate this integral without using complex analysis or Fourier Transform?

Best Answer

Let us write $$J(a)=\int_{-\infty}^\infty\frac{\cos{(ax)}}{x^2+1}\mathrm{d}x=2I(a)$$ Then we have $$\begin{align} J'(a) &=\int_{-\infty}^\infty\frac{\partial}{\partial a}\left(\frac{\cos{(ax)}}{x^2+1}\right)\mathrm{d}x\\ &=\int_{-\infty}^\infty\frac{-x\sin{(ax)}}{x^2+1}\mathrm{d}x\\ &=-\int_{-\infty}^\infty\frac{x^2\sin{(ax)}}{x(x^2+1)}\mathrm{d}x\\ &=-\int_{-\infty}^\infty\frac{(x^2+1-1)\sin{(ax)}}{x(x^2+1)}\mathrm{d}x\\ &=-\int_{-\infty}^\infty\frac{\sin{(ax)}}{x}-\frac{\sin{(ax)}}{x(x^2+1)}\mathrm{d}x\\ &=-\int_{-\infty}^\infty\frac{\sin{(ax)}}{x}+\int_{-\infty}^\infty\frac{\sin{(ax)}}{x(x^2+1)}\mathrm{d}x\\ &=-\pi+\int_{-\infty}^\infty\frac{\sin{(ax)}}{x(x^2+1)}\mathrm{d}x \,\,\text{ for }a\gt0\\ \end{align}$$ Continuing gives $$J''(a)=\int_{-\infty}^\infty\frac{\partial}{\partial a}\left(\frac{\sin{(ax)}}{x(x^2+1)}\right)\mathrm{d}x=J(a)$$ $$\therefore J''(a)-J(a)=0$$ Which allows $J(a)$ to be found by solving the above ODE; $$J(a)=Ae^a+Be^{-a}$$ $$J'(a)=Ae^a-Be^{-a}$$ Then using the initial conditions $J(0)=\pi$ and $J'(0)=-\pi$ gives $$A+B=\pi$$ $$A-B=-\pi$$ $$\implies A=0,B=\pi$$ Hence $$J(a)=\pi e^{-a}\,\,\text{ for }a\gt0$$ As the function $J(a)$ is even we have that $J(a)=J(-a)$ and hence $$J(a)=\pi e^{-|a|} \,\,\text{ for all }a\in\mathbb{R}$$ because the value where $a=0$ is also consistent with the above formula. Thus the function required $I(a)=\frac12J(a)$ is given by $$I(a)=\int_0^\infty\frac{\cos{(ax)}}{x^2+1}\mathrm{d}x=\frac12 \pi e^{-|a|}$$

Related Question