How to calculate $ \int_0^\infty \exp(-\frac{a^2}{x^2}-x^2)~\mathrm{d}x $ suppose $a>0$, how to integrate:
$$
\int_0^\infty  e^{-a^2/x^2}e^{-x^2}~\mathrm{d}x
$$
 A: In general,
\begin{align}
\int_{-\infty}^{\infty}f\left(x-\frac{1}{x}\right) dx
&= \int_{-\infty}^{0}f\left(x-\frac{1}{x}\right) dx+ \int_{0}^{\infty}f\left(x-\frac{1}{x}\right) dx\\
& \overset{t=-\frac1x} = \int^{\infty}_{0}f\left(t-\frac{1}{t}\right) \frac {dt}{t^2}+ \int^{0}_{-\infty}f\left(t-\frac{1}{t}\right) \frac {dt}{t^2}\\
&= \frac12\int_{-\infty}^{0}f\left(t-\frac{1}{t}\right)\left( 1+\frac1{t^2}\right)dt + \frac12\int_{0}^{\infty}f\left(t-\frac{1}{t}\right)\left( 1+\frac1{t^2}\right)dt\\
& \overset{x=t-\frac1t } =\int_{-\infty}^{\infty}f(x)dx
\end{align}
Thus,
$$
\int_0^\infty  e^{-a^2/x^2}e^{-x^2}dx
\overset{ t=\frac x{\sqrt a}}=\frac12\sqrt{a}e^{-2a }\int_{-\infty}^\infty  e^{-a(t-\frac1t)^2 }dt\\
= \frac12\sqrt{a}e^{-2a }\int_{-\infty}^\infty  e^{-a t^2 }dt
= \frac12\sqrt{a}e^{-2a } \cdot \sqrt{\frac\pi a}= \frac12\sqrt{\pi}e^{-2a }
$$
A: We can rewrite the integrand as
$$I = \frac{e^{-2a}}{2}\int_{-\infty}^\infty e^{-\left(x - \frac{a}{x}\right)^2}\:dx$$
because the integrand is even and we can complete the square. Then we can use Glasser's master theorem to assert that
$$I = \frac{e^{-2a}}{2}\int_{-\infty}^\infty e^{-x^2}\:dx = \frac{e^{-2a}\sqrt{\pi}}{2}$$
