I have a question about the heat equation $\frac{\partial \varphi}{\partial t} = \frac{\partial^2 \varphi}{\partial x^2}$ with the conditions that $\varphi(x,t=0) = f_0(x)$ and $\lim_{x \rightarrow\pm \infty}\varphi(x,t) = 0$ for every $t \in \mathbb{R}$. The usual way of solving this equation is by separation of variables, i.e., $\varphi(x,t) = A(x)B(t)$. Then one gets the two ordinary differential equations
\begin{equation} \frac{1}{B}\frac{dB}{dt} = \frac{1}{A}\frac{d^2A}{dx^2} = -\gamma \mbox{,} \end{equation}
where $\gamma > 0$ in order that the condition $\lim_{x \rightarrow\pm \infty}\varphi(x,t) = 0$ is satisfied. The thing is that I can also Fourier transform the solution: $\widehat{\varphi}(k,t) = \widehat{A}(k)B(t)$, i.e., the Fourier transformed solution is also a product of a function only of $k$ and one only of $t$. However, when I Fourier transform the equation ($\partial/\partial x \leftrightarrow ik$) I get $\frac{\partial\widehat{\varphi}}{\partial t} = -k^2 \widehat{\varphi}(k,t)$, which can be readily solved as $\widehat{\varphi}(k,t) = \widehat{f_0}(k)e^{-k^2 t}$. But this solution in Fourier space cannot be represented as a product of two functions - one only of $k$ and the other one only of $t$ although it should. I oversee something. Can someone help me?