# Heat diffusion equation with external time dependent force

I'm having an issue solving the following problem with the Fourier transform: $$\left\{\begin{matrix}\partial_{t} u = D\partial^{2}_{xx}u + f(t)\\ u(x,0) = e^{-x^2}\\ -\infty<x<+\infty\end{matrix}\right.$$ where $$f(t) = \left\{\begin{matrix} 1&0<t<\tau\\ 0&t>\tau\\ \end{matrix}\right.$$ ($\tau$ is not specified). My biggest concern is the following: when I apply the Fourier transform defined as: $$u(k,t)=\frac{1}{\sqrt{2\pi}}\int_{\mathbb{R}}e^{-ikx}u(x,t)dx$$to both side how does the external force transform? It's not a function of $x$. Can I consider it as a constant as far as the integral is concerned? If someone could answer me with the correct way to solve this problem would be really appreciated!

• Because the force function is constant with respect to $x$, the Fourier Transform will be the same force function multiplied by the Fourier Transform of $1$. – Paul Jul 9 '18 at 10:46
• So, correct me if I'm wrong but I would get a Dirac delta and then, anti transforming the result I get is $$\frac{1}{\sqrt{4Dt+1}}e^{-\frac{x^2}{4Dt+1}}+\int_{0}^{t}f(t')dt'$$ – Davide Morgante Jul 9 '18 at 15:54