convolution computation involving $e^{-x^2}$ In working a problem involving convolution, I have arrived at the following integral, but do not know how to compute it:
$$2\int_0^{\infty}e^{-a(x-y)^2-by^2}dy$$
I thought that this integrand did not have an antiderivative. Based on the way the problem is formulated, however, there must be an actual solution.
Thank you for your help!
 A: Expand the argument of the exponential:
$$\begin{align}\int_0^{\infty} dy \: e^{-a (x-y)^2} e^{-b y^2} &= e^{-a x^2} \int_0^{\infty} dy \: e^{-(a+b)y^2 + 2 a x y}\end{align}$$
Now complete the square in the exponential:
$$\begin{align}(a+b) y^2 - 2 a x y &= (a+b) \left[y^2 - \frac{2 a x}{a+b} y + \left( \frac{a x}{a+b} \right )^2 \right ] - \frac{a^2 x^2}{a+b} \\ &=(a+b) \left(y - \frac{a x}{a+b} \right)^2- \frac{a^2 x^2}{a+b} \end{align}$$
so that the integral becomes
$$\begin{align}e^{-(a b/(a+b)) x^2} \int_0^{\infty} dy \: e^{-(a+b) \left(y - \frac{a x}{a+b} \right)^2} &= e^{-(a b/(a+b)) x^2} \int_{-\frac{a x}{a+b}}^{\infty} du \: e^{-(a+b) u^2}\\ &= \frac{e^{-(a b/(a+b)) x^2}}{\sqrt{a+b}} \int_{-\frac{a x}{\sqrt{a+b}}}^{\infty} dv \: e^{-v^2}\\ &= \frac{e^{-(a b/(a+b)) x^2}}{\sqrt{a+b}} \frac{\sqrt{\pi}}{2} \left[ 1+ \text{erf}\left (\frac{a x}{\sqrt{a+b}} \right ) \right ]\end{align}$$
where erf is the standard error function.
A: You have:
$$
-a(x - y)^2 - b y^2 = - (a + b) \left(y - \frac{a x}{a + b} \right)^2 + \frac{a b x^2}{(a + b)^2}
$$
The substitution $u = \sqrt{a + b} \left(y - \frac{a x}{a + b} \right)$ reduces this to an integral involving the error function.
