# An $\operatorname{erfi}(x)e^{-x^2}$ integral

I want to find an elementary evaluation of

$$I=\int_0^\infty \left(\frac{\sqrt\pi}2\operatorname{erfi}(x)e^{-x^2}-\frac1{1+2x}\right)dx$$ where $\operatorname{erfi}(x)=\frac{2}{\sqrt\pi}\int_0^xe^{t^2}dt$.

Rough Solution
$$I=\int_0^\infty\left({}_1F_1(1;3/2,-x^2)x-\frac1{1+2x}\right)dx$$ $$=\left(\frac{x^2}2{}_2F_2(1,1;3/2,2,-x^2)-\frac12\ln(1+2x)\right)\Bigg|_0^\infty$$ By using the asymptotic expansion of $_2F_2$ I can get the answer is $\frac{\gamma}4$, where $\gamma$ is the Euler's constant.
I wonder if there is a elementary proof without using hypergeometric function.

• $erfi(x)$ and $erf(x)$ , which one is yours? In general $\operatorname{erfi}(x)=\frac{2}{\sqrt{\pi}}\int_0^xe^{z^2}dz,$ and $\operatorname{erf}(x)=\frac{2}{\sqrt{\pi}}\int_0^xe^{-z^2}dz.$ Commented Sep 14, 2018 at 9:25
• @Riemann. According to the result, it is $\text{erfi}$ Commented Sep 14, 2018 at 9:57
• Probably not useful, but $$I=\int_0^\infty\,\left(\frac{\sqrt{\pi}}{2}\,\text{erfc}(x)\,\exp\left(+x^2\right)-\frac{1}{1+2x}\right)\,\text{d}x\,.$$ Here, $\text{erfc}(x)=1-\text{erf}(x)$ for all $x\in\mathbb{C}$. (Of course, I assume that $\text{erf}$ and $\text{erfi}$ are defined correctly as Riemann suggested.) Commented Sep 14, 2018 at 10:19
• @KemonoChen Can you please clarify your question. Commented Sep 14, 2018 at 13:16
• It is $\operatorname{erfi}$. Sorry for the typo. Commented Sep 14, 2018 at 13:16

\begin{align}I&=\lim_{a\to\infty}\int_0^a\left(e^{-x^2}\int_0^x e^{t^2}~dt-\frac{1}{1+2x}\right)dx\\\color{gray}{[t=xy]}&=\lim_{a\to\infty}\left(\int_0^a\!\!\int_0^1 xe^{-x^2(1-y^2)}~dy~dx-\frac{1}{2}\ln(1+2a)\right)\\\color{gray}{[\text{int. over }x]}&=\lim_{a\to\infty}\left(\int_0^1\frac{1-e^{-a^2(1-y^2)}}{2(1-y^2)}~dy-\frac{\ln2a}{2}\right)\\\color{gray}{[\text{int. by parts}]}&=\lim_{a\to\infty}\left(\frac{a^2}{2}\int_0^1ye^{-a^2(1-y^2)}\ln\frac{1+y}{1-y}~dy-\frac{\ln2a}{2}\right)\\\color{gray}{[a^2(1-y^2)=z]}&=\lim_{a\to\infty}\left(\frac{1}{4}\int_0^{a^2}e^{-z}\ln\frac{1+\sqrt{1-z/a^2}}{1-\sqrt{1-z/a^2}}~dz-\frac{\ln2a}{2}\right)\end{align} and, using $$\dfrac{1+\sqrt{1-z/a^2}}{1-\sqrt{1-z/a^2}}=\dfrac{(1+\sqrt{1-z/a^2})^2}{z/a^2}$$ and $$\displaystyle\int_0^\infty e^{-z}\ln z~dz=-\gamma$$, we get indeed $$I=\frac{1}{2}\lim_{a\to\infty}\int_0^{a^2}e^{-z}\ln\left(1+\sqrt{1-z/a^2}\right)~dz+\frac{\gamma}{4}-\frac{\ln 2}{2}\color{blue}{=\frac{\gamma}{4}}.$$