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)$

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}$.