Problem $u_t - u_{xx} = e^t$ in $\mathbb{R} \times (0,+\infty)$

Well, I did some calculations but I'm in doubt about this problem: $$\left\{\begin{array}{rcl} u_t - u_{xx} & = & e^t, \ \mathbb{R} \times (0,+\infty)\\ u(x,0) & = & \cos(3x), \ \mathbb{R}. \end{array}\right.$$ First, note that $$\mathcal{F}(u_t) = \mathcal{F}(u_{xx} + e^t) = -\xi^2\mathcal{F}(u) + \mathcal{F}(e^t) = -\xi^2\mathcal{F}(u) + \sqrt{2\pi}e^t\delta(\xi),$$ where $\delta$ is the Dirac delta. In addition, we also have $$\mathcal{F}(\cos(3x)) = \sqrt{\dfrac{\pi}{2}}[\delta(\xi - 3) + \delta(\xi + 3)].$$ Therefore, the ODE system follows: $$\left\{\begin{array}{rcl} \widehat{u_t}(\xi,t) & = & -\xi^2\widehat{u}(\xi,t) + \sqrt{2\pi}e^t\delta(\xi)\\ \widehat{u}(\xi,0) & = & \sqrt{\dfrac{\pi}{2}}[\delta(\xi - 3) + \delta(\xi + 3)]. \end{array}\right.$$ For each $\xi \in \mathbb{R}$, we can explicitly solve the ODE by the integral factor method, obtaining: $$\widehat{u}(\xi,t) = \dfrac{\sqrt{2\pi}\delta(\xi)}{1 + \xi^2} e^{t} + Ke^{-\xi^2 t}$$ where $K$ is a constant. From the initial condition, it follows that $$K = \sqrt{\dfrac{\pi}{2}}[\delta(\xi - 3) + \delta(\xi + 3)] - \dfrac{\sqrt{2\pi}\delta(\xi)}{1 + \xi^2}.$$ Therefore, applying the inverse Fourier transform, it follows that: $$u(x,t) = e^t + \cos(3x) - 1.$$

Doubt: I don't know if I'm faltering on some calculation, but this solution doesn't seem to satisfy me $u_t - u_xx = e^t$. Was there a wrong passage? Can you help me?


Another approach consists in using Laplace transform. Let $U(x,s)$ be the LT of $u(x,t)$. The eq. writes in Laplace domain $$ sU-u(x,0) - \frac{\partial^2 U}{\partial x^2}= \frac{1}{s-1} $$ Rearranging terms $$ \frac{\partial^2 U}{\partial x^2} - sU = -\cos(3x) -\frac{1}{s-1} $$ The solution in spatial domain is $$ U(x,s)= \frac{1}{s+9} \cos(3x) + \frac{1}{s(s-1)} $$ Back in time and using fraction decomposition $1/s(s-1)=1/(s-1)-1/s$, the solution reads $$ u(x,t)= e^{-9t}\cos(3x)+e^{+t}-1 $$


There were some typos, so I post all the computations: $$\begin{aligned}\phi_t+\xi^2 \phi&=\sqrt{2\pi}\delta (\xi)e^t\\ \phi_te^{\xi^2 t}+\xi^2 e^{\xi^2 t}\phi&=\sqrt{2\pi}\delta (\xi)e^{t+\xi^2t}\\ (\phi e^{\xi^2 t})_t&=\sqrt{2\pi}\delta (\xi)e^{t+\xi^2t}\\ \phi(t,\xi)e^{\xi^2t}-\phi(0,\xi)&=\sqrt{2\pi}\frac{\delta (\xi)}{1+\xi^2}(e^{t(1+\xi^2)}-1)\end{aligned}$$ With general initial condition, we have the equation $$\phi(t,\xi) =\phi(0,\xi)e^{-\xi^2 t}+\sqrt{2\pi}\frac{\delta(\xi)}{\xi^2+1}(e^{t}-e^{-\xi^2 t})$$ In this case, $$\phi(0,\xi)e^{-\xi^2 t}=\sqrt{2\pi}\frac{1}{2}(\delta(x-3)e^{-\xi^2t}+\delta(x+3)e^{-\xi^2t})$$ yields $$\mathscr{F}^{-1}(\phi(0,\xi)e^{-\xi^2 t})(x)=\frac{1}{2}(e^{-9t-3ix}+e^{-9t+3ix})=e^{-9t}\frac{1}{2}(e^{-3ix}+e^{3ix})$$ So the solution is $$u(x,t)=(e^t-1)+e^{-9t}\frac{1}{2}(e^{-3ix}+e^{3ix})=(e^{t}-1)+e^{-9t}\cos(3x)$$ You can check that this satisfies the PDE: $$u_t(x,t)=e^t-9e^{-9t}\cos(3x)$$ $$u_x(x,t)=-3e^{-9t}\sin(3x)$$ $$u_{xx}(x,t)=-9e^{-9t}\cos(3x)$$ $$u_t-u_{xx}=e^{t}$$ and $u(0,x)=\cos(3x)$


When dealing with any mathematical problem, often the best way to do it is to break it up into smaller parts that are easier to deal with. So starting with our original linear inhomogeneous IVP, $$(\partial_t-\partial_x^2)u(t,x)=h(t,x) \\ u(0,x)=u_0(x) \\ (t,x)\in\mathbb R_{\geq 0}\times \mathbb R \tag{0}$$ We consider the simpler problems $$(\partial_t-\partial_x^2)u(t,x)=0 \\ u(0,x)=u_0(x)\tag{1}$$

$$(\partial_t-\partial_x^2)u(t,x)=h(t,x) \\ u(0,x)=0 \tag{2}$$

(And, in order for uniqueness, all problems are coupled with the additional physical constraint that the integral of $|u|^2$ along the $x$ axis is finite for all time)

If we have found a solution $u_1$ to (1) and a solution $u_2$ to (2) then due to the linearity of the heat operator, $u_1+u_2$ is a solution of (0).

What is nice about this approach is that (1) and (2) are already well studied problems. For the first, we use the fundamental solution of the heat equation, also known as the heat kernel, and for the second, we use the Green's function (see item 14 in the linked table).

In the following, assume $(\tau,\xi)\in\mathbb{R}_{\ge 0}\times\mathbb R$.

The fundamental solution is the solution $F(t,x;\xi)$ of the homogeneous IVP $$(\partial_t-\partial_x^2)u(t,x)=0 \\ u(0,x)=\delta(x-\xi)$$ This is a very well known problem, and the solution is $$F(t,x;\xi)=\frac{\exp\left(-\frac{(x-\xi)^2}{4t}\right)}{\sqrt{4\pi t}}$$ The Green's function is the solution $G(t,x;\tau,\xi)$ of the inhomogeneous IVP with zero initial conditions, $$(\partial_t-\partial_x^2)u(t,x)=\delta(t-\tau)\delta(x-\xi) \\ u(0,x)=0$$ And again, the solution of this problem is also well known, $$G(t,x;\tau,\xi)=\frac{\exp\left(-\frac{(x-\xi)^2}{4(t-\tau)}\right)}{\sqrt{4\pi (t-\tau)}}=F(t-\tau,x;\xi)$$


Remark: The curious, and very non-obvious symmetry between the fundamental solution and the Green's function is an example of Duhamel's Principle, and applies for a broad range of linear evolution equations, i.e equations of the form $$\partial_t u=\mathscr L [u]$$ Where $\mathscr L$ is some linear differential operator involving only $u$ and its spacial derivatives.


Now that these two solutions are known, we can write $u_1$ and $u_2$ as convolutions,

$$u_1=F\ast_x u_0 \\ u_2 = G\ast_{(t,x)} h$$

I.e,

$$u_1(t,x)=\int_{\mathbb{R}} F(t,x;\xi) u_0(\xi)\mathrm d\xi \\ u_2(t,x)=\int_0^t \int_{-\infty}^\infty G(t,x;\tau,\xi)h(\tau,\xi)\mathrm d\xi \mathrm d\tau$$ And, $$u=u_1+u_2$$ In your case with $u_0(x)=\cos(3x)~,~h(t,x)=e^t$, you end up with $$u(t,x)=\int_{\mathbb{R}} \frac{\exp\left(-\frac{(x-\xi)^2}{4t}\right)}{\sqrt{4\pi t}} \cos(3\xi)\mathrm d\xi+\int_0^t \int_{-\infty}^\infty \frac{\exp\left(-\frac{(x-\xi)^2}{4(t-\tau)}\right)}{\sqrt{4\pi (t-\tau)}}e^\tau \mathrm d\xi \mathrm d\tau$$

Though often this procedure will not give you closed forms all that easily, it is the best way to deal with these kinds of problems in general, because typically closed forms are just not possible. To get closed forms, one would usually use separation of variables, but I stress that, in general, techniques like separation of variables will just fail.

For the relevant theory on the above work, see chapter 9 of Peter J. Olver's Introduction to Partial Differential equations, in particular pages 292 to 297.