# About the integral $\int_\mathbb{R} e^{-x^2 -(x-\xi)^2}\,dx$

everyone.

While solving a PDE, I used Poisson's formula for the diffusion equation, which eventually gave me an integral:

$$\frac{1}{4\sqrt{\pi t}}\int\limits_{-\infty}^{\infty} e^{-\xi^2}e^{\frac{-(x-\xi)^2}{4t}}d\xi$$

where $t$ and $x$ are parameters.

(This is essentially a convolution of a gaussian with another gaussian, shifted by $x$ and rescaled by $4t$.)

I kind of struggle to take this integral.

Any help would be appreciated.

Complete square, translate and use the fact that $\int e^{-x^2} dx = \sqrt{\pi}.$

First, notice that $x^2+(x-\xi)^2= \left(\sqrt{2}x-\frac{\xi}{\sqrt{2}} \right)^2+\frac{\xi^2}{2}$ ("complete the square"). Then, $e^{-x^2-(x-\xi)^2}=e^{-\frac{\xi^2}{2}}e^{-\left(\sqrt{2}x-\frac{\xi}{\sqrt{2}} \right)^2}.$ Integrate now, \begin{align} \int\limits_{\Bbb R} dx e^{-x^2-(x-\xi)^2} &= e^{-\frac{\xi^2}{2}}\int\limits_{\Bbb R} dx e^{-\left(\sqrt{2}x-\frac{\xi}{\sqrt{2}} \right)^2} \\ &= \dfrac{e^{-\frac{\xi^2}{2}}}{\sqrt{2}} \int\limits_{\Bbb R} dx e^{-x^2}\\ &= \sqrt{\dfrac{\pi}{2}} e^{-\frac{\xi^2}{2}}. \end{align}

• Well, have been trying to do just that for the past few hours. Could you expand a bit, please? Commented Apr 19, 2017 at 5:19
• I am a bit amazed that people doing PDE don't know how to complete the square. No offense, but it is striking. Commented Apr 19, 2017 at 5:29
• In his book "Infinitesimal Calculus" the mathematician Jean Dieudonné (advisor of well-known field-medallist Grothendieck and scribe of Nicolás Bourbaki) stated that is sorry and pathetic that nowdays the mathematicians prefer "abstraction" over being able to perform calculations, specially for the first year undergraduates. It is kind of true; when I studied myself undergrad, we believe to be "better" because we "understood" the abstract "high-end" mathematics (we would mock of the engineers or physicists) but we ourselves would not be able to solve a simple ODE... how pathetic we were. Commented Apr 19, 2017 at 5:36
• Anyways, @VladimirNikishkin do you see know what do? There is a change of variables somewhere in the edit that I didn't write out explicitly, but it is rather obvious. Commented Apr 19, 2017 at 5:46
• Don't be arrogant, Will M. , please. I haven't done any calculus in ~5 years. Of course I forgot a lot. Commented Jun 4, 2017 at 13:15

@Will M. provides help.

This is from Mathematica: $$\int \exp \left(-x^2-(x-\xi )^2\right) \, dx = \frac{1}{2} \sqrt{\frac{\pi }{2}} e^{-\frac{\xi ^2}{2}} \text{erf}\left(\frac{2 x-\xi }{\sqrt{2}}\right)$$ Therefore $$\int_{-\infty}^{\infty} \exp \left(-x^2-(x-\xi )^2\right) \, dx = \sqrt{\frac{\pi }{2}} e^{-\frac{\xi ^2}{2}}$$

As you noted, the shape is Gaussian. For this plot $\xi=-2$.