# Gaussian integral $y = \int\limits_{-\infty}^{\infty}\sqrt{\frac{a}{\pi}}e^{-\alpha(x-u)^2}\sqrt{\frac{b}{\pi}}e^{-\alpha(u-y)^2}du$

I have to solve this interal: $$$$y = \int\limits_{-\infty}^{\infty}\sqrt{\frac{a}{\pi}}e^{-\alpha(x-u)^2}\sqrt{\frac{b}{\pi}}e^{-\alpha(u-y)^2}du$$$$

$$$$=\frac{\sqrt{ab}}{\pi}\int\limits_{-\infty}^{\infty}e^{-2\alpha u^2+2\alpha u(x+y)-\alpha(x^{2}+y^{2})}du$$$$

can I use that $$\int\limits_{-\infty}^{\infty} e^{-(as^2+bs+c)}\,ds=\sqrt{\frac{\pi}{a}}e^{\frac{b^2}{4a}-c}$$ to solve the integral?

Or should the exponent be a perfect square trinomial?

All fine so far.

Writing:

$$-2 \alpha u^2 + 2\alpha u (x + y) - \alpha (x^2 + y^2) = -(2\alpha u^2 - 2\alpha u(x+y)+\alpha(x^2+y^2))$$

You'll see setting $$a = 2\alpha$$, $$b = -2\alpha(x + y)$$, $$c = \alpha(x^2 + y^2)$$ in your result works just fine.