Solution (source code)

= Solution

For a fixed observation point $(\xi,\tau)$, use the backward <adjoint Green function> with $L^*=-\partial_t-\partial_x^2+1$. It satisfies $L^*G=0$ for $t<\tau$, decays with its spatial derivative as $|x|\to\infty$, and has terminal <distribution> $G(x,\tau^-;\xi,\tau)=\delta(x-\xi)$. Extending it by zero for $t>\tau$ gives $L^*G=\delta(x-\xi)\delta(t-\tau)$.

For $0<t<\tau$, <integration by parts> proves
$$
\frac d{dt}\int_{\mathbb R}Gu\,dx=\int_{\mathbb R}[(-G_{xx}+G)u+G(u_{xx}-u)]\,dx=[Gu_x-G_xu]_{-\infty}^{\infty}=0.
$$
Evaluating this constant pairing at the initial and terminal times yields
$$
\boxed{u(\xi,\tau)=\int_{\mathbb R}G(x,0;\xi,\tau)f(x)\,dx.}
$$
By translating the <heat kernel with constant absorption> and reversing the time difference,
$$
\boxed{G(x,t;\xi,\tau)=\frac{\exp[-(\tau-t)-(x-\xi)^2/(4(\tau-t))]}{\sqrt{4\pi(\tau-t)}},\qquad t<\tau.}
$$
The terminal singularity is understood as a <distribution>; the representation follows for smooth decaying data and extends to standard integrable data by the heat-kernel approximation argument.