# How to solve a differential equation in the form $\frac{\partial}{\partial t}g(x,t)=g(x-\Delta,t)+\frac{\partial^2}{\partial x^2} g(x,t)$?

How to find the general solution of a differential equation with a shift, in the following form?

$$\frac{\partial}{\partial t}g(x,t)=g(x-\Delta,t)+\frac{\partial^2}{\partial x^2} g(x,t)$$

where $$\Delta > 0$$. And what about the following?

$$\frac{\partial}{\partial t}g(x,t)=g(x,t-\Delta)+\frac{\partial^2}{\partial x^2} g(x,t)$$

Edit1: Here are few follow-up details about my question. Is there a nice" way to represent the solution in $$x$$-space, as opposed to e.g., Fourier? Is the solution real + positive + normalizable? Does it have the correct properties of a probability density function?

• as you can see from the general solution I wrote down, the normalization $N(t)=\int_{-\infty}^\infty g(x,t)dt=G(0,t)=e^{t}G(0,0)=e^{t}N(0)$ increases exponentially with time; so this is not a probability density function (why did you expect that?) – Carlo Beenakker Jul 22 '20 at 10:45

Fourier transform $$G(k,t)=\int_{-\infty}^\infty e^{ikx} g(x,t)dx$$ with respect to $$x$$, then $$\frac{\partial}{\partial t}G(k,t)=e^{ik\Delta}G(k,t)-k^2 G(k,t),$$ hence $$G(k,t)=\exp\left(te^{ik\Delta}-tk^2\right)G(k,0).$$ For the second differential equation you would similarly Fourier transform with respect to $$t$$.
• to transform back to $x$-space you calculate $g(x,t)=(2\pi)^{-1}\int_{-\infty}^\infty e^{-ikx}G(k,t)dk$. This is the general solution, it will be real if $g(x,0)$ is real; it cannot be worked out further without further information on $g(x,0)$. – Carlo Beenakker Jul 22 '20 at 10:41
• the inverse Fourier transform does not have a closed form expression for the delta function initial condition; you would need to calculate integrals of the form $\int_0^{\infty } e^{\cos k-k^2} \cos( k x) \cos (\sin k) \, dk$, which can only be done numerically. – Carlo Beenakker Jul 22 '20 at 12:07