# Integral of the error function

So I know that $$\displaystyle \int_{0}^{\infty} \text{erf}(x) dx$$ does not converge so I am assuming that $$\displaystyle \int_{0}^{\infty} \frac{\text{erf}(x)}{x} dx$$ does not converge? Is there anyway to estimate these integrals?

By the way I arrived at that equation from the following:

$$\displaystyle \int_{0}^{p} \frac{\text{exp}(-r^2)r^2}{p} dr \approx \frac{\text{erf}(p)}{p}$$

so maybe my evaluation of that integral is wrong? Thanks for the help guys!

• $$\int_0^{\infty} dx \operatorname{erfc}{x} = \frac1{\sqrt{\pi}}$$ Nov 30, 2015 at 2:40
• erf is essentially the constant $1$ for large $x.$ So the integrand in your second integral is larger than $1/(2x)$ and the integral larger than $(1/2) \log N$ where the integral is from $1$ out to $N$ Nov 30, 2015 at 2:46
• @RonGordon Wait i'm confused... wolfram alpha seems to think that does not converge wolframalpha.com/input/… Nov 30, 2015 at 3:13
• @user2879934: It converges. Integrate by parts. Think for yourself, don't substitute common sense with Dr. Wolfram's robot. Nov 30, 2015 at 3:37
• @user2879934: yes, but the point is that the relationship between erf and erfc should give you insight into how the integral over erf diverges. Nov 30, 2015 at 3:50

If $f$ is pdf of a standard normal ($f'=-xf$), integration by parts yields:
$$I(a,b)=\int_{a}^{b} r^2f(r)\,dr = \Phi(b)-\Phi(a)+af(a)-bf(b)$$
For $a=0$ and $b$ large we get asymptotics: $$I(0,p)\approx\frac 1 2-(b+\frac 1 b)f(b)\approx \frac 1 2-bf(b)$$ You can translate the above into your integral.
Since: $$\text{erf}(x)=\int_0^x\frac{2}{\sqrt{\pi}}\exp\left(-y^2\right)\mathrm{d}y$$ Thus, since all the functions are non-negative, we can change the order of integration - take care of the change of the integration limits (due to Fubini): $$\displaystyle \int_{0}^{\infty} \frac{\text{erf}(x)}{x}\mathrm{d}x=\int_0^\infty\int_{0}^x\frac{2}{\sqrt{\pi}x}e^{-y^2}\mathrm{d}y\mathrm{d}x=\int_{0}^\infty\int_{y}^\infty \frac{2}{\sqrt{\pi}x}e^{-y^2}\mathrm{d}x\mathrm{d}y$$ And the inner integral does not converge for any $y$.