Solution (source code)

= Solution

Multiply the <birth-death master equation> by $n$ and sum. Equivalently, a birth changes $n$ by $+1$ and a death by $-1$, so
$$
\boxed{
\frac d{dt}\langle n\rangle
=\langle b_n-d_n\rangle
=\alpha+\beta\langle n\rangle
-\gamma\langle n(n-1)\rangle.}
$$
The equation is not closed in the mean because the quadratic death rate introduces the second <factorial moment>.