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.


Diffusions with partially reflected (including sticky) boundary conditions are discussed in detail in

  • H. J. Kushner. Probabilistic methods for finite difference approximations to degenerate elliptic and parabolic equations with neumann and dirichlet boundary conditions, J Math Anal Appl 53 (1976), no. 3, 644–668.

Kushner's proof for weak existence/uniqueness of this class of diffusions is based on the submartingale problem formulation developed in

  • Stroock, D. W., and Varadhan, S. S. Diffusion processes with boundary conditions. Communications on Pure and Applied Mathematics 24.2 (1971): 147-225.

As a byproduct, Kushner also explains how to numerically solve this problem by using the Markov Chain Approximation Method.