Let's consider a process in which individuals die and give birth at rates \(\alpha(t)\) and \(\beta(t)\), respectively. We could solve this problem via a forward equation with the method of characteristics. But it is a lot easier using a first step equation approach. Starting with one individual at \(t\), we can express \(p(n,\tau|1,t)\) as $$ p(n,\tau|1,t) = (1-\Delta t (\alpha(t)+\beta(t)))p(n,\tau|1,t+\Delta t) + \Delta t \left[\beta(t)\delta(n=0) + \alpha(t)\sum_{n'=0}^n p(n',\tau|1,t)p(n-n',\tau|1,t)\right] $$ This difference equation corresponds to the ODE $$ -\frac{d p(n,\tau|1,t)}{dt} = -(\alpha(t)+\beta(t))p(n,\tau|1,t) + \beta(t)\delta(n=0) + \alpha(t)\sum_{n'=0}^n p(n',\tau|1,t)p(n-n',\tau|1,t) $$ Note that the sign of the time derivative is different since the derivative is with respect to the starting time. As before, we use the Laplace transform \(\phi(\lambda,\tau,t) = \sum_n \lambda^n p(n,\tau|1,t)\) to obtain $$ -\frac{d \hat{p}(\lambda,\tau|1,t)}{dt} = -(\alpha(t)+\beta(t))\hat{p}(\lambda,\tau|1,t) + \beta(t) + \alpha(t)\hat{p}(\lambda,\tau|1,t)^2 $$ Furthermore, we substitute \(\phi(\lambda,t|t') = 1 - \hat{p}(\lambda,t|t')\) $$ \frac{d \phi(\lambda,\tau|t)}{dt} = -(\alpha(t)+\beta(t))(1-\phi(\lambda,\tau|t)) + \beta(t) + \alpha(t)(1-\phi(\lambda,\tau|t))^2 $$ $$ \frac{d \phi(\lambda,\tau|t)}{dt} = (\alpha(t)-\beta(t))\phi(\lambda,\tau|t) - \alpha(t)\phi(\lambda,\tau|t)^2 $$ This equation can be integrated (\s(t) = \alpha(t)-\beta(t)\))u $$ \phi(\lambda,\tau|t) = \frac{e^{-\int_t^{\tau} s(t')}}{C + \alpha(t)\int_t^\tau e^{-\int_{t'}^{\tau} s(t')}dt'} $$ At the initial time \(\tau=t\) we need \(\phi(\lambda,t|t) = 1-\lambda\) and hence the integration constant is $$ C = (1-\lambda)^{-1} $$
Sanity check: moments
The normalization of the probability distribution requires that \(\phi(\lambda=1)\) vanishes at all times. Our solution has this property since \(C\) diverges in this case. Similarly, the derivative wrt to \(\lambda\) evaluated at \(\lambda=1\) should evaluate to the mean number of descendants: