# Define integral containing error function and exponential function

I am trying to solve the following improper integral

$$I(G) = \int_{-\infty}^{\infty} \! \exp(i G r) \, \textrm{erf}(r) \, \dfrac{1}{r^2} \, dr$$

for $$\{G \in \mathbb{R}: G \neq 0 \}$$. For the case of $$G = 0$$ one get

I tried to solve this integral by using contour integration and the Jordan's Lemma. However, the Jordan's Lemma suggests that $$I(G)$$ is $$0$$ since $$\textrm{erf}(r) \, \dfrac{1}{r^2}$$ doesn't have any poles in the upper plane or on the axes.

What is the correct solution of this improper integral?

• As a straightforward integral over real r, it diverges. Jul 20, 2021 at 21:24
• The term $exp(iGr)$ changes this. It should be convergent. Jul 21, 2021 at 1:48
• For $r$ near $0$, the integrand ~ $\frac{1}{r^2}$, and $e^{iGr}$ ~ $1$. You could use $e^{iGr}=cos(Gr)+isin(Gr)$, so the real part blows up. Jul 21, 2021 at 3:37
• @herbsteinberg. This is a more than clever idea ! Cheers :-) Jul 21, 2021 at 4:56
• Given that $\textrm{erf}(r)$ is odd and $\sim r$ at $r\to0$ integral can be evaluated in PV sense. But I'm not sure that the closed form does exist. And you cannot simply close contour by big circle in the upper half-plane without $\textrm{erf}(r)$ behavior investigation at imaginary $r$ Jul 21, 2021 at 6:12

As discussed in the comments, the real part of the integral diverges due to the singularity near the origin and we can redefine it using the principal value in order to get a finite result. So let us consider $$I (G) = \operatorname{P.V.} \int \limits_{-\infty}^\infty \frac{\mathrm{e}^{\mathrm{i} G r} \operatorname{erf}(r)}{r^2} \, \mathrm{d} r$$ for $$G \in \mathbb{R}$$ instead.

The real part is $$\operatorname{Re} I(G) = \lim_{\varepsilon \to 0^+} \left[~\int \limits_{-\infty}^{-\varepsilon} \frac{\cos(G r) \operatorname{erf}(r)}{r^2} \, \mathrm{d} r + \int \limits_\varepsilon^\infty \frac{\cos(G r) \operatorname{erf}(r)}{r^2} \, \mathrm{d} r \right] .$$ Since the integrand is an odd function, the first integral is exactly the negative of the second (just let $$r \to -r$$) and they cancel, so $$\operatorname{Re} I(G) = 0$$.

The imaginary part of the integrand is regular at the origin, so we can drop the principal value and write $$\operatorname{Im} I(G) = \int \limits_{-\infty}^\infty \frac{\sin(G r) \operatorname{erf}(r)}{r^2} \, \mathrm{d} r \, .$$ Clearly, $$\operatorname{Im} I(0) = 0$$. Now let $$G \in \mathbb{R} \setminus \{0\}$$. By definition we have $$\operatorname{erf} (r) = \frac{2}{\sqrt{\pi}} \int \limits_0^r \mathrm{e}^{- t^2} \mathrm{d} t = \frac{2}{\sqrt{\pi}} r \int \limits_0^1 \mathrm{e}^{- r^2 u^2} \mathrm{d} u$$ for $$r \in \mathbb{R}$$. Fubini's theorem allows us to interchange the two integrals to obtain $$\operatorname{Im} I(G) = \frac{2}{\sqrt{\pi}} \int \limits_0^1 \int \limits_{-\infty}^\infty \frac{\sin(Gr)}{r} \mathrm{e}^{-u^2 r^2} \mathrm{d} r \, \mathrm{d} u \, .$$ The inner integral can be found by differentiating it with respect to $$G$$, computing the resulting Fourier transform of a Gaussian and then integrating with respect to $$G$$ again (in fact, I have recently done this calculation in this answer to another question). The result is $$\pi \operatorname{erf} \left(\frac{G}{2u}\right)$$, so \begin{align} \operatorname{Im} I(G) &= 2 \sqrt{\pi} \int \limits_0^1 \operatorname{erf} \left(\frac{G}{2u}\right) \, \mathrm{d} u \overset{\text{IBP}}{=} 2 \sqrt{\pi} \operatorname{erf} \left(\frac{G}{2}\right) + 2 G \int \limits_0^1 \frac{\mathrm{e}^{-\frac{G^2}{4u^2}}}{u} \, \mathrm{d} u\\ & \!\!\!\!\overset{u = \frac{\lvert G \rvert}{2 \sqrt{v}}}{=} 2 \sqrt{\pi} \operatorname{erf} \left(\frac{G}{2}\right) + G \int \limits_{G^2/4}^\infty \frac{\mathrm{e}^{-v}}{v} \, \mathrm{d}v = 2 \sqrt{\pi} \operatorname{erf} \left(\frac{G}{2}\right) + G \operatorname{E}_1 \left(\frac{G^2}{4}\right) \, . \end{align} Here $$\operatorname{E}_1$$ is an exponential integral.

Therefore, the final result is $$I(G) = \begin{cases} \mathrm{i} \left[2 \sqrt{\pi} \operatorname{erf} \left(\frac{G}{2}\right) + G \operatorname{E}_1 \left(\frac{G^2}{4}\right) \right]& \text{for} ~ G \in \mathbb{R} \setminus \{0\} \\ 0 & \text{for} ~ G = 0 \end{cases}.$$