Solution (source code)

= Solution

By <orthogonality> and the sampling property of the <Dirac delta distribution>,
$$
a_n=\rho_0\int_0^L\delta(x-x_0)\psi_n(x)\,dx=\boxed{\rho_0\sqrt{\frac2L}\sin\frac{n\pi x_0}{L}}.
$$
Consequently the <reaction-diffusion equation> solution is
$$
\boxed{\rho(x,t)=\frac{2\rho_0}{L}\sum_{n=1}^{\infty}\sin\frac{n\pi x_0}{L}\sin\frac{n\pi x}{L}\exp\left[\left(\gamma-\frac{Dn^2\pi^2}{L^2}\right)t\right].}
$$
For every $t>0$ this <eigenfunction expansion> is smoothed by the Gaussian decay in $n$. As $t\downarrow0$, it recovers the specified initial condition in the sense of <distributions>.