Solution (source code)

= Solution

Use the convention
$$
\widehat f(k)=\int_{\mathbb R}f(x)e^{-ikx}dx,\qquad f(x)=\frac1{2\pi}\int_{\mathbb R}\widehat f(k)e^{ikx}dk.
$$
These are the <Fourier transform> and <inverse Fourier transform> for suitably integrable data. Assuming the required ordinary transforms exist and the lower derivatives vanish at both ends, <integration by parts> gives $\widehat{g'}=[ge^{-ikx}]_{-\infty}^{\infty}+ik\widehat g=ik\widehat g$. Repeating this argument yields
$$
\boxed{\widehat{g^{(n)}}(k)=(ik)^n\widehat g(k).}
$$
The decay assumptions are used to discard the boundary terms at each step.

For positive diffusivity $\alpha$, transforming the <heat equation> gives $\partial_t\widehat f=-\alpha k^2\widehat f$. Thus $\widehat f(k,t)=e^{-\alpha k^2t}\widehat f_0(k)$, where $f_0(x)=f(x,0)$. The <convolution theorem> and the <Gaussian heat kernel> give
$$
\boxed{f(x,t)=\frac1{\sqrt{4\pi\alpha t}}\int_{\mathbb R}e^{-(x-\xi)^2/(4\alpha t)}f_0(\xi)\,d\xi,\qquad t>0.}
$$
For $f_0(x)=e^{-x^2}$, the <Fourier transform of a Gaussian> is $\sqrt\pi e^{-k^2/4}$. Multiplying by the heat factor and inverting gives the <Gaussian initial data for the heat equation> solution
$$
\boxed{f(x,t)=\frac1{\sqrt{1+4\alpha t}}\exp\left[-\frac{x^2}{1+4\alpha t}\right].}
$$
It recovers the initial profile as $t\downarrow0$ and preserves its spatial integral $\sqrt\pi$.