The integral $$\int\_{0}^{z} e^{-a^{2} x^{2}} {\rm erf}(bx)\, dx$$ is related to the convolution of two [half-normal distribution](https://en.wikipedia.org/wiki/Half-normal_distribution)s. This can be inferred from this [question](https://math.stackexchange.com/questions/2539306/sum-of-independent-half-normal-distributions-with-unequal-variance) on MSE. The following expression for the definite version of this integral is known. See, for instance, "A Table of Integrals of the Error Functions" by Edward W. Ng and Murray Geller, equation 4.3.2 ([link](http://nvlpubs.nist.gov/nistpubs/jres/73B/jresv73Bn1p1_A1b.pdf) here). It is as follows: $$ \int\_{0}^{\infty} e^{-a^{2} x^{2} } {\rm erf} (bx) \,dx = \frac{\sqrt{\pi}}{2a} - \frac{1}{a \sqrt{\pi}} \tan^{-1} \big{(} \frac{a}{b} \big{)} .$$


However, I don't know about a similar expression for the indefinite integral. Do you know about a paper or other source that adresses the indefinite integral? Or do you know how to compute it yourself? 


The reason I ask about this integral is because I'd like to compute the convolution of two half-normal distributions. Please let me know if you have a reference in which the convolution of two half-normal distributions with unequal variances is calculated. 



What is $\int_{0}^{z} e^{-a^{2} x^{2}} {\rm erf}(bx)\, dx$?
This indefinite integral is a special function, called [Owen's T](https://en.wikipedia.org/wiki/Owen%27s_T_function):


$$\int\_0^z e^{-a^2 x^2}{\rm erf}\,(bx)\,dx=\frac{\arctan(b/a)}{a\sqrt\pi}-\frac{2\sqrt\pi}{a} T\left(\sqrt{2} az,b/a\right)$$




---


Here is the requested derivation:


$$\int\_0^z e^{-a^2x^2}{\rm erf}\,(bx)\,dx=\frac{2}{\sqrt\pi}\int\_0^z e^{-a^2x^2}\left(\int\_0^{bx}e^{-t^2}dt\right)dx=$$
$$\frac{2}{\sqrt\pi}\int\_0^z e^{-a^2x^2}\left(\int\_0^{b}e^{-(yx)^2}x\,dy\right)dx=$$
$$\frac{2}{\sqrt\pi}\int\_0^b\left(\int\_0^z e^{-(a^2+y^2)x^2}xdx\right)dy=\\
\frac{1}{\sqrt\pi}\int\_0^b\frac{e^{-(a^2+y^2)z^2}-1}{a^2+y^2}\,dy=$$
$$\frac{1}{a\sqrt\pi}\left[ \arctan(b/a)-2\pi T(\sqrt{2}az,b/a)\right]$$
with the definition $T(z,b)=\frac{1}{2\pi}\int\_0^b(1+y^2)^{-1}\exp[-\tfrac{1}{2}z^2(1+y^2)]\,dy$ of Owen's T-function.


