Integrating using Laplace Transforms

Let $f(x)$ denote the integral, and assume temporarily that $x > 0$. This makes no difference since $f(x)$ is even by definition. Then its Laplace transform $\mathcal{L}f(s)$ defines a continuous function on $s \in (0, \infty)$ (in fact, it defines an analytic function on $\Re(s) > 0$). Thus we may assume further that $s \neq 1$ and then rely on the continuity argument. Then

\begin{align*} \mathcal{L}f(s) &= \int_{0}^{\infty} f(x)e^{-sx} \, dx = \int_{0}^{\infty} \int_{0}^{\infty} \frac{\cos(xt)}{1+t^2} e^{-sx} \, dtdx \\ &\stackrel{*}{=} \int_{0}^{\infty} \int_{0}^{\infty} \frac{\cos(xt)}{1+t^2} e^{-sx} \, dxdt \\ &= \int_{0}^{\infty} \frac{1}{1+t^2} \frac{s}{s^2+t^2} \, dt \\ &= \frac{s}{1-s^2}\int_{0}^{\infty} \left( \frac{1}{s^2+t^2} - \frac{1}{1+t^2} \right) \, dt \\ &= \frac{s}{1-s^2} \frac{\pi}{2} \left( \frac{1}{s} - 1 \right) = \frac{\pi}{2} \frac{1}{1+s}. \end{align*}

Here, the change of order of integration $(*)$ is justified by the dominated convergence theorem. Though we proved this for $s \neq 1$, it remains valid by continuity argument as mentioned above. Then by the uniqueness of the Laplace transform, we find that

$$ f(x) = \frac{\pi}{2}e^{-x}. $$

Therefore we have

$$ \int_{0}^{\infty} \frac{\cos(xt)}{1+t^2} \, dt = \frac{\pi}{2} e^{-\left|x\right|}. $$


Laplace approach : $$ I= \int\limits_{0}^\infty {\cos(xt)\over 1+t^2}\,\mathrm dt=\left[ \int\limits_{0}^\infty {\cos(xt)\over 1+t^2} e^{-st}\,\mathrm dt \right]_{s=0} =\mathcal{L}\left[ {\cos(xt)\over 1+t^2} \right]_{s=0}$$ $$ f(t)=\frac{\cos(xt)}{1+t^2} $$ $$ (1+t^2)f(t)=\cos(xt) $$ $$ \downarrow\mathcal{L}$$ $$ \frac{\mathrm d^2}{\mathrm ds^2}F(s)+F(s)=\frac{s}{s^2+x^2} $$ We have second order differential equation, after we find $ F(s) $ we put zero instead of $ s $.

Where we have used : $$ \boxed{\mathcal{L} \big\{ t^nf(t)\big\}=(-1)^n \dfrac{\mathrm d^n}{\mathrm ds^n}F(s)} $$ $$ \boxed{\mathcal{L}\big\{\cos(wt) \big\} = \dfrac{s}{s^2+w^2}} $$


We can use residue theorm to solve this problem

$$ \int_{-\infty}^{+\infty} cos(ax) f(x)dx=Real \left[ \oint_{c^+} e^{iaz} f(z)dz \right] = Real \left[ 2\pi i \sum_{i=1}^n R_i^+\right] $$ $$ c^+ : Upper \space half \space plane \rightarrow uhp $$ $$ c^- : Lower \space half \space plane \rightarrow lhp $$ $$ R_i^+=Residue(e^{iaz}f(z),z=z_i) \space; \space z_i \space are \space singularities \space in \space c^+ $$ $$ I= \int_{0}^\infty {\cos(xt)\over 1+t^2}dt=\frac{1}{2}\int_{-\infty}^\infty {\cos(xt)\over 1+t^2}dt $$ $$ I=\frac{1}{2}Real \left[ \oint_{c^+} \frac{e^{ixz}}{1+z^2} dz \right] =\frac{1}{2} Real \left[ 2\pi i .R_1 \right] $$ $$ Singularities : 1+z^2=0 \rightarrow \begin{cases} z_1=i &\mbox{Acceptable (uhp)} \\ z_2=-i & \mbox{Ineligible (lhp) } \end{cases} $$

$$ R_1 = Residue(\frac{e^{ixz}}{1+z^2},z=i)=\lim_{z \rightarrow i} \frac{(z-i)e^{ixz}}{(z-i)(z+i)}=\frac{e^{-x}}{2i} $$ so: $$ I=\frac{1}{2} Real \left[ 2\pi i .R_1 \right]=\frac{1}{2} Real \left[ 2\pi i .\frac{e^{-x}}{2i} \right] =\frac{\pi}{2} e^{-x}$$