How to evaluate $\int_{0}^{\infty}\exp(-x^2-1/x^2)dx$?

The integral you want to evaluate is $\mathrm e^{-2}I$, where $I=\int\limits_0^{+\infty}\mathrm e^{-(x-1/x)^2}\mathrm dx$. Let us compute $I$. The change of variable $z=1/x$ yields $z\gt0$ and $\mathrm dz=z^2\mathrm dx$, hence $I=\int\limits_0^{+\infty}\mathrm e^{-(z-1/z)^2}\mathrm dz/z^2$. Summing these two expressions of $I$, one gets $2I=\int\limits_0^{+\infty}\left(1+1/x^2\right)\mathrm e^{-(x-1/x)^2}\mathrm dx$. The change of variable $u=x-1/x$ yields $u$ in the whole real line and $\mathrm du=\left(1+1/x^2\right)\mathrm dx$, hence $2I=\int\limits_{-\infty}^{+\infty}\mathrm e^{-u^2}\mathrm du$. Finally, this last integral is $\sqrt\pi$, hence $$ \color{red}{\int\limits_0^{+\infty}\mathrm e^{-x^2-1/x^2}\mathrm dx=\frac{\sqrt\pi}{2\mathrm e^2}}. $$