# Closed form of $\int_{-1}^{1} \operatorname{erf}(x)^n \,dx$ for $n$ is positive even integer

I have checked this paper titled "A Table of Integrals of the Error Functions" but I can't evaluate:$$\int \operatorname{erf}(x)^n \,dx$$ when $n$ is a positive integer. What I really want to evaluate is the definite integral:$$\int_{-1}^1 \operatorname{erf}(x)^n \,dx$$ when $n$ is even integer because the integrand is an odd function for odd $n$, while for $n=2$ it has a nice closed form as shown here in Wolfram Alpha. Now my question here is:

Question: What is the closed form of: $\int_{-1}^{1} \operatorname{erf}(x)^n \,dx$, when $n$ is a positive even integer ?

• What makes you think there is a closed form? Commented Jun 2, 2018 at 0:35
• what let me to feel that the existence of it for n=2 Commented Jun 2, 2018 at 0:40

I am skeptical about a possible closed form but, looking here, you will notice that there are quite good approximations $$\left(\text{erf}(x)\right)^2\approx 1-e^{-a x^2}\qquad \text{with}\qquad a=(1+\pi )^{2/3} \log ^2(2)$$

So, you can approximate $$I_n=\int_{-1}^1 \left(\text{erf}(x)\right)^{2n}\,dx$$by $$J_n=\int_{-1}^1 \left(1-e^{-a x^2}\right)^{n}\,dx$$ for which the binomial expansion would be required (easy).

This would give you things like $$J_1=2-\frac{\sqrt{\pi } \text{erf}\left(\sqrt{a}\right)}{\sqrt{a}}$$ $$J_2=2-\frac{2 \sqrt{\pi } \text{erf}\left(\sqrt{a}\right)}{\sqrt{a}}+\frac{\sqrt{\frac{\pi }{2}} \text{erf}\left(\sqrt{2a}\right)}{\sqrt{a}}$$ $$J_3=2-\frac{3 \sqrt{\pi } \text{erf}\left(\sqrt{a}\right)}{\sqrt{a}}+\frac{3 \sqrt{\frac{\pi }{2}} \text{erf}\left(\sqrt{2a} \right)}{\sqrt{a}}-\frac{\sqrt{\frac{\pi }{3}} \text{erf}\left(\sqrt{3a} \right)}{\sqrt{a}}$$ $$\color{blue}{J_n=2+\sqrt{\frac \pi a}\,\sum_{k=1}^n (-1)^k \frac{\binom{n}{k}}{\sqrt{k}}\,\text{erf}\left(\sqrt{ak} \right) }\tag 1$$ I produce below a short table for comparison $$\left( \begin{array}{ccc} n & \text{approximation} & \text{exact} \\ 1 & 0.591506 & 0.596751 \\ 2 & 0.279674 & 0.283168 \\ 3 & 0.151067 & 0.153256 \\ 4 & 0.0870954 & 0.0884650 \\ 5 & 0.0522216 & 0.0530855 \\ 6 & 0.0321485 & 0.0326982 \\ 7 & 0.0201718 & 0.0205243 \\ 8 & 0.0128409 & 0.0130686 \\ 9 & 0.00826756 & 0.00841548 \\ 10 & 0.00537202 & 0.00546863 \end{array} \right)$$

Update

After my answer to your next question, I reused for this problem my approach with the same Padé approximants and obtained as approximations $$I_n=\frac 2{2n+1} \left(\frac{4}{\pi }\right)^n\,\, _2F_1\left(2 n,\frac{2n+1}{2};\frac{2n+3}{2};-\frac{1}{3}\right)\tag 2$$ $$I_n=\frac 2{2n+1} \left(\frac{4}{\pi }\right)^n\,F_1\left(\frac{2n+1}{2};-2 n,2 n;\frac{2n+3}{2};\frac{1}{30},-\frac{3}{10}\right)\tag 3$$

• Thanks , by this way we can find J_n Commented Jun 2, 2018 at 20:47
• @zeraouliarafik. At least an approximation of it. Commented Jun 3, 2018 at 1:40
• Really it is a nice approximation , I should accept this slick answer Commented Jun 3, 2018 at 2:20
• Since this question answered by good approximation, Could you answer me this question: math.stackexchange.com/q/2803363/156150 and thanks Commented Jun 3, 2018 at 2:37
• @zeraouliarafik. Since we are concerned by the $[-1,1]$ range, it would better to use $a=1.252309$. Commented Jun 3, 2018 at 13:52