# Evaluate Gauss-like Integral

Evaluate Integral

$$\int_0^\infty e^{-ay^{2}-\frac{b}{y^2}}dy$$

Where a and b are real and positive.

This integral is eerily similar to the Gaussian integral

$$\int_0^\infty e^{-\alpha x^2}dx = \frac{1}{2} \sqrt{\frac{\pi}{\alpha}}$$

This is an integral I have come across as a step in a problem doing some homework for Advanced Statistics... Not sure where to begin.

• From $-\infty$ to $+\infty$, the value is $~e^{-2\sqrt{ab}}\cdot\sqrt{\dfrac\pi a}$ – Lucian May 8 '14 at 21:02
• If that is true then the integral is $1/2$ that value since its symmetric around $y=0$. – Winther May 8 '14 at 21:26
• In general, $\displaystyle\int_0^\infty\exp\bigg(-ax^n-\dfrac b{x^n}\bigg)dx=\dfrac{2\cdot\sqrt[2n]{\dfrac ba}\cdot\text{BesselK}\bigg(\dfrac1n,\sqrt{2ab}\bigg)}n\quad$ See Bessel function for more details. – Lucian May 9 '14 at 0:37

Substitute $u=ay-\frac by$, then $a^2y^2+\frac{b^2}{y^2}=2ab+u^2$. Furthermore, $y=\frac{u+\sqrt{u^2+4ab}}{2a}$. Therefore, \begin{align} \int_0^\infty e^{-a^2y^2-\frac{b^2}{y^2}}\,\mathrm{d}y &=\frac1{2ae^{2ab}}\int_{-\infty}^\infty e^{-u^2}\,\mathrm{d}(u+\sqrt{u^2+4ab})\\ &=\frac1{2ae^{2ab}}\int_{-\infty}^\infty e^{-u^2}\,\mathrm{d}u +\frac1{2ae^{2ab}}\int_{-\infty}^\infty e^{-u^2}\,\mathrm{d}\sqrt{u^2+4ab}\\ &=\frac{\sqrt\pi}{2ae^{2ab}}+0 \end{align}
• For $b=0$ you should recover the old result. Maybe $\sqrt{a}$ in the denominator? Edit: Sorry see you use $a\to a^2$ and $b\to b^2$ compared to the original expr. – Winther May 8 '14 at 21:35
This answer is taken from my answer here. \begin{align} \int_{v=0}^\infty \exp\left(-av^2-\frac{b}{v^2}\right)\,dv&=\int_{v=0}^\infty \exp\left(-a\left(v^2+\frac{b}{av^2}\right)\right)\,dv\\ &=\int_{v=0}^\infty \exp\left(-a\left(v^2-2\sqrt{\frac{b}{a}}+\frac{b}{av^2}+2\sqrt{\frac{b}{a}}\right)\right)\,dv\\ &=\int_{v=0}^\infty \exp\left(-a\left(v-\frac{1}{v}\sqrt{\frac{b}{a}}\right)^2-2\sqrt{ab}\right)\,dv\\ &=\exp(-2\sqrt{ab})\int_{v=0}^\infty \exp\left(-a\left(v-\frac{1}{v}\sqrt{\frac{b}{a}}\right)^2\right)\,dv\\ \end{align} The trick to solve the last integral is by setting $$I=\int_{v=0}^\infty \exp\left(-a\left(v-\frac{1}{v}\sqrt{\frac{b}{a}}\right)^2\right)\,dv.$$ Let $t=-\frac{1}{v}\sqrt{\frac{b}{a}}\;\rightarrow\;v=-\frac{1}{t}\sqrt{\frac{b}{a}}\;\rightarrow\;dv=\frac{1}{t^2}\sqrt{\frac{b}{a}}\,dt$, then $$I_t=\sqrt{\frac{b}{a}}\int_{t=0}^\infty \frac{\exp\left(-a\left(-\frac{1}{t}\sqrt{\frac{b}{a}}+t\right)^2\right)}{t^2}\,dt.$$ Let $t=v\;\rightarrow\;dt=dv$, then $$I_t=\int_{t=0}^\infty \exp\left(-a\left(t-\frac{1}{t}\sqrt{\frac{b}{a}}\right)^2\right)\,dt.$$ Adding the two $I_t$s yields $$2I=I_t+I_t=\int_{t=0}^\infty\left(1+\frac{1}{t^2}\sqrt{\frac{b}{a}}\right)\exp\left(-a\left(t-\frac{1}{t}\sqrt{\frac{b}{a}}\right)^2\right)\,dt.$$ Let $s=t-\frac{1}{t}\sqrt{\frac{b}{a}}\;\rightarrow\;ds=\left(1+\frac{1}{t^2}\sqrt{\frac{b}{a}}\right)dt$ and for $0<t<\infty$ is corresponding to $-\infty<s<\infty$, then $$I=\frac{1}{2}\int_{s=-\infty}^\infty e^{-as^2}\,ds=\frac{1}{2}\sqrt{\frac{\pi}{a}}.$$ Thus \begin{align} \int_{v=0}^\infty \exp\left(-av^2-\frac{b}{v^2}\right)\,dv&=\exp(-2\sqrt{ab})\int_{v=0}^\infty \exp\left(-a\left(v-\frac{1}{v}\sqrt{\frac{b}{a}}\right)^2\right)\,dv\\ &=\frac12\sqrt{\frac{\pi}{a}}e^{-2\sqrt{ab}}. \end{align}