TITLE: How to prove $\int_{0}^{\infty}\frac{e^{-\left(\sqrt{x}-a/\sqrt{x}\right)^2}}{\sqrt{x}}dx=\sqrt{\pi},\,a>0$?
QUESTION [7 upvotes]: We know that $$\Gamma\left(\frac{1}{2}\right)=\int_{0}^{\infty}\frac{e^{-x}}{\sqrt{x}}dx=\sqrt{\pi}
 $$ but it seems that, for every $a>0
 $ we have $$\int_{0}^{\infty}\frac{e^{-\left(\sqrt{x}-a/\sqrt{x}\right)^{2}}}{\sqrt{x}}dx=\sqrt{\pi}$$ so the additional term $a/\sqrt{x}
 $ doesn't change the value of the integral. How we can prove (or disprove) it? Thank you.

REPLY [7 votes]: Hint. Make the change of variable $u=\sqrt{x}$, $du=\dfrac{dx}{2\sqrt{x}} $, to obtain
$$
\int_0^{+\infty}\frac{e^{-\left(\sqrt{x}-a/\sqrt{x}\right)^{2}}}{\sqrt{x}}dx=2\int_0^{+\infty}e^{-\left(u-a/u\right)^{2}}du=\int_{-\infty}^{+\infty}e^{-\left(u-a/u\right)^{2}}du \tag1
$$
One may then recall that, for any integrable function $f$, we have (see here for a proof):

$$
\int_{-\infty}^{+\infty}f\left(u-\frac{a}{u}\right)\mathrm{d}u=\int_{-\infty}^{+\infty} f(u)\: \mathrm{d}u, \quad a>0. \tag2
$$

Apply it to $f(u)=e^{-u^2}$, you get
$$
\int_{-\infty}^{+\infty}e^{-(u-a/u)^2}\mathrm{d}u=\int_{-\infty}^{+\infty} e^{-u^2} \mathrm{d}u=\color{blue}{\sqrt{\pi}}, \quad a>0, \tag3
$$
giving the desired result.