# Integrating the error function of $\frac{a}{\sqrt{x^2+b^2}}$

I'm faced with trying to solve this integral:

$\int_{0}^{\infty} \operatorname{erf} \left( \frac {a} {\sqrt{x^2+b^2}} \right)\;dx$

My integration muscles are rather atrophied, though so I'm faced with attaching this by substitutions and/or parts and/or comparing with standard integrals like those I find here:

https://nvlpubs.nist.gov/nistpubs/jres/75B/jresv75Bn3-4p149_A1b.pdf

All of which is daunting to say the least so as I embark on it I throw an open invitation out here for insights that may help, acknowledging that there much fitter integration muscles out there and acknowledging that there may be no clean analytic integral of this (the intuitively I expect there to be one).

Though Wolfram alpha is not encouraging:

http://www.wolframalpha.com/input/?i=integrate+erf(+a+%2F+sqrt(x%5E2%2Bb%5E2))+from+x+%3D+0++to+infinity

So I wonder if indeed this integral exists. Hmmm.

• The integral diverges logarithmically, because erf for small argument is roughly linear and the denominator inside grows linearly for large x. – Ian Jun 29 '18 at 4:47

As Ian commented, consider the asymptotics $$\operatorname{erf} \left( \frac {a} {\sqrt{x^2+b^2}} \right)=\frac{2 a}{\sqrt{\pi }\, x}-\frac{a \left(2 a^2+3 b^2\right)}{3 \sqrt{\pi }\, x^3}+O\left(\frac{1}{x^5}\right)$$ while, close to $0$, $$\operatorname{erf} \left( \frac {a} {\sqrt{x^2+b^2}} \right)=\text{erf}\left(\frac{a \sqrt{b^2}}{b^2}\right)-\frac{a \sqrt{b^2} e^{-\frac{a^2}{b^2}}}{\sqrt{\pi }\, b^4}x^2+O\left(x^4\right)$$
For illustration purposes, using $a=b=1$ and let $$I_k=\int_0^{10^k}\operatorname{erf} \left( \frac {1} {\sqrt{x^2+1}} \right)\,dx$$ Using numerical integration $$\left( \begin{array}{cc} k & I_k \\ 0 & 0.78347 \\ 1 & 3.07185 \\ 2 & 5.66541 \\ 3 & 8.26355 \\ 4 & 10.8617 \\ 5 & 13.4599 \\ 6 & 16.0581 \\ 7 & 18.6563 \\ 8 & 21.2545 \\ 9 & 23.8527 \\ 10 & 26.4509 \end{array} \right)$$ Using (with some trouble with accuracy) the values up to $k=15$, a quick and dirty linar regression $I_k=\alpha+\beta k$ gave $(R^2=0.999967)$ $$\begin{array}{clclclclc} \text{} & \text{Estimate} & \text{Standard Error} & \text{Confidence Interval} \\ \alpha & 0.54382 & 0.03493 & \{0.46890,0.61875\} \\ \beta & 2.59065 & 0.00397 & \{2.58213,2.59916\} \end{array}$$