Solution (source code)

= Solution

Put $\tau=t+b$ and $q=x+a$. For $\theta=f(t)e^{-q^2/(4\tau)}$, <partial differentiation> gives
$$
\theta_t=\left(f'+\frac{q^2f}{4\tau^2}\right)e^{-q^2/(4\tau)},\qquad \theta_{xx}=\left(-\frac f{2\tau}+\frac{q^2f}{4\tau^2}\right)e^{-q^2/(4\tau)}.
$$
The <heat equation> therefore requires $f'=-f/(2\tau)$, giving $f=C/\sqrt{|t+b|}$ on an interval not containing $-b$. A decaying spatial <Gaussian function> uses $t+b>0$, so $f=C/\sqrt{t+b}$ there.

The initial profile is a difference of two translated <Gaussian functions>. Set $b=1/4$, $a=-2$ and $a=2$, with respective constants $C=1/2$ and $C=-1/2$. The <superposition principle> gives
$$
\boxed{\theta(x,t)=\frac{e^{-(x-2)^2/(1+4t)}-e^{-(x+2)^2/(1+4t)}}{\sqrt{1+4t}},\qquad t\geq0.}
$$
This is an <odd pair of Gaussian profiles under diffusion>, obtained from <Gaussian initial data for the heat equation>. It is <odd> in $x$, vanishes at zero, is positive for $x>0$ and negative for $x<0$. The two lobes broaden and decrease in height, and $\theta(x,t)\to0$ at every fixed $x$ as $t\to\infty$. Their extrema move; they do not remain exactly at $\pm2$.

\Image[/past-exam-of-the-mathematics-course-of-the-year-1-of-the-natural-sciences-course-of-the-university-of-cambridge/2002/paper-1-odd-gaussian-diffusion.png]
{title=Diffusion of two Gaussian profiles with opposite signs}
{description=Original plots at several times show the odd symmetry, decreasing amplitudes and widening lobes.}