How do I solve a PDE with a Dirac Delta function? I wouldn't trust so blindly on such "general" formulas, first and foremost, because contrary to linear ODEs, linear PDEs are tighgtly dependent on initial/boundary conditions (even first order), and second, because that formula most likely has been constructed assuming some regularity on $f$ and $g$. In fact, your solution is wrong, as (using symbolic derivatives) $$u_t + u_x + u = e^{1-x}\delta(x-1).$$