# How to calculate this improper integral $\int_0^{+\infty} e^{-(ax+\frac{b}{x})^2}\mathrm{d}x$?

How to calculate this improper integral $$\int_0^{+\infty} e^{-(ax+\frac{b}{x})^2}\mathrm{d}x ?$$

-
Please refrain from using the displaystyle mode in the title. –  sos440 Mar 15 at 1:47

Note that

$$\int_{0}^{\infty} e^{-\left( ax + \frac{b}{x} \right)^{2}} \, dx = e^{-4ab} \int_{0}^{\infty} e^{-\left( ax - \frac{b}{x} \right)^{2}} \, dx.$$

This shows that it suffices to consider the integral on the right-hand side. Associated to this we consider a more general situation. Let assume $a > 0, b > 0$ and $f$ is an integrable even function. With the substitution

$$x = \frac{b}{at} \quad \Longrightarrow \quad dx = -\frac{b}{at^2} \, dt,$$

we obtain

$$\int_{0}^{\infty} f\left( ax - \frac{b}{x} \right) \, dx = \int_{0}^{\infty} \frac{b}{at^2} f\left( at - \frac{b}{t} \right) \, dt.$$

Thus if we denote this common value by $I$, then

\begin{align*} 2aI = \int_{0}^{\infty} \left( a + \frac{b}{x^2} \right) f\left( ax - \frac{b}{x} \right) \, dx = \int_{-\infty}^{\infty} f (u) \, du, \end{align*}

where we used the substitution

$$u = ax - \frac{b}{x}, \quad du = \left( a + \frac{b}{x^2} \right) \, dx.$$

Therefore we obtain the following identity.

$$\int_{0}^{\infty} f\left( ax - \frac{b}{x} \right) \, dx = \frac{1}{2a} \int_{-\infty}^{\infty} f (x) \, dx$$

This gives us

$$\int_{0}^{\infty} e^{-\left( ax + \frac{b}{x} \right)^{2}} \, dx = \frac{\sqrt{\pi}}{2a} e^{-4ab}.$$

-