solution to a general integral $\int_0^\infty \frac{\cos(tx)}{x^2+k^2}e^{-sx}dx$

You can perform a further reduction: $$ J(\alpha,\beta)=\int_{0}^{+\infty}\frac{\cos(\alpha u)}{u^2+1}e^{-\beta u}\,du =\text{Re}\int_{0}^{+\infty}\frac{1}{u^2+1}e^{-(\beta-\alpha i)u}\,du$$ thus all you need is the Laplace transform of $\frac{1}{u^2+1}$: $$ K(c) = \int_{0}^{+\infty}\frac{e^{-cu}}{u^2+1}=\int_{0}^{\pi/2}\exp\left(-c\tan\theta\right)\,d\theta,\qquad c\in\mathbb{C},\text{Re}(c)\geq 0.$$ By the self-adjointness of the Laplace transform and the fact that $\mathcal{L}^{-1}\left(\frac{1}{u^2+1}\right)=\sin(s), \mathcal{L}(e^{-cu})=\frac{1}{c+s} $ we have $$ K(c) = \int_{0}^{+\infty}\frac{\sin(s)}{s+c} \,ds $$ and the relation with the sine and cosine integrals is now obvious.


In the same lines as Jack D´Aurizio did, start with your integral

$$J\left(a,b,c\right)=\int_{0}^{\infty} \frac{\cos(ax)e^{-cx}}{b^{2}+x^{2}}dx$$

which can be rewriten as

$$J\left(a,b,c\right)=\text{Re}\left\{\frac{1}{b}\int_{0}^{\infty} \frac{e^{-x(b(c-ia))}}{1+x^{2}}dx\right\}$$

set $(b(c-ia))=s$ to get

$$\text{I}\left(s,b\right)=\frac{1}{b}\int_{0}^{\infty} \frac{e^{-sx}}{1+x^{2}}dx$$

to simplify, consider the version

$$\text{I}\left(s\right)=\int_{0}^{\infty} \frac{e^{-sx}}{1+x^{2}}dx$$

Now differentiate $\text{I}\left(s\right)$ with respect to $s$ twice to get

$$I''\left(s\right)=\int_{0}^{\infty} \frac{x^{2}e^{-sx}}{1+x^{2}}dx$$

Adding $I''\left(s\right)$ and $I\left(s\right)$

$$I''\left(s\right)+I\left(s\right)=\int_{0}^{\infty} e^{-sx}dx=\frac{1}{s}$$

This non homogeneous second order ODE can be solved by the method of variation of parameters. The two linear independent solutions of the homogeneous equations are given by

$$u_{1}(s)=\cos(s)$$

$$u_{2}(s)=\sin(s)$$

The the general solution is given by

$$I_{g}\left(s\right)=A(s)\cos(s)+B(s)\sin(s)$$

where

$$A(s)=-\int_{}^{}\frac{1}{W}u_{2}(s)f(s)ds$$ and

$$B(s)=\int_{}^{}\frac{1}{W}u_{1}(s)f(s)ds $$

$W=u_{1}u_{2}'-u_{2}u_{1}'$ is the Wronskian which is $1$ here, and $f(s)=\frac{1}{s}$

putting all together

$$I_{g}\left(s\right)=-\cos(s)\int_{}^{s}\frac{\sin(t)}{t}dt +\sin(s)\int_{}^{s}\frac{\cos(t)}{t}dt$$

But $I(s)$ and all its derivatives vanish at $s=\infty$, and therefore

$$I_{g}\left(s\right)=\cos(s)\int_{s}^{\infty}\frac{\sin(t)}{t}dt -\sin(s)\int_{s}^{\infty}\frac{\cos(t)}{t}dt$$

$$\boxed{I\left(s\right)=\sin(s)Ci(s)+\cos(s)\left(\frac{\pi}{2}-Si(s)\right)}$$