Analytic solution exists for integral involving product of two Erf functions, but Mathematica can’t find it. Why

error functionexpected valueintegrationmathematica

Consider the following integral and its analytic solution:
$$
\int_{-\infty}^\infty \frac{dx}{\sqrt{2\pi}} e^{-x^2/2} \text{erf}(ax)\text{erf}(bx)=\frac{2}{\pi} \sin^{-1}\left(\frac{2ab}{\sqrt{(1+2a^2)(1+2b^2)}}\right)\, .
$$

However, Mathematica refuses to evaluate the integral if I enter it as follows:

Integrate[Erf[a*x]*Erf[b*x]*Exp[-x^2/2], {x, -Infinity, Infinity}, 
    Assumptions -> a > 0 && b > 0]

The above just returns the request. How can I make Mathematica find the analytic solution?

Best Answer

Differentiating under the integral sign using Mathematica 11.3 gives

$$\frac{\partial}{\partial a}\frac{\partial}{\partial b}\left( \frac{e^{-\frac{x^2}{2}} \text{erf}(a x) \text{erf}(b x)}{\sqrt{2 \pi }}\right)=\frac{2 \sqrt{2} x^2 e^{-a^2 x^2-b^2 x^2-\frac{x^2}{2}}}{\pi ^{3/2}}$$

Integrating the new function is then possible in Mathematica

$$\text{Integrate}\left[\frac{2 \sqrt{2} x^2 e^{-a^2 x^2-b^2 x^2-\frac{x^2}{2}}}{\pi ^{3/2}},\{x,-\infty ,\infty \},\text{Assumptions}\to a>0\land b>0\right]=\frac{4}{\pi \left(2 a^2+2 b^2+1\right)^{3/2}}$$

Finally reverse the earlier differentiations with respect to $a$ and $b$ to get

$$\int \int \frac{4}{\pi \left(2 a^2+2 b^2+1\right)^{3/2}}\,da\,db=\frac{2 \tan ^{-1}\left(\frac{2 a b}{\sqrt{2 a^2+2 b^2+1}}\right)}{\pi }$$

In Mathematica code this is:

Integrate[ Integrate[ Integrate[
    D[ D[ (E^(-(x^2/2)) Erf[a x] Erf[b x])/Sqrt[2 \[Pi]],a ],b ] 
    ,{x,-Infinity,Infinity},Assumptions->a>0&&b>0], a ], b ]
Related Question