how to derive the steps of this intergral for the product of two exponential terms? For homework, I was looking for closed form solutions of exponential functions from this wiki site.
https://en.wikipedia.org/wiki/List_of_integrals_of_exponential_functions
But I was not sure how to derive the steps for this particular integral,
$\int_{-\infty}^{\infty}e^{-ax^{2}}e^{-\frac{b}{x^{2}}}dx={\sqrt {\frac {\pi }{a}}}e^{-2{\sqrt {ab}}}\quad (a,b>0)$
I am fairly new to normal distribution but I assume this has to do with Taylor series..
Any pointers would be greatly appreciated!
 A: *

*By differentiation under the integral sign, the integral $I(a, b)$ satisfies the PDE
\begin{equation}
\frac{\partial}{\partial a}\frac{\partial}{\partial b} I(a,b) = I(a,b)
\end{equation}

*The substitution $t = x \sqrt{a}$ shows that $I(a,b)$ has the form $a^{-1/2}\varphi(a^{1/2} b^{1/2})$ for some function $\varphi$.

*Substituting this form into the PDE yields the ODE
\begin{equation}
\varphi''(u) = 4 \varphi(u)
\end{equation}
Hence $\varphi(u) = A e^{2 u}+ B e^{-2u}$ for some constants $A$ and $B$.

*As $I(a,b)\to 0$ when $b\to \infty$, we have $A=0$

*As $I(a, 0)= \sqrt{\pi/a}$, we have $B =\sqrt{\pi}$, hence $\varphi(u) = \sqrt{\pi}e^{-2u}$
It follows that
\begin{equation}
I(a, b) = \frac{1}{\sqrt{a}}\varphi(\sqrt{a}\sqrt{b}) = \frac{1}{\sqrt{a}}\sqrt{\pi}e^{-2\sqrt{a b}}
\end{equation}
A: Start completing the square
$$ax^2+\frac b {x^2}=a\left(x+\sqrt{\frac{b}{a}}\frac{1}{x}\right)^2-2\sqrt{ab}$$
$$x+\sqrt{\frac{b}{a}}\frac{1}{x}=t \implies x=\frac{1}{2} \left(t\pm\sqrt{t^2+4 \sqrt{\frac{b}{a}}}\right)$$
Making the calculation for the $\color{red}{-}$ branch.
This makes now the integrand to be
$$\frac{1}{2} e^{2 a \sqrt{\frac{b}{a}}} \left(e^{-a t^2}-\frac{t e^{-a t^2}}{\sqrt{t^2-4 \sqrt{\frac{b}{a}}}}\right)$$ Now, we face two "simple" integrals
$$\int e^{-a t^2}\,dt=\frac{\sqrt{\pi } \text{erf}\left(\sqrt{a} t\right)}{2 \sqrt{a}}$$
$$\int \frac{t e^{-a t^2}}{\sqrt{t^2-4 \sqrt{\frac{b}{a}}}}\,dt=\frac{\sqrt{\pi } e^{-4 a \sqrt{\frac{b}{a}}} \text{erf}\left(\sqrt{a} \sqrt{t^2-4
   \sqrt{\frac{b}{a}}}\right)}{2 \sqrt{a}}$$
Back to $x$
$$\frac{\sqrt{\pi } e^{-2 \sqrt{a} \sqrt{b}}
   \left(\text{erfc}\left(\frac{\sqrt{b}}{x}-\sqrt{a} x\right)-e^{4 \sqrt{a}
   \sqrt{b}} \text{erfc}\left(\sqrt{a} x+\frac{\sqrt{b}}{x}\right)\right)}{4
   \sqrt{a}}$$ Integrateing between $-p$ and $+p$
$$\frac{\sqrt{\pi } e^{-2 \sqrt{a} \sqrt{b}} \left(e^{4 \sqrt{a} \sqrt{b}}
   \text{erf}\left(\sqrt{a}
   p+\frac{\sqrt{b}}{p}\right)-\text{erf}\left(\frac{\sqrt{b}}{p}-\sqrt{a}
   p\right)\right)}{2 \sqrt{a}}$$ and the limit is
$$\frac{\sqrt{\pi } e^{-2 \sqrt{a b}}}{\sqrt{a}}$$
A: As an elementary method, consider
$$
\int_\mathbb{R} e^{-ax^2}e^{-bx^{-2}} \; dx = \int_\mathbb{R} e^{-(\sqrt{a}x - \sqrt{b}/x)^2} e^{-2\sqrt{ab}}\; dx
$$
notice that we changed the sign inside the completed square. A clear observation is that the function is even, so we only need to solve half of it, i.e. find
$$
I/2 = \int_0^\infty e^{-(\sqrt{a}x - \sqrt{b}/x)^2} \; dx
$$
Consider a change of variable
$$
u = \sqrt{\frac{b}{a}}/x, du = -\sqrt{\frac{b}{a}}/x^2 = -\sqrt{\frac{b}{a}}u^{-2}
$$
so
$$
I/2 = \int_0^\infty e^{-(\sqrt{a}x - \sqrt{b}/x)^2} \; dx = \sqrt{\frac{b}{a}}\int_0^\infty e^{-(\sqrt{a}u - \sqrt{b}/u)^2} \frac{1}{u^2} \; du
$$
The negative sign that comes from change of variable cancels out as we changed the order of the integration bounds. As both integral are equal, we can in fact sum them to get
$$
I = \int_0^\infty e^{-(\sqrt{a}x - \sqrt{b}/x)^2} \left(1+ \sqrt{\frac{b}{a}}\frac{1}{x^2}\right) \; dx
$$
Did you see where are we going?
$$
w = \sqrt{a}x - \sqrt{b}/x, dw = (\sqrt{a} + \sqrt{b}/x^2 )dx
$$
this change of variable will result in
$$
I = \int_0^\infty e^{-(\sqrt{a}x - \sqrt{b}/x)^2} \left(1+ \sqrt{\frac{b}{a}}x^2\right) \; dx = \frac{1}{\sqrt{a}} \int_\mathbb{R} e^{-w^2} dw = \sqrt{\frac{\pi}{a}}
$$
:)
$$
\int_\mathbb{R} e^{-ax^2}e^{-bx^{-2}} \; dx = \int_\mathbb{R} e^{-(\sqrt{a}x - \sqrt{b}/x)^2}e^{-2\sqrt{ab}} \; dx = \sqrt{\frac{\pi}{a}} e^{-2\sqrt{ab}}
$$
