How did wolfram simplify this integral

calculusintegrationmeasure-theoryreal-analysis

I am computing a convolution $e^{-ax^2}*e^{-bx^2}$. The integral is of course $\int_{-\infty}^{\infty} e^{-a(x-w)^2 – bw^2}dw$, and I have simplified this down to
$$\sqrt{\pi}\frac{e^{-x^2\frac{ab}{a+b}}}{\sqrt{a+b}}\bigg{(} 1+\text{erf}\big{(} \frac{ax}{\sqrt{a+b}}\big{)}\bigg{)} $$
this calculation can be found here. Also, putting that integral into wolfram alpha gives the same answer.
BUT when I give wolfram alpha the command convolution$(e^{-ax^2}, e^{-bx^2})$ it returns
$$\sqrt{\pi}\frac{e^{-x^2\frac{ab}{a+b}}}{\sqrt{a+b}} $$
Where is this value coming from/ why does it differ from the integral?

Best Answer

What you need is the Gaussian integral $$\int_{-\infty}^{\infty}e^{-c(t+d)^2}\,dt=\sqrt{\frac{\pi}{c}} $$ and note that $$-a(x-w)^2-bw^2=-(a+b)\left(w-\frac{ax}{a+b}\right)^2-\frac{abx^2}{a+b} $$

Related Question