Solution (source code)

= Solution

Integrating the population equation over the line and using vanishing boundary flux gives $\dot M=-\mu M$, where $M(t)=\int n(x,t)dx$. Since $M(0)=Q$, one has $M(t)=Qe^{-\mu t}$. On the other hand the similarity substitution $x=\lambda(t)\eta$ gives
$$
M(t)=e^{-\mu t}\int_{\mathbb R}f(\eta)d\eta.
$$
Consequently
$$
\boxed{\int_{\mathbb R}f(\eta)d\eta=Q}.
$$
The decay condition is on the nonlinear diffusive flux $nn_x$; compact support also satisfies it.