$$
\int_{0}^{\infty}\frac{a\cos{(cx)}}{a^2+x^2}\mathrm dx = ?
$$
Advanced Calculus
This is the well-known Laplace integral.
WLOG, assume $a,c > 0$
Let the integral be $I (a,c)$, then
$$
\newcommand{\abs}[1]{\left\vert #1 \right\vert}
\newcommand\rme{\mathrm e}
\newcommand\imu{\mathrm i}
\newcommand\diff{\,\mathrm d}
\DeclareMathOperator\sgn{sgn}
\renewcommand \epsilon \varepsilon
\newcommand\trans{^{\mathsf T}}
\newcommand\F {\mathbb F}
\newcommand\Z{\mathbb Z}
\newcommand\R{\Bbb R}
\newcommand \N {\Bbb N}
\newcommand\Q{\Bbb Q}
\renewcommand \epsilon \varepsilon
\DeclareMathOperator{\Ker}{Ker}
\newcommand\bm\boldsymbol
$$
$$
I (a, 0) = \int_0^{+\infty} \frac {a \diff x}{a^2 + x^2} = \frac \pi 2.
$$
Taking the derivative,
$$
\partial_c I = \int_0^{+\infty} \frac {-ax \sin (cx)}{x^2 + a^2}\diff x,
$$
and by using the fact
$$
\int_0^{+\infty} \frac {\sin (cx)}x \diff x = \frac \pi 2,
$$
we get
$$
\partial_c I + a\frac \pi 2 = a^2 \int_0^{+\infty} \frac {a\sin (cx)} {x (a^2 + x^2)}\diff x,
$$
hence
$$
\partial ^2_{cc} I = a^2\int_0^{+\infty} \frac {a\cos (cx)}{a^2 + x^2} = a^2 I(a,c).
$$
Solve this ODE: the general solution is
$$
I = C_1 \rme^{ac} + C_2 \rme ^{-ac},
$$
and since
$$
\abs I \leqslant \int_0^{+\infty} \frac {a \diff x}{a^2 + x^2} = \frac \pi {2},
$$
$C_1$ shall be $0$, otherwise $\lim_{a \to +\infty} I = +\infty$, contradiction. Then according to $I(a, 0) = \pi /2$, we get
$$
C_2 = \frac \pi 2,
$$
then
$$
\boxed {I (a,c) = \frac \pi 2 \rme^{-ac}}\ .
$$
Complex Analysis
Consider
$$
f(z) = \frac {\exp (\imu cz)}{z^2 + a^2} \quad [a >0, c>0],
$$
and a contour $\gamma_R + I$ where $I$ is the interval $[-R, R]$ and $\gamma_R$ is the semicircle centering at $0$ with the radius $R$ that starts from $R + 0\imu$, where $R$ is large enough s.t. $R > a$. By the Cauchy integral theorem,
$$
\int_{\gamma_R + I} f(z) \diff z = \int_{\abs {z - \imu a} = \varepsilon } f(z) \diff z = \int_{\abs {z -\imu a} } \frac {\dfrac {\exp (\imu cz)} {z+\imu a}} {z - \imu a} \diff z \stackrel ! = \imu 2\pi \cdot \frac {\exp (\imu c\cdot \imu a)}{2 \imu a} = \frac \pi a \rme ^{-ca}, (\bigstar)
$$
where $!$ is the application of the Cauchy Integral Formula.
Now on $\gamma_R$, $z = R \rme^{\imu t}$ for $t \in [0, \pi]$, then
$$
\abs {f(z)} = \abs {\frac {\rme^{\imu cz}}{a^2 + z^2} }= \abs {\frac {\exp (\imu c (R \cos t + \imu R \sin t))}{a^2 + R^2 \rme^{\imu 2t}} } = \frac {\exp (-cR \sin t)}{\abs {R^2 \rme^{\imu 2t} + a^2}} \leqslant \frac {\exp (-cR \sin t)}{R^2 - a^2} \leqslant \frac 1{R^2 - a^2} \xrightarrow {R \to +\infty} 0,
$$
thus by taking the limit $R \to +\infty$ on the both side of $(\bigstar)$,
$$
\boxed {\int_{-\infty}^{+\infty} \frac {\rme^{\imu cx}}{x^2 + a^2 } \diff x = \frac \pi a \rme ^{-ac} }\ .
$$
Take the real part, we get
$$
\int_{-\infty}^{+\infty} \frac {a \cos (cx)}{x^2 + a^2 } \diff x = \frac \pi 1 \rme ^{-ac},
$$
and since $\cos (\cdot)$ is even, we get
$$
\boxed {I (a,c) = \frac \pi 2 \rme^{-ac}}\ .
$$