# Inhomogeneous heat equation with Fourier transform

Consider the heat equation

$$\dfrac{\partial u}{\partial t}=\dfrac{\partial^2 u}{\partial x^2} +G(x,t).$$

with the condition $u(x,0)=f(x)$. When $G(x,t)=0$ it is quite easy to solve it using Fourier transform. Taking the Fourier transform in the $x$ variable we have

$$\dfrac{\partial \hat{u}}{\partial t}=-4\pi^2 \xi^2 \hat{u}(\xi,t)$$

With the obvious solution

$$\hat{u}(\xi,t)=A(\xi)e^{-4\pi^2\xi^2 t}.$$

If we then impose $u(x,0)=f(x)$ we get $\hat{u}(\xi,0)=\hat{f}(\xi)$ and hence

$$\hat{u}(\xi,t)=\hat{f}(\xi)e^{-4\pi^2\xi^2 t}$$

Which upon introducing the heat kernel is the same as $u(x,t)=f\ast \mathcal{H}_t(x)$. So this is quite straightforward.

Now, I'm trying to deal with the case $G\neq 0$, with $G\in \mathcal{S}(\mathbb{R}^2)$. I've found that the solution should be

$$u(x,t)=f\ast \mathcal{H}_t(x)+\int_0^t \int_{-\infty}^{\infty} G(y,s)\mathcal{H}_{t-s}(x-y)dyds.$$

Now I really have no idea where this comes from.

How does one arrive at this solution using Fourier transform? And how does one actually prove rigorously it is the desired solution?

• when you take the fourier transform of the equation, you get an inhomogenous ODE, where the inhomogenity is the fourier transform of $G$. You know the solution to the homogeneous equation, therefore you can get the solution of this ODE by variation of parameters. Taking the inverse fourier transform of the solution obtained this way yields the result. – user159517 Dec 13 '16 at 16:56
• I understand the idea, but I really don't know how it has to be used here. As far as I know, we use variation of parameters when we have found a fundamental system of solutions to the homogenous equation: that is, a set of $n$ linearly independent solutions such that the general solution is a linear combination of them. Here I just have this $f\ast \mathcal{H}_t(x)$ solution, which actually is not just a solution to the equation, but to the boundary value problem. How variation of parametrs is used in this case? – user1620696 Dec 13 '16 at 17:01
• ever heard the word "Green's function"? – tired Dec 13 '16 at 17:11
• @tired, I did, but the Green's function is obtained when we solve the equation with $G(x,t) = \delta(x-t)$ right? – user1620696 Dec 13 '16 at 17:16
• @user1620696 yes, but as soon as you have the GF it is easy to reconstruct the solution for an arbitrary sourecterm (as a wheighted superposition of GF's) – tired Dec 13 '16 at 18:44

Denote by $\hat G$ the Fourier transform of $G$ with respect to $x$. You write (I omit all factors coming from the scaling of FT) $$\partial_t\hat u(\xi, t) = - \xi^2 \hat u(\xi, t) + \hat G(\xi,t).$$ This is an inhomogenous linear differential equation of the first order, the solution writes by a well-known formula $$\hat u(\xi, t) = \hat f(\xi) e^{-\xi^2t} + \int_0^te^{-\xi^2(s-t)} \hat G(\xi,s) ds$$ or $$\hat u(\xi, t) = \hat f(\xi) \hat H(\xi, t) + \int_0^t \hat H(\xi, t-s) \hat G(\xi,s) ds,$$ which then leads to $$u = f * H_t + \int_0^t H_{t-s}* G(s) ds.$$