Background: This problem appears when you try solving the stochastic binding kinetics. There are a total of $M$ and $N$ molecules of the types $R$ and $L$. These molecules can be either in a bound ($RL$) or an unbound state. Each pair of unbound $R$ and $L$ molecules can bind with the rate $a$, and each bound molecule $RL$ can unbind with the rate $b$. Starting with $m_0$ initially bound pairs, I would like to find $p_m(t)$, the probability of having $m$ molecules in the bound state $RL$ at time $t$.
Problem: The following set of coupled differential equations (also known as Master equations) describe the dynamics of the probabilities $p_m(t)$ as functions of time $$ \frac{dp_m(t)}{dt}=a\,(N-m+1)(M-m+1)p_{m-1}(t)+b\,(m+1)p_{m+1}(t)-[b\,m+a(N-m)(M-m)]p_m(t), $$ where $M$ and $N$ are integers with $0<M\leq N$ and $a>0$ and $b>0$ are real numbers, for integer $m$s between $0\leq m\leq M$, with the initial conditions $p_m(0) = \delta_{m,m_0}$, $0\leq m_0\leq M$. Assume $p_{-1}(t)=p_{M+1}(t)=0$.
I would like to solve these equations.
What I tried so far: We can write the set of ODEs as a Matrix equation of the form $$ \frac{d}{dt}\left(\begin{array}{c} p_0\\ \vdots\\ p_M \end{array}\right)=\underbrace{\left(\begin{array}{cccc} -aNM&b &0&0&\dots\\ aNM&-b-a(N-1)(M-1) &2b&0&\dots\\ &\vdots \end{array}\right)}_{\mathbf{A}}\left(\begin{array}{c} p_0\\ \vdots\\ p_M \end{array}\right) $$ with the formal solution $\mathbf{p}(t)=e^{\mathbf{A}t}\mathbf{p}(0)$. But in order to exponential the matrix $t\mathbf{A}$, I need to diagonalize $\mathbf A$, but I don't know how to do that. It is a tridiagonal matrix, each column adds up to one, and it has a simple form. I'm sure someone on SE knows how to diagonalize this.
Alternatively, I tried solving the problem using a generating function defined as $$ f(z,t) = \sum_{m=0}^M p_m(t) z^m. $$ You can differentiate $f$ with respect to $t$ and find the following PDE satisfied by $f$: $$ \partial_t f = a(z-1)\left[MNf-\left((M+N-1)z+\frac{b}{a}\right)\partial_zf+z^2\partial^2_zf\right], $$ with the initial condition $f(z,0)=z^{m_0}$. But I do not know how to solve this equation either. It is a second-order linear PDE with a solution that is a polynomial in $z$, so it should be solvable.
Steady State Results: Binding kinetics has an equilibrium solution that is given by Boltzmann distribution with the partition function $$\mathcal{Z} = \sum_{m=0}^M \left(\frac ba\right)^m {M \choose m}{N \choose m}={}_2F_1(-M,-N,1,b/a).$$ This gives $$p_m(\infty) = \frac{\left(\frac ba\right)^m {M \choose m}{N \choose m}}{{}_2F_1(-M,-N,1,b/a)}.$$
What I need: Ideally looking for a closed-form solution for either $p_m(t)$ or $f(z,t)$. If there is no closed-form solution, at least an explicit expression for $p_m(t)$ that could involve special functions or maybe even a sum or series, but something that I can explicitly calculate. I'm not looking for a numerical solution.
