Integrating a 2D Gaussian over a linear strip

255 Views Asked by At

How do I show that

$$\int_{-\infty}^{\infty} \frac{e^{-\frac{x^2}{2 \sigma ^2}} \left(\text{erf}\left(\frac{2 d-\sqrt{2} x}{2 \sigma }\right)+\text{erf}\left(\frac{2 d+\sqrt{2} x}{2 \sigma }\right)\right)}{2 \sqrt{2 \pi } \sigma }dx=\text{erf}\left( \frac{d}{\sqrt{2}\sigma}\right)?$$ Mathematica couldn't do it, though I've verified this numerically. The following argument shows that these are equal, but I want to show this analytically, i.e. using direct integration methods.

(Let

$$P(x,y) = \frac{1}{2\pi \sigma^2} \exp\left(- \frac{x^2+y^2}{2\sigma^2}\right),$$

which is clearly spherically symmetric. I want to integrate this function over the region

$$R = \{ |x-y| \leq d \mid (x,y) \in \mathbb{R}^2\}$$ which is just a diagonal linear strip of width $d$.

(a) I could evaluate

$$ \int_{-\infty}^{\infty}\int_{x-\sqrt{2}d}^{x+\sqrt{2}d} P(x,y)\,dx\,dy = \int_{-\infty}^{\infty} \frac{e^{-\frac{x^2}{2 \sigma ^2}} \left(\text{erf}\left(\frac{2 d-\sqrt{2} x}{2 \sigma }\right)+\text{erf}\left(\frac{2 d+\sqrt{2} x}{2 \sigma }\right)\right)}{2 \sqrt{2 \pi } \sigma }dx \tag{1}$$

(b) or I could note the spherical symmetry of $P(x,y)$, rotate my region $R$ to the $y$-axis, and get

$$\int_{-\infty}^{\infty} \int_{-d}^d P(x,y)\,dx\,dy = \text{erf}\left( \frac{d}{\sqrt{2}\sigma}\right)\tag{2}.)$$

1

There are 1 best solutions below

0
On BEST ANSWER

Direct $x$-integration is not possible. However, expressing the erf functions by (direct) indefinite integrals does the job, after exchanging integration orders:

Notice$$ \text{erf}\left(\frac{2 d\pm\sqrt{2} x}{2 \sigma }\right)= \int \frac{2 e^{-\frac{( \sqrt{2}d \pm x)^2}{2 \sigma^2} }}{\sqrt{\pi} \sigma} \text{d} d $$ Hence we can write $$ \int_{-\infty}^{\infty} \frac{e^{-\frac{x^2}{2 \sigma ^2}} \left(\text{erf}\left(\frac{2 d-\sqrt{2} x}{2 \sigma }\right)+\text{erf}\left(\frac{2 d+\sqrt{2} x}{2 \sigma }\right)\right)}{2 \sqrt{2 \pi } \sigma }dx = \\ \int \text{d} d \int_{-\infty}^{\infty} \frac{e^{-\frac{x^2}{2 \sigma ^2}} \left( \frac{2 e^{-\frac{( \sqrt{2}d + x)^2}{2 \sigma^2} }}{\sqrt{\pi} \sigma} + \frac{2 e^{-\frac{( \sqrt{2}d - x)^2}{2 \sigma^2} }}{\sqrt{\pi} \sigma} \right)}{2 \sqrt{2 \pi } \sigma }dx = \\ 2 \int \frac{e^{-d^2/(2 \sigma^2)}}{\sqrt{2 \pi} \sigma} \text{d} d =\text{erf}\left( \frac{d}{\sqrt{2}\sigma}\right) $$

Done. $\qquad \square$