I'm working on algorithm that identifies clusters of objects together in space. One of the calculations in the algorithm is of the form

$$ P = \int_0^\infty e^{-ax^2}{\rm erf}\left(\frac{x}{c} + b\right)dx$$

I am seeking an analytical solution to this integral, either in the defining bounds $(0,\infty)$, or in an approximation using bounds $(0,10)$, where I know that $x=10$ happens to be a good approximation for $x\rightarrow\infty$ given the behavior of the integrand.

I have read these posts:

Closed form for definite integral involving Erf and Gaussian?

Integral of a gaussian times ("shifted") erf squared

but these have different bounds and are of a different forms (i.e., less constants). Mathematica was not able to solve the integral, but my attempt has been to differentiate under the integral sign:

$$\frac{dP}{db} = \frac{2}{\sqrt{\pi}} e^{-b^2} \int_0^\infty e^{-2bx/c}e^{-(a+1/c^2)x^2}dx.$$

I was able to reduce this to

$$\frac{dP}{db} = \frac{1}{\sqrt{a+1/c^2}} e^{-b^2\left(1-\frac{1}{ac^2+1}\right)} {\rm erfc}\left[ \frac{b}{\sqrt{ac^2+1}} \right].$$

(pending any mistakes along the way, which is definitely possible). The problem is that this integral needed to get $P(b)$ is essentially the same as the one I started with. Do you all have any recommendations on how to proceed from this step, or better suggestions overall to solve this problem?

  • $\begingroup$ One of the constants $a$ or $c$ can be removed. $\endgroup$
    – user65203
    Nov 15, 2019 at 18:07
  • $\begingroup$ @YvesDaoust do you mean by writing a in terms of c? $\endgroup$
    – zh1
    Nov 15, 2019 at 18:21
  • $\begingroup$ See:math.stackexchange.com/questions/2345874/… $\endgroup$ Nov 15, 2019 at 18:58
  • $\begingroup$ Rescaling of the variable. $\endgroup$
    – user65203
    Nov 15, 2019 at 19:36


You must log in to answer this question.

Browse other questions tagged .