Analytical solution for diffusion equation with decay

710 Views Asked by At

I am trying to get an analytical solution for the heat diffusion with decaying term. In short:

$$ \frac{\partial u}{\partial t} = D \frac{\partial ^2 u }{\partial x^2} - ku, $$

subjecting to the initial condition:

$$ \begin{cases} u(x, 0) = u_1 \text{ for } x \leq \frac{L}{2}\\ u(x, 0) = u_2 \text{ for } x \geq \frac{L}{2}\\ \end{cases} $$ where $[0,L]$ is the 1D domain. Without the decay term, i.e. $-ku$, the exact solution is:

$$ u(x,t) = u_1 + \frac{u_2-u_1}{2} \text{erf} \left( \frac{x - 0.5L}{\sqrt{4Dt}} \right) $$

My reasoning being, since the decay terms is responsible for an exponential, would multiplying my above results with $\exp(-kt)$ get me the analytical results?