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!
[Math] convolution computation involving $e^{-x^2}$
convolutionimproper-integrals
Related Solutions
Perhaps this might soothe some of your discomfort.
Smoothing Action
There are many ways that convolution is useful in mathematics. First of all, as you have noted, $$ \mathrm{D}^\alpha\left(f\ast g\right)=\left(\mathrm{D}^\alpha f\right)\ast g\tag{1} $$ This is simply repeated changes of the order of integration and differentiation: $$ \frac{\mathrm{d}}{\mathrm{d}x}\int f(x-t)\,g(t)\,\mathrm{d}t=\int f'(x-t)\,g(t)\,\mathrm{d}t\tag{2} $$ This step can be justified in different ways depending on the context. For instance, if the limit which defines the derivative of $f$, $$ f'(x)=\lim_{h\to0}\frac{f(x+h)-f(x)}{h}\tag{3} $$ converges uniformly, then $(2)$ is valid for all $g\in L^1$.
Convolution combines the smoothness of two functions. That is, if both $f$ and $g$, and their first derivatives are in $L^1$, then the second derivative of their convolution is in $L^1$. This is because $f\ast g = g\ast f$, and so we can use $(2)$ twice to get $$ \frac{\mathrm{d}^2}{\mathrm{d}x^2}(f\ast g)=f'\ast g'\tag{4} $$
Fourier Analysis
Convolution plays an important role in Fourier Analysis. The key formulas demonstrate the duality between convolution and multiplication: $$ \mathscr{F}(f\ast g)=\mathscr{F}(f)\mathscr{F}(g)\quad\text{and}\quad\mathscr{F}(fg)=\mathscr{F}(f)\ast\mathscr{F}(g)\tag{5} $$ There also exists a duality between decay at $\infty$ and smoothness. Essentially, one derivative of smoothness of $f$ corresponds to one factor of $1/x$ in the decay of $\mathscr{F}(f)$, and vice versa.
The product of decaying functions decays even faster; e.g. $x^{-n}x^{-m}=x^{-(n+m)}$. The duality demonstrated in $(5)$ then says that the convolution of smooth functions is even smoother.
The Riemann-Lebesgue Lemma says that for $f\in L^1$, $$ \lim_{|x|\to\infty}\mathscr{F}(f)(x)=0\tag{6} $$ However, this is simply decay with no quantification. About all that can be said about $f,g\in L^1$ is that $f\ast g\in L^1$. However, if $f,g\in L^2$, then $f\ast g$ is continuous.
Summing Dice
Perhaps one of the earliest uses of convolution was in probability. If $f_n(k)$ is the number of ways to roll a $k$ on $n$ six-sided dice, then $$ f_n(k)=\sum_jf_{n-1}(k-j)f_1(j)\tag{7} $$ That is, for each way to achieve $k$ on $n$ dice, we must have $k-j$ on $n-1$ dice and $j$ on the remaining die. Equation $(7)$ represents discrete convolution.
The distribution function for the roll of a single six-sided die is evenly distributed among $6$ possibilities. This has discontinuities at $1$ and $6$ ($n=1$). The distribution function for the sum of two six-sided dice is the convolution of two of the one die distributions. This is continuous, but not smooth ($n=2$). The distribution function for the sum of three six-sided dice is the convolution of the one die and two dice distributions. This is smooth ($n=3$). For each die we add, we convolve one more of the one die distributions and the function gets smoother.
$\hspace{8mm}$
As $n\to\infty$, the distribution approaches a scaled version of the normal distribution: $\frac1{\sqrt{2\pi}}e^{-x^2/2}$.
When faced with a problem in Calculus involving piecewise functions (such as the Heaviside), you can almost always make it easier on yourself but dividing into cases where the function takes different simpler non-piecewise forms. Then evaluate those individually.
Another way to approach it in this case: we are guaranteed that $0 < \tau < t$ at all times, just due to the integration bounds. This means that $t - \tau > 0$ for the whole integration, so $H(t - \tau) = 1$. This reduces it to $$\int_0^t \frac{\tau}{\sqrt{\tau^2-\alpha^2}} H(\tau-\alpha) d\tau$$
At this point, as you stated -- if $\tau < a$, then the integrand vanishes. And for $\tau > \alpha$, the $H(\tau - \alpha)$ becomes 1. So we can break it up into these two parts. (As I said, case-splitting!)
$$ \int_0^t \frac{\tau}{\sqrt{\tau^2-\alpha^2}} H(\tau-\alpha) d\tau = $$ $$\int_0^\alpha \frac{\tau}{\sqrt{\tau^2-\alpha^2}} H(\tau-\alpha) d\tau + \int_\alpha^t \frac{\tau}{\sqrt{\tau^2-\alpha^2}} H(\tau-\alpha) d\tau =$$ $$\int_\alpha^t \frac{\tau}{\sqrt{\tau^2-\alpha^2}} d\tau$$
which should work out fine. (Keep in mind that this final form is only true if $\alpha>0$, though! )
Best Answer
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.