# Show $\frac{2}{\pi} \mathrm{exp}(-z^{2}) \int_{0}^{\infty} \mathrm{exp}(-z^{2}x^{2}) \frac{1}{x^{2}+1} \mathrm{d}x = \mathrm{erfc}(z)$

I used the result $$\frac{2}{\pi} \mathrm{exp}(-z^{2}) \int\limits_{0}^{\infty} \mathrm{exp}(-z^{2}x^{2}) \frac{1}{x^{2}+1} \mathrm{d}x = \mathrm{erfc}(z)$$ to answer this MSE question. As I mentioned in the link, I obtained this result from the DLMF. I happened to find this solution after failing to evaluate the integral using a variety of substitutions. A solution would be appreciated.

Expanding @Jack D'Aurizio's solution, we have

\begin{align} \frac{2}{\pi} \mathrm{e}^{-z^{2}} \int\limits_{0}^{\infty} \frac{\mathrm{e}^{-z^{2}x^{2}}}{x^{2} + 1} \mathrm{d}x &= \frac{2z}{\pi} \mathrm{e}^{-z^{2}} \int\limits_{0}^{\infty} \frac{\mathrm{e}^{-t^{2}}}{z^{2} + t^{2}} \mathrm{d}t \\ &= \frac{z}{\pi} \mathrm{e}^{-z^{2}} \int\limits_{-\infty}^{\infty} \frac{\mathrm{e}^{-t^{2}}}{z^{2} + t^{2}} \mathrm{d}t \end{align} we used the substitution $x=t/z$.

For the integral $$\int\limits_{-\infty}^{\infty} \frac{\mathrm{e}^{-t^{2}}}{z^{2} + t^{2}} \mathrm{d}t$$ we let $f(t) = \mathrm{e}^{-t^{2}}$ and $g(t) = 1/(z^{2} + t^{2})$ and take Fourier transforms of each, $$\mathrm{F}(s) = \mathcal{F}[f(t)] = \frac{\mathrm{e}^{-s^{2}/4}}{\sqrt{2}}$$ and $$\mathrm{G}(s) = \mathcal{F}[g(t)] = \frac{1}{z}\sqrt{\frac{\pi}{2}} \mathrm{e}^{-z|s|}$$ then invoke Parseval's theorem $$\int\limits_{-\infty}^{\infty} f(t)\overline{g(t)} \mathrm{d}t = \int\limits_{-\infty}^{\infty} \mathrm{F}(s)\overline{\mathrm{G}(s)} \mathrm{d}s$$ dropping constants, the integral becomes

\begin{align} \int\limits_{-\infty}^{\infty} \mathrm{e}^{-s^{2}/4} \mathrm{e}^{-z|s|} \mathrm{d}s &= 2\int\limits_{0}^{\infty} \mathrm{e}^{-s^{2}/4} \mathrm{e}^{-z|s|} \mathrm{d}s \\ &= 2\mathrm{e}^{z^{2}} \int\limits_{0}^{\infty} \mathrm{e}^{-(s+2z)^{2}/4} \mathrm{d}s \\ &= 4\mathrm{e}^{z^{2}} \int\limits_{0}^{\infty} \mathrm{e}^{-y^{2}} \mathrm{d}y \\ &= 2\sqrt{\pi}\mathrm{e}^{z^{2}} \mathrm{erfc}(z) \end{align} We completed the square in the exponent and used the substitution $y=z+s/2$.

Putting the pieces together yields our desired result \begin{align} \frac{2}{\pi} \mathrm{e}^{-z^{2}} \int\limits_{0}^{\infty} \frac{\mathrm{e}^{-z^{2}x^{2}}}{x^{2} + 1} \mathrm{d}x &= \frac{z}{\pi} \mathrm{e}^{-z^{2}} \int\limits_{-\infty}^{\infty} \frac{\mathrm{e}^{-t^{2}}}{z^{2} + t^{2}} \mathrm{d}t \\ &= \frac{z}{\pi} \mathrm{e}^{-z^{2}} \frac{1}{\sqrt{2}} \frac{1}{z} \sqrt{\frac{\pi}{2}} 2\sqrt{\pi} \mathrm{e}^{z^{2}} \mathrm{erfc}(z) \\ &= \mathrm{erfc}(z) \end{align}

• The approach I used had already been used in an answer to a related question to evaluate the case $z=1$. – Random Variable Nov 20 '17 at 2:47

With the substitution $x=\frac{t}{z}$, the integral on the left becomes

$$I=\frac{2}{\pi z e^{z^2}}\int_{0}^{+\infty}\frac{e^{-t^2}}{1+\frac{t^2}{z^2}}\,dt = \frac{1}{\pi z e^{z^2}}\int_{-\infty}^{+\infty}\frac{e^{-t^2}}{1+\frac{t^2}{z^2}}\,dt$$ and we may switch to Fourier transforms. Since $$\mathcal{F}(e^{-t^2}) = \frac{1}{\sqrt{2}}e^{-s^2/4},\qquad \mathcal{F}\left(\frac{1}{1+\frac{t^2}{z^2}}\right)=z\sqrt{\frac{\pi}{2}} e^{-z|s|}$$ $I$ boils down to an integral of the form $\int_{0}^{+\infty}\exp\left(-(s-\xi)^2\right)\,ds$ that is straightforward to convert in a expression involving the (complementary) error function.

As an alternative, you may use differentiation under the integral sign to prove that both sides of your equation fulfill the same differential equation with the same initial constraints, then invoke the uniqueness part of the Cauchy-Lipschitz theorem: $$\frac{d}{dz} LHS = -\frac{2}{\pi}\int_{0}^{+\infty}2z e^{-z^2 (x^2+1)}\,dx,\qquad \frac{d}{dz}RHS = -\frac{2}{\sqrt{\pi}}e^{-z^2}.$$ We have $\frac{d}{dz}(LHS-RHS)=0$, and $(LHS-RHS)(0)=1$.

An interesting consequence is the following (tight) approximation for the $\text{erfc}$ function:

$$\text{erfc}(z)=\frac{2e^{-z^2}}{\pi}\int_{0}^{+\infty}\frac{e^{-z^2 x^2}}{x^2+1}\,dx\leq \frac{2e^{-z^2}}{\pi}\int_{0}^{+\infty}\frac{dx}{(x^2+1)(x^2 z^2+1)}=\frac{1}{(1+z)e^{z^2}}.$$

• You always was generous with your answers in this site MSE. My vote is $A^{A^{+}}$, thanks from all users! – user243301 Oct 18 '16 at 14:37
• Thanks @Jack D'Aurizio. I expanded your solution and added it to the question. – poweierstrass Oct 20 '16 at 0:00

Assuming $z>0$,

\begin{align}\int_{0}^{\infty} \frac{e^{-z^{2}x^{2}}}{1+x^{2}} \, dx &= \int_{0}^{\infty}e^{-z^{2}x^{2}} \int_{0}^{\infty}e^{-t(1+x^{2})} \, dt \, dx \\ &= \int_{0}^{\infty} e^{-t} \int_{0}^{\infty}e^{-(z^{2}+t)x^{2}} \, dx \, dt \tag{1}\\ &= \frac{\sqrt{\pi}}{2}\int_{0}^{\infty} \frac{e^{-t}}{\sqrt{z^{2}+t}} \, dt \tag{2}\\ &= \frac{\sqrt{\pi}}{2} \, e^{z^{2}}\int_{z^{2}}^{\infty}\frac{e^{-u}}{\sqrt{u}} \, du \\ &= \sqrt{\pi} \, e^{z^{2}} \int_{z}^{\infty} e^{-w^{2}} \, dw \\ &= \frac{\pi}{2} \, e^{z^{2}}\operatorname{erfc}(z) \end{align}

$(1)$ Tonelli's theorem

$(2)$ $\int_{0}^{\infty} e^{-ax^{2}} \, dx = \frac{\sqrt{\pi}}{2} \frac{1}{\sqrt{a}}$ for $a>0$

$(3)$ Let $u = z^{2}+t$.

$(4)$ Let $w=\sqrt{u}$.

• Excellent. Your initial substitution is exactly what I was seeking. – poweierstrass Oct 20 '16 at 10:49

$$\begin{eqnarray} &&\int\limits_0^\infty \frac{e^{-z^2 x^2}}{1+x^2} dx=\\ &&\int\limits_0^\infty \frac{e^{-\frac{1}{2} (\sqrt{2}z)^2 x^2}}{1+x^2} dx=\\ &&2 \pi T(\sqrt{2} z, \infty) e^{\frac{1}{2} (\sqrt{2}z)^2}\\ &&2 \pi \int\limits_{\sqrt{2} z}^\infty \frac{e^{-1/2 \xi^2}}{\sqrt{2 \pi}} \frac{1}{2} \underbrace{erf(\frac{\infty \cdot \xi}{\sqrt{2}})}_{1} d\xi e^{\frac{1}{2} (\sqrt{2}z)^2}=\\ &&\frac{\pi}{2} erfc(z) e^{z^2} \end{eqnarray}$$ where $$T(h,a)$$ is the Owen's T function https://en.wikipedia.org/wiki/Owen%27s_T_function .