# Integrate $\int_{-\infty}^\infty {\rm erfc} \left( \frac{x}{\sqrt{2}} \right) e^{-\frac{(x-\mu)^2}{2 \sigma^2}} dx$

Does the integral \begin{align} \int_{-\infty}^\infty {\rm erfc} \left( \frac{x}{\sqrt{2}} \right) e^{-\frac{(x-\mu)^2}{2 \sigma^2}} dx \end{align} have a close form expression.

I found that for $\mu=0$

\begin{align} \int_{-\infty}^\infty {\rm erfc} \left( \frac{x}{\sqrt{2}} \right) e^{-\frac{x^2}{2 \sigma^2}} dx = \sigma \sqrt{2 \pi} \end{align}

Can this be done for $\mu \neq 0$?

If $Z$ is a standard normal random variable, $\text{erfc}(x/\sqrt{2}) = 2 \mathbb P(Z > x)$. Thus if $X$ is another normal random variable, independent of $Z$, with mean $\mu$ and standard deviation $\sigma$, your integral is $$2 \sigma \sqrt{2\pi} \mathbb P(Z > X) = 2 \sigma \sqrt{2\pi} \mathbb P(Z-X > 0)$$ Now $Z - X$ is normal with mean $-\mu$ and standard deviation $\sqrt{1+\sigma^2}$, so this should be $$\sigma \sqrt{2\pi}\; \text{erfc}\left(\frac{\mu}{\sqrt{2 + 2 \sigma^2}}\right)$$