19

Is there a closed form for this integral? $$\int_{0}^\infty e^{-ax^2}\operatorname{erf}(px)\operatorname{erf}(qx)\operatorname{erf}(rx)\operatorname{erf}(sx)\,dx$$

Recall the definition of the error function: $$\operatorname{erf}(x) = \frac{2}{\sqrt{\pi}}\int_0^x e^{-t^2}dt$$ My fluency with distribution-y definite integrals is severely lacking (I'm a geometer, not an analyst!), my Mathematica crutch isn't helping, and I'm not finding the form in online integral tables.

My interest stems from the recent publication of an $\operatorname{erf}$-y formula in "Volumes of Regular Hyperbolic Simplices" (via arxiv.org), by Kabluchko and Schange. The integral above would give me explicit insight into the dimension $4$ case.

A closed form is key to my being able to analyze limiting behavior and other special cases of the parameters. Most importantly, if (as it appears with the related integrals below) there are "just" $\arctan$s involved, I can manipulate trig values of the volumes, which should prove particularly helpful to my research.


Some related integrals that give me hope: $$\begin{align} \int_0^\infty e^{-px^2}\operatorname{erf}(ax)\,dx&=\frac{1}{\sqrt{p\pi}}\arctan\frac{a}{\sqrt{p}} \\[8pt] \int_0^\infty e^{-px^2}\operatorname{erf}(ax)\operatorname{erf}(bx)\,dx &= \frac{1}{\sqrt{p\pi}}\arctan\frac{ab}{\sqrt{p^2+pa^2+pb^2}} \\[8pt] \int_0^\infty xe^{-px^2}\operatorname{erf}(ax)\operatorname{erf}(bx)\operatorname{erf}(cx)\;dx &=\frac1{p\pi}\sum_{cyc}\frac{a}{\sqrt{p+a^2}}\arctan\frac{bc}{\sqrt{(p+a^2)(p+a^2+b^2+c^2)}} \end{align}$$

Online integral tables:

J. W. Tanner
  • 64,851
  • 5
  • 45
  • 89
Blue
  • 85,834
  • 2
  • @mezzoctane: Good point! I've switched the link to the abstract. Thanks. – Blue Dec 01 '25 at 08:03
  • 2
    Do you at least know the formula for a triple product? – Nolord Dec 01 '25 at 09:42
  • @Nolord: "Do you at least know the formula for a triple product?" I do not. ... But now that you mention it ... I got the three-erfs-and-an-$x$ result from MathWorld's "erf" entry. I see (now) that they cite the book Integrals and Series, Vol 2: Special Functions by Prudnikov, et al., for that result. It must also have three-erfs-and-no-$x$, right? The Internet Archive has a preview of the book, but it's missing the erf-y sections. Still, I have a target. ... Thanks for the nudge. – Blue Dec 01 '25 at 10:23
  • 2
    This is certainly an interesting question. However, since the integral is intimately related to the volume of a certain simplex in a hypersphere, I am skeptical about the existence of an elementary closed-form for the general dimensions. If your ultimate goal is to analyze the limiting behavior of the integral, I suggest you to ask that question directly, so as not to fall into the XY problem. – Sangchul Lee Dec 01 '25 at 13:41
  • Let: $$\mathcal{I}n=\int_0^\infty{\large{e}}^{-p,t^2}\prod{i=1}^{n}\text{erf}(x_i,t),dt$$ Differentiate under the integral WRT $p$ and all $x_i$, then reverse, lead to: $${\mathcal{I}n=}{-\frac{2^{n-1}}{\sqrt{\pi^{n}}}\Gamma\left({\small\frac{n+3}{2}}\right){\underbrace{\iint\dots\int}{1+n}\left(p+\sum_{i=1}^{n}x_i^{2}\right)^{-\frac{n+3}{2}}{dp\prod\limits_{i=1}^{n}dx_i}}}$$ – Hazem Orabi Dec 01 '25 at 21:02
  • @Blue I can confirm that it is not in the book, but there certainly are many integrals of interest there (like the double prodict with an $x$ or $x^{-2}$). However, none immediately implies the triple/quadruple product, as far as I can see. – Nolord Dec 02 '25 at 01:48
  • @Nolord $$\int_0^{\infty } \exp \left(-p x^2\right) \text{erf}(a x) \text{erf}(b x) \text{erf}(c x) , dx=\int_0^1 \left(-\frac{2 c \tan ^{-1}\left(\frac{b}{\sqrt{a^2+p+c^2 x^2}}\right)}{a \pi ^{3/2} \sqrt{a^2+p+c^2 x^2}}+\frac{2 c \sqrt{a^2+p+c^2 x^2} \tan ^{-1}\left(\frac{b}{\sqrt{a^2+p+c^2 x^2}}\right)}{a \pi ^{3/2} \left(p+c^2 x^2\right)}-\frac{2 c \tan ^{-1}\left(\frac{a}{\sqrt{b^2+p+c^2 x^2}}\right)}{b \pi ^{3/2} \sqrt{b^2+p+c^2 x^2}}+\frac{2 c \sqrt{b^2+p+c^2 x^2} \tan ^{-1}\left(\frac{a}{\sqrt{b^2+p+c^2 x^2}}\right)}{b \pi ^{3/2} \left(p+c^2 x^2\right)}\right) , dx$$ – Mariusz Iwaniuk Dec 02 '25 at 09:37
  • @Nolord: "I can confirm that [the 3-erf integral] is not in the book" That's a shame. I'm beginning to doubt that there's a closed form beyond the 2-erf integral. I didn't expect one in general, but 4-erfs would have been awfully handy to my personal investigations. ... ah, well ... Responses here are giving me some good food for thought, though. I'm going to wait a couple more days to see what other foods might come in before selecting "an answer". – Blue Dec 02 '25 at 21:59
  • @SangchulLee: I take your point about the XY problem. My interests in the closed form are a bit too open-ended for a question at this point, but I'm certainly considering it. ... I, too, am skeptical about a closed form in general; hyperbolic volume for general tetrahedra tends to be encoded in exceedingly opaque integrals. As the cited paper focuses on the special case of "orthocentric" tetrahedra, and as the volume integral is comparatively straightforward, there is (was?) a glimmer of hope that the added structure might help me get a useful handle on behavior of their volumes. – Blue Dec 02 '25 at 22:18
  • I suspect you need a closed-form because you’re looking for a specific limit of an analytic continuation of the integral. If that’s the case, it might be possible to achieve this without depending on a closed-form, and I'm also interested in this question, too. – Sangchul Lee Dec 03 '25 at 18:19

4 Answers4

6

Too long for a comment

While this is not a closed form solution, a series representation can be obtained using the Taylor series expansion for the error function. This can be generalised to arbitrary many $erf$ terms in the integrand.

Indeed the Taylor series for $erf$ around $0$ is given by: $$erf(z) = \frac{2}{\sqrt{\pi}} \sum_{n=0}^{\infty} \frac{(-1)^n z^{2n+1}}{n! (2n+1)}.$$

Plugging these into the integral, we can interchange the summation and integration if $a>0$ (else no convergence for the integral expected): $$I = \int_{0}^\infty e^{-ax^2} \left( \frac{2}{\sqrt{\pi}} \sum_{i=0}^\infty \frac{(-1)^i (px)^{2i+1}}{i! (2i+1)} \right) \left( \frac{2}{\sqrt{\pi}} \sum_{j=0}^\infty \frac{(-1)^j (qx)^{2j+1}}{j! (2j+1)} \right)\\ \left( \frac{2}{\sqrt{\pi}} \sum_{k=0}^\infty \frac{(-1)^k (rx)^{2k+1}}{k! (2k+1)} \right) \left( \frac{2}{\sqrt{\pi}} \sum_{l=0}^\infty \frac{(-1)^l (sx)^{2l+1}}{l! (2l+1)} \right) dx$$

$$= \left(\frac{2}{\sqrt{\pi}}\right)^4 \sum_{i=0}^\infty \sum_{j=0}^\infty \sum_{k=0}^\infty \sum_{l=0}^\infty \frac{(-1)^{i+j+k+l} p^{2i+1} q^{2j+1} r^{2k+1} s^{2l+1}}{i! j! k! l! (2i+1) (2j+1) (2k+1) (2l+1)} \int_{0}^\infty e^{-ax^2} x^{(2i+1)+(2j+1)+(2k+1)+(2l+1)} dx$$

Let $N = 2(i+j+k+l) + 4$. The integral $\int_{0}^\infty e^{-ax^2} x^N dx$ is a standard Gaussian-type integral. Since $N$ is an even integer, let $N = 2m$, where $m = i+j+k+l+2$. Then $$\int_{0}^\infty e^{-ax^2} x^N dx=\int_{0}^\infty e^{-ax^2} x^{2m} dx = \frac{\Gamma(m + 1/2)}{2a^{m+1/2}}$$

Substituting this back $$I = \frac{16}{\pi^2} \sum_{i=0}^\infty \sum_{j=0}^\infty \sum_{k=0}^\infty \sum_{l=0}^\infty \frac{(-1)^{i+j+k+l} p^{2i+1} q^{2j+1} r^{2k+1} s^{2l+1}}{i! j! k! l! (2i+1) (2j+1) (2k+1) (2l+1)} \frac{\Gamma(i+j+k+l+2 + 1/2)}{2a^{i+j+k+l+2+1/2}}$$

From here it should be obvious how this generalises to multiple $erf$ terms.

Here is a Mathematica code to double check:

    erfSeries[z_, numTerms_] := (2/Sqrt[Pi])*
   Sum[((-1)^n*z^(2*n + 1))/(n!*(2*n + 1)), {n, 0, numTerms}];
a = 1.5;
p = 0.5;
q = 0.7;
r = 0.3;
s = 0.9;
numSeriesTerms = 20;
integrandSeries[x_] := 
  Exp[-a*x^2]*erfSeries[p*x, numSeriesTerms]*
   erfSeries[q*x, numSeriesTerms]*erfSeries[r*x, numSeriesTerms]*
   erfSeries[s*x, numSeriesTerms];
resultSeriesIntegration = 
  NIntegrate[integrandSeries[x], {x, 0, Infinity}];

Print["Result using series expansion and NIntegrate: ", resultSeriesIntegration]; integrandDirect[x_] := Exp[-ax^2]Erf[px]Erf[qx]Erf[rx]Erf[s*x]; resultDirectIntegration = NIntegrate[integrandDirect[x], {x, 0, Infinity}];

Print["Result using direct Erf functions and NIntegrate: ", resultDirectIntegration];

For smaller $a>0$ convergence will be much slower.

  • 3
    Quadruple series can be expressed by Lauricella function: $$\frac{6 a b c d}{p^{5/2} \pi^{3/2}} F_{A}^{(4)} \left( \frac{5}{2}; \frac{1}{2}, \frac{1}{2}, \frac{1}{2}, \frac{1}{2}; \frac{3}{2}, \frac{3}{2}, \frac{3}{2}, \frac{3}{2}; -\frac{a^2}{p}, -\frac{b^2}{p}, -\frac{c^2}{p}, -\frac{d^2}{p} \right)$$ – Mariusz Iwaniuk Dec 01 '25 at 09:28
  • +1. Very nice! I'm still primarily interested in a closed form, but the straightforwardness of the series form gives me even more hope about the whole thing. – Blue Dec 01 '25 at 09:42
  • @MariuszIwaniuk: "Quadruple series can be expressed by Lauricella function" Interesting, but I'm hoping for something less obfuscated. :) – Blue Dec 01 '25 at 09:44
  • Perhaps worth mentioning: If $p$, $q$, $r$, and $s$ are sufficiently small that powers of them higher than cubes can be ignored, then the summation expands to $I \approx \pi^{-3/2}pqrs\left(6a^{-5/2}-5a^{-7/2}(p^2+q^2+r^2+s^2)+\frac{35}{6}a^{-9/2}( p^2q^2+p^2r^2+p^2s^2+q^2r^2+q^2s^2+r^2s^2)-\frac{35}{4}a^{-11/2}(p^2q^2r^2+p^2q^2s^2+p^2r^2s^2+q^2r^2s^2)+\frac{385}{24}a^{-13/2}p^2q^2r^2s^2\right)$. – Dan Dec 02 '25 at 22:28
4

A possible method for finding an elementary solution via Feynman's method

Denote \begin{align} I(p,q,r,s)=\int_0^\infty\exp(-ax^2)\mathrm{erf}(px)\mathrm{erf}(qx)\mathrm{erf}(rx)\mathrm{erf}(sx)\ \mathrm dx, \end{align} and note the following identity \begin{align} \int_0^\infty x^n\exp(-\alpha x^2)\mathrm dx=\frac12 \alpha^{-(1+n)/2}\Gamma\left(\frac{n+1}{2}\right), \end{align} along with \begin{align} \partial_t \mathrm{erf}(tx)=\frac{2x}{\sqrt\pi}\exp(-t^2x^2)\quad\text{and}\quad \mathrm{erf}(0)=0. \end{align} Taking four derivatives yields that \begin{align} I_{pqrs}(p,q,r,s)=\frac{16}{\pi^2}\int_0^\infty x^4\exp(-a(a+p^2+q^2+r^2+s^2)x^2)\mathrm dx=\frac{6}{\pi^{3/2}}\frac{1}{(a+p^2+q^2+r^2+s^2)^{5/2}}, \end{align} with initial conditions for integration $I_{pqr}(p,q,r,0)=0$, $I_{pq}(p,q,0,0)=0$, $I_p(p,0,0,0)=0$, and $I(0,0,0,0)=0$.

The first integral back is simple enough: \begin{align} I_{pqr}&=\frac{6}{\pi^{3/2}}\int_0^s\frac{\mathrm d\mathfrak s}{(a+p^2+q^2+r^2+\mathfrak s^2)^{5/2}}\\\\ &=\frac{2}{\pi^{3/2}}\frac{3(a+p^2+q^2+r^2) s+2s^3}{(a+p^2+q^2+r^2)^2(a+p^2+q^2+r^2+s^2)^{3/2}}, \end{align} and the following integral is elementary as well, though the third is too convoluted for myself to do by hand or input into WA online. Perhaps you can proceed using Mathematica?

Edit: This procedure is the same as using the integral definiton of the error function to arrive at \begin{align} I=\frac{6}{\pi^{3/2}}\iiiint_\mathcal D\frac{\mathrm du\ \mathrm dv\ \mathrm dw\ \mathrm dz}{(u^2+v^2+w^2+z^2)^{5/2}}, \end{align} where $\mathcal D:\{(u,v,w,z)\in\mathbb R^4\ |\ u\in(0,p),v\in(0,q),w\in(0,r), z\in(0,s)\}$. The symmetry of this integral is provocative but I have been unable to abuse an answer out of it.

Eli Bartlett
  • 2,669
4

Long Comment. Here are three more representations of the integral

$$ I_N(p) = I_N(p; a_1, \ldots, a_N) := \int_{0}^{\infty} e^{-px^2} \prod_{n=1}^{N} \operatorname{erf}(a_nx) \, \mathrm{d}x, $$

where $p$ and $a_n$'s are a priori assumed to satisfy $p > 0$ and $a_1, \ldots, a_N > 0$ and then extended to a larger domain by the principle of analytic continuation, if available. (For example, the integral converges absolutely and locally uniformly on the region $\operatorname{Re}(p) > 0$ and $\left| \arg(a_n) \right| < \frac{\pi}{4}$ for all $n$, hence $I_N$ defines an analytic function in that region.)

Representation 1. The starting point is the following simple formula:

$$ \operatorname{erf}(x) = \frac{2x}{\sqrt{\pi}} \int_{0}^{1} e^{-x^2 t^2} \, \mathrm{d}t. $$

Plugging this into the defining integral of $I_N$,

$$\begin{align*} I_N(p) &= \int_{0}^{\infty} e^{-px^2} \prod_{n=1}^{N} \left[ \frac{2a_n x}{\sqrt{\pi}} \int_{0}^{1} e^{-a_n^2 x^2 t_n^2} \, \mathrm{d}t_n \right] \, \mathrm{d}x \\ &= \left( \frac{2}{\sqrt{\pi}} \right)^N \int_{[0,1]^N} a_1 \cdots a_N \int_{0}^{\infty} x^N e^{-(p+\sum_{n=1}^{N} a_n^2 t_n^2) x^2} \, \mathrm{d}x \mathrm{d}t_1 \cdots \mathrm{d}t_N \\ &= \left( \frac{2}{\sqrt{\pi}} \right)^N \Gamma\left(\frac{N+1}{2}\right) \int_{[0,1]^N} \frac{a_1 \cdots a_N}{2( p+\sum_{n=1}^{N} a_n^2 t_n^2 )^{\frac{N+1}{2}}} \mathrm{d}t_1 \cdots \mathrm{d}t_N \tag{1} \end{align*}$$

The formula $\text{(1)}$ allows extending $I_N$ to a larger domain where $p+\sum_{n=1}^{N} a_n^2 t_n^2 \neq 0$ for all $t_1, \ldots, t_N \in [0, 1]$. Also, when $N = 1$ or $N = 2$, this integral can be computed analytically, yielding the same formula as in OP. (Note that this techinque is actually a disguise of the Feynman's trick, so it is essentially equivalent to @Eli Bartlett's approach.)

Representation 2. For any $x \in \mathbb{C}$, we have

$$ \operatorname{erf}(x) = e^{-x^2} \sum_{k=0}^{\infty} \frac{x^{2k+1}}{(k+\frac{1}{2})!}. $$

Here, the factorial of the fractional argument is computed via the identification $s! = \Gamma(s+1)$. From this, it follows that

$$\begin{align*} I_N(p) &= \int_{0}^{\infty} e^{-px^2} \prod_{n=1}^{N} \left[ e^{-(a_n x)^2} \sum_{k_n \geq 0} \frac{(a_n x)^{2k_n+1}}{(k_n+\frac{1}{2})!} \right] \, \mathrm{d}x \\ &= \sum_{k_1, \ldots, k_N \geq 0} \left[ \prod_{n=1}^{N} \frac{a_n^{2k_n+1}}{(k_n+\frac{1}{2})!} \right] \int_{0}^{\infty} x^{2(k_1 + \cdots + k_N) + N} e^{-(p+a_1^2 + \cdots + a_N^2)x^2} \, \mathrm{d}x \\ &= \sum_{k_1, \ldots, k_N \geq 0} \left[ \prod_{n=1}^{N} \frac{a_n^{2k_n+1}}{(k_n+\frac{1}{2})!} \right] \frac{\Gamma(k_1 + \cdots + k_N + \frac{N+1}{2})}{2(p + a_1^2 + \cdots + a_N^2)^{k_1 + \cdots + k_N + \frac{N+1}{2}}}. \tag{2} \end{align*}$$

However, this series is not suitable for analyzing the limiting behavior or analytic properties of $I_N$.

Representation 3. This time, we invoke the following representation,

$$ \operatorname{erf}(x) = 1 - \frac{1}{\pi} \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} e^{-x^2\sec^2(\theta)} \, \mathrm{d}\theta,$$

valid for $\left| \arg x \right| < \tfrac{\pi}{4}$. Applying this, we get

$$\begin{align*} I_N(p) &= \int_{0}^{\infty} e^{-px^2} \prod_{n=1}^{N} \biggl( 1 - \frac{1}{\pi} \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} e^{-(a_nx)^2\sec^2(\theta_n)} \, \mathrm{d}\theta_n \biggr)\, \mathrm{d}x \\ &= \sum_{I \subseteq [N]} \left(-\frac{1}{\pi}\right)^{|I|} \int_{0}^{\infty} e^{-px^2} \prod_{n \in I} \biggl(\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} e^{-(a_nx)^2\sec^2(\theta_n)} \, \mathrm{d}\theta_n \biggr)\, \mathrm{d}x \\ &= \frac{\sqrt{\pi}}{2} \sum_{I \subseteq [N]} \left(-\frac{1}{\pi}\right)^{|I|} J(p ; (a_n)_{n\in I} ), \tag{3} \end{align*}$$

where

$$ J(p ; \varnothing) = \frac{1}{\sqrt{p}} \qquad\text{and}\qquad J(p ; (a_n)_{n\in I} ) = \int_{(-\frac{\pi}{2}, \frac{\pi}{2})^I} \frac{\prod_{n \in I} \mathrm{d}\theta_n}{\sqrt{p + \sum_{n\in I} a_n^2\sec^2(\theta_n) }} $$

for $I \neq \varnothing$. When $I$ consists of a single element, $J$ admits a closed-form:

$$ J(p ; a) = \frac{2}{\pi\sqrt{p}} \arctan\left( \frac{\sqrt{p}}{a} \right). $$

Similar to $\text{(1)}$, the formula $\text{(3)}$ also allows extending $I_N$ to a larger domain. Also, although $\text{(3)}$ is more complicated than $\text{(1)}$, I believe $\text{(3)}$ is better suited for analyzing the branch cuts of $I_N$ (and hence the monodromy of $I_N$). For example, when $a_1, \ldots, a_N \neq 0$, only the term $J(p ; \varnothing)$ induces the branch cut from $0$ to $\infty$.

Sangchul Lee
  • 186,861
  • I'll go ahead and mention my specific interest in the 4-erf integral here (perhaps as a prelude to a separate question): I'm on a quest for some kind of "Pythagoras-deGua"-esque connection among the volumes of leg- and hypotenuse-tetrahedra of a non-Euclidean "right-corner" 4-simplex. (I settled the 3-simplex case long ago.) The Kabluchko-Schange "orthocentric simplex" formula seems tailor-made for this, as the target simplex is inherently such a hypotenuse; however, determining leg-volumes with the formula requires sending an underlying "$\tau_i$" parameter to infinity. – Blue Dec 05 '25 at 21:46
4

Long comment. Note that $$ \mathop{\rm erf}(px) = \frac2{\sqrt\pi} \int_0^{px} e^{-t^2}\,dt = -1 + \frac2{\sqrt\pi} \int_{-\infty}^{px} e^{-t^2}\,dt = -1 + \frac2{\sqrt\pi} \int_{-\infty}^0 e^{-(t+px)^2}\,dt. $$ If we ignore the $-1$ for a moment, the original integral can be written as $$ \frac{16}{\pi^2} \int_0^\infty \int_{-\infty}^0 \int_{-\infty}^0 \int_{-\infty}^0 \int_{-\infty}^0 e^{Q(x,t,u,v,w)} \,dw\,dv\,du\,dt\,dx, $$ where $Q$ is a quadratic form in five variables. This is (a constant times) an orthant probability for a 5-dimensional normal random variable with mean $(0,0,0,0,0)$ and covariance matrix related to $Q$. It is knownª that $d$-dimensional orthant probabilities can be related to $(d-2)$-dimensional ones recursively (in a manner akin to the classical snappy evaluation of $\int_0^\infty e^{-x^2}\,dx$). There are closed forms for $d=1,2,3$ but not for higher dimensions.

If we stop ignoring the $-1$ terms and multiply everything out, then we get sixteen integrals with dimensions ranging from $1$ to $5$; each of these is an orthant probability of the appropriate dimension, to which the above comments apply.

The first two pages of Bacon’s paperª (plus some messing around with rescaling quadratic forms) give the information needed to find exact formulas for the original integral in terms of single integrals of arcsin functions. I suspect that’s the closest to a closed form that one can get; but it might be quite helpful for investigating asymptotics.

ªBacon, Ralph Hoyt, Approximations to multivariate normal orthant probabilities, Ann. Math. Stat. 34, 191-198 (1963). ZBL0245.62057.

Greg Martin
  • 94,676
  • 1
    All of the answers and comments have been enlightening, which I greatly appreciate. I'm accepting this answer for succinctly convincing me to abandon hope for the closed form. Yay? :) ... I'll see what I can make of Bacon's arcsine formula. Thanks! – Blue Dec 06 '25 at 10:30