Prove $\int_{0}^{+\infty} \frac{\exp(-t)}{\sqrt{\pi t}} \exp (-\frac{x^2}{4t}) ~\mathrm{d} t = e^{-|x|}$ Let $x \in \mathbb{R}$. Prove $\int_{0}^{+\infty} \frac{\exp(-t)}{\sqrt{\pi t}} \exp (-\frac{x^2}{4t}) ~\mathrm{d} t = e^{-|x|}$.
The teacher in the class said if we know the characteristic function of a probability distribution, it's easy to calculate this integral. But if we don't, it could be difficult.
 A: Here's an approach that uses (mostly) basic calculus.
Lemma (Glasser's master theorem): If $f$ is continuous, $\int_{-\infty}^{\infty} f$ exists, and $a\ge 0$ then

$$\int_{-\infty}^{\infty} f\left(x-\frac{\color{green}{a}}{x}\right)\, \mathrm{d}x=\int_{-\infty}^{\infty} f(x)\, \mathrm{d}x$$

Proof: If $a =0$ there's nothing to be done. If $a>0$ then
\begin{align}
\int_{-\infty}^{\infty} f\left(x-\frac{a}{x}\right)\, \mathrm{d}x &= \int_{-\infty}^{0} f\left(x-\frac{a}{x}\right)\, \mathrm{d}x + \int_{0}^{\infty} f\left(x-\frac{a}{x}\right)\, \mathrm{d}x\\
\overset{\begin{align}\color{purple}{x}&\color{purple}{\to -e^{-x}}\\\color{darkblue}{x}&\color{darkblue}{\to ae^x}\end{align}}{=} &\int_{\color{purple}{-\infty}}^{{\color{purple}{\infty}}} f\left(a e^{x}-e^{-x}  \right)e^{-x}\, \mathrm{d}x + \int_{\color{darkblue}{-\infty}}^{{\color{darkblue}{\infty}}} f\left(a e^{x}-e^{-x}  \right)ae^x\, \mathrm{d}x\\
& = \int_{-\infty}^{\infty} f\left(a e^{x}-e^{-x}  \right)\left(ae^x + e^{-x} \right)\mathrm{d}x\\
 \overset{ae^x - e^{-x}\to x}{=}&\int_{-\infty}^{\infty} f(x)\, \mathrm{d}x
\end{align}

Now we tackle your problem
\begin{align}
\int_{0}^{\infty}\frac{e^{-\left(t+ \frac{z^2}{4t}\right)}}{\sqrt{t}} \, \mathrm{d}t \overset{x = \sqrt{t}}{=} \color{purple}{2}\int_{0}^{\infty}e^{-\left(x^2 + \frac{z^2}{4x^2} \right)} \overset{\color{purple}{\text{Even}}}{=}
e^{-|z|}\int_{\color{purple}{-\infty}}^{\infty} e^{-\left(x -\frac{\color{green}{|z|}}{\color{green}{2}x} \right)^2}\, \mathrm{d}x \overset{\text{Lemma}}{=} e^{-|z|}\int_{-\infty}^{\infty}e^{-x^2}\mathrm{d}x = \sqrt{\pi}e^{-|z|}
\end{align}
where on the last step we use the very famous result $\int_{-\infty}^{\infty} e^{-x^2}\mathrm{d}x = \sqrt{\pi}$.

This integral is nice since it's also a special property of the Modified Bessel function of the Second Kind, which has the integral representation
$$
K_\nu(z) = \frac{1}{2} \left(\frac{z}{2} \right)^\nu \int_{0}^{\infty}e^{-\left(t+ \frac{z^2}{4t}\right)} t^{-\nu-1}\,\mathrm{d}t
$$
So using your result we get the immediate corollary
$$
K_{-\frac12}(z) = \sqrt{\frac{\pi}{2 z}}e^{-z}
$$
for $z>0$.
