For the diffusion equation $\frac{\partial} {\partial t} P\_t(x)=D \frac{\partial^2} {\partial x^2} P\_t(x)$, a reflecting boundary at the origin for example, means: $\frac{\partial} {\partial x} P\_t(x=0)=0$. 


What is the mathematical way of setting the condition that whenever a particle reaches the origin it stays there forever? 
Note that it does not 'vanish' from the system upon reaching x=0, namely I am not talking about an absorbing boundary. 


Also, how do I solve that differential equation in that case? 


(Thanks for to all helpers!)



How to define (and solve) the diffusion equation with a sticky boundary at the origin?
I would just take an absorbing boundary condition and then add the absorbed density as a delta function at the sticking point. For convenience, translate the origin so that the sticking point is $x\_a>0$ and the particle starts from $x=0$ at $t=0$. The solution then is


$$P(x,t)=f(x,t)-f(2x\_a-x,t)+N(t)\delta(x-x\_a)$$
$$f(x,t)=(4\pi Dt)^{1/2}e^{-x^2/4Dt}$$
$$N(t)=1-{\rm erf}\,(x\_a/\sqrt{4Dt})$$


see for example these [lecture notes.](https://home.icts.res.in/~abhi/notes/lect3.pdf)


