compute
$\int_0^{\infty}\frac{\cos x}{x^2+a^2}dx$
in complex plane without using the residue
I know that one way is to calculate this integral
$\int_{c(r)}\dfrac{e^{iz}}{z^2+a^2}$
over half a circle, ( assume a≠0 here). At the end use the fact that $\cos x$ is the real part of $e^{ix}$
i've come to this
$\int_{c(r)}\dfrac{e^{iz}}{z^2+a^2}=\int_{-R}^R\dfrac{e^{iz}}{z^2+a^2}+\int_{\lambda(r)}\dfrac{e^{iz}}{z^2+a^2} $
But at this point they use the ressidue, Is there a way to calculate it without using the residue?
I know that Jordan's lema can be useful
$\lim_{R\longrightarrow \infty}\int_{C(R)}f(z)e^{iz}dz=0$
$$\frac{\cos (x)}{x^2+a^2}=\frac{\cos (x)}{(x+ia)(x-ia)}=\frac i{2a}\Bigg[\frac{\cos (x)}{x+i a}-\frac{\cos (x)}{x-i a} \Bigg]$$
$$I_k=\int \frac{\cos (x)}{x+k}\,dx$$ Make $x+k=t$ and expand the cosine $$I_k=\sin (k)\int\frac{ \sin (t)}{t}dt+\cos (k)\int\frac{ \cos (t)}{t}dt$$ $$I_k=\sin (k)\, \text{Si}(t)+ \cos (k)\,\text{Ci}(t)+C$$ Then $$\int\frac{\cos (x)}{x^2+a^2}\,dx=\frac{\sinh (a) (\text{Si}(i a-x)-\text{Si}(i a+x))-i \cosh (a) (\text{Ci}(x-i a)-\text{Ci}(i a+x))}{2 a}$$ $$\int_0^\infty\frac{\cos (x)}{x^2+a^2}\,dx=\frac{\pi }{2 a}e^{-a}$$