9
$\begingroup$

Looking for a closed form for the integral

$$\int_0^{\infty } e^{-\left(\frac{a-\log (x)}{b}\right)^2} \left(\frac{1}{2} \text{erf}\left(\frac{a-\log (x)}{b}\right)+\frac{1}{2}\right) \, \mathrm{d}x,$$ where erf is the error function $erf (z)=\frac{2}{\sqrt{\pi }}\int _0^ze^{-t^2}\mathrm{d}t.$

I've tried all manner of tricks, to no avail.

$\endgroup$
  • $\begingroup$ what kind of tricks? $\endgroup$ – tired Feb 17 '15 at 15:42
  • 2
    $\begingroup$ Subbing $x=e^y$ will at least do no harm. $\endgroup$ – Ron Gordon Feb 17 '15 at 15:47
  • $\begingroup$ For $a=0$, one term is a Gaussian integral, and the other one is $0$, due to the parity of the integrand. $\endgroup$ – Lucian Feb 17 '15 at 16:10
  • $\begingroup$ Substitution $x=e^y$ which removes the log didn't work. $\endgroup$ – Nero Feb 17 '15 at 18:09
  • $\begingroup$ I'm not sure what you mean, "it didn't work." Do you mean that you get an integral that you can't evaluate? $\endgroup$ – Ron Gordon Feb 17 '15 at 19:15
13
$\begingroup$

Your integral admits a closed form.

Theorem. Let $a$ and $b$ be any real numbers. Then

$$\int_0^{\infty }\!\! e^{\large-\left(\frac{a-\log x}{b}\right)^2}\!\! \left(\text{erf}\left(\frac{a-\log x}{b}\right)+1\right) \mathrm{d}x=\sqrt{\pi}\:|b|\:e^{{\large {a+\frac{b^2}{4}}}}\left(1-\text{erf}\!\left(\! \frac{\sqrt{2}\:b}{4}\!\right)\! \right) \tag1$$

where $\displaystyle \text{erf}(z)=\frac{2}{\sqrt{\pi }}\int _0^ze^{\large-t^2}\mathrm{d}t.$

Proof. Let's denote the left hand side of $(1)$ by $I(a,b)$.

By the change of variable $$\displaystyle U:=\frac{a-\log x}{b}, \quad dx=-b\:e^a \:e^{-b U}dU,$$ we have $$ \begin{align} I(a,b)&=|b|\:e^a \int_{-\infty }^{+\infty } e^{\large-U^2-bU} \left(\text{erf}\left(U\right)+1\right) \mathrm{d}U\\\\ &=|b|\:e^a \int_{-\infty }^{+\infty } e^{\large-U^2-bU} \text{erf}(U)\: \mathrm{d}U+|b|\:e^a \int_{-\infty }^{+\infty } e^{\large-U^2-bU} \mathrm{d}U \tag2 \end{align} $$ Clearly, by the gaussian integral: $$ \int_{-\infty }^{+\infty } e^{\large-U^2-bU} \mathrm{d}U =e^{\large b^2/4}\int_{-\infty }^{+\infty } e^{\large-(U+b/2)^2} \mathrm{d}U =\sqrt{\pi}\:e^{ b^2/4} .\tag3 $$ Set $$ f(b):=\int_{-\infty }^{+\infty } e^{\large-U^2-bU} \text{erf}(U)\: \mathrm{d}U \tag4 $$ and observe that $$ f(0)=\frac{\sqrt{\pi}}{4}\left[(\text{erf}(U))^2\right]_{-\infty }^{+\infty }=0. \tag5$$ Differentiating $(4)$ with respect to $b$ and performing an integration by parts gives $$ \begin{align} f'(b)&=-\int_{-\infty }^{+\infty } U\:e^{\large-U^2-bU} \text{erf}(U)\:\mathrm{d}U\\\\ f'(b)&=\left[\frac 12 e^{\large-U^2}\left(e^{\large-bU} \text{erf}(U)\right)\right]_{-\infty }^{+\infty }-\frac 12\int_{-\infty }^{+\infty } e^{\large-U^2} \left(-b\:e^{\large-bU} \text{erf}(U)+\frac{2}{\sqrt{\pi }}e^{\large-bU}e^{\large-U^2}\right)\mathrm{d}U\\\\ f'(b)&=\frac{b}{2}f(b)-\frac{1}{\sqrt{\pi }}\int_{-\infty }^{+\infty } e^{\large-2U^2-bU}\mathrm{d}U \end{align} $$ or $$ f'(b)=\frac{b}{2}f(b)-\frac{\sqrt{2}}{2}\:e^{\large b^2/8}. \tag6 $$ We classically solve the ODE $(6)$, using $(5)$, to obtain $$ f(b)=-\sqrt{\pi }\:e^{\large b^2/4}\text{erf}\!\left(\! \frac{\sqrt{2}\:b}{4}\!\right) \tag7 $$ then plugging $(7)$, $(4)$ and $(3)$ into $(2)$ gives $(1)$ as desired.

$\endgroup$
  • 2
    $\begingroup$ Thanks a million. This is it. $\endgroup$ – Nero Feb 18 '15 at 0:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.