$\int_{-\infty}^{\infty} \frac{1}{2\pi} \exp\{ -\frac{1}{2} ((y-x)^2 + x^2) \} dx$

$$\int_{-\infty}^{\infty} \frac{1}{2\pi} \exp\{ -\frac{1}{2} ((y-x)^2 + x^2) \} dx$$

What I thought of doing was expand the inside

$$\int_{-\infty}^{\infty} \frac{1}{2\pi} \exp\{ -\frac{1}{2}y^2 + xy -x^2 \} dx$$

then I can take out the $-\frac{1}{2}y^2$ part ... but how do I proceed?

I got line 2 of the image below, but how did they goto line 3?

• square completion Oct 20 '13 at 6:06
• He has gone away from this site after posting question . Oct 21 '13 at 5:43