Branching process: The expected value of number of cells Suppose that there are two kinds of cells, type $A$ and type $B$.
Let $A_t$ and $B_t$ be the number of cells (i.e. $\mathbb{N}_{0}$-valued) of type $A$ and type $B$, respectively, at time $t\in\mathbb{R}_{+}$.
Each cell of type $A$, independent of all other cells is, after a time that is exponential distribution with parameter $\lambda>0$, dived into

*

*two cells of type $A$ with probability $p_1> 0$,

*two cells of type $B$ with probability $p_2> 0$,and

*one cell of type $A$ and one cell of type $B$ with probability $p_3> 0$,

where $p_1+p_2+p_3 = 1$.
Each cell of type $B$, independent of all other cells, after a time that is exponential distribution with parameter $\gamma>0$, dies. i.e. the number of cells of type $B$ decreases by one.
Let $a\in\mathbb{N}$ and $b\in\mathbb{N}_{0}$. What is
\begin{align}
\mathbb{E}[A_t\mid A_0=a]
\end{align}
and
\begin{align}
\mathbb{E}[B_t\mid A_0=a,B_0=b]
\end{align}
for each time $t\in\mathbb{R}_+$?
My attempt based on the suggestion by mjqxxxx:
I'd argue that something like
\begin{align}
\partial_t\mathbb{E}[A_t\mid A_0=a] = \lambda(p_1-p_2) \mathbb{E}[A_t\mid A_0=a]
\end{align}
should hold and therefore the solution is
\begin{align}
\mathbb{E}[A_t\mid A_0=a] = a \exp(\lambda(p_1-p_2)t)
\end{align}
for each time $t\in\mathbb{R}_+$.  Moreover,
\begin{align}
\partial_t\mathbb{E}[B_t\mid A_0=a,B_0=b] = -\gamma \mathbb{E}[B_t\mid A_0=a,B_0=b] + \lambda(2p_2 + p_3)\mathbb{E}[A_t\mid A_0=a]
\end{align}
and therefore
\begin{align}
\mathbb{E}[B_t\mid A_0=a,B_0=b] = 
\begin{cases}
 b \exp(-\gamma t) + \frac{\lambda(2p_2+p_3)a\exp(-\gamma t)}{\gamma +\lambda(p_1 - p_2)}\left(\exp((\gamma +\lambda(p_1 - p_2))t)-1\right) & \text{if } \gamma +\lambda(p_1 - p_2) \neq 0 \\
(b+\lambda(2p_2+p_3)a t)\exp(-\gamma t) & \text{otherwise}
\end{cases}
\end{align}
for each time $t\in\mathbb{R}_+$.
Is this true? How do you formalize this?
 A: Let $\mathcal{N}_{\mu}\left(\cdot\right)$ be a Poisson point measure: $\mathcal{N}_{\mu}\left(A\right)$ counts the number of points generated by a Poisson point process over some Borel set $A$ -- it is a random measure. Then, from the model you described (and if I am not missing anything), we can write the pathwise dynamics as
$$A_t=A_0+\int_{0}^t\sum_{k=1}^{\infty} \mathbf{1}_{\left\{A_{s-}=k\right\}}\mathcal{N}_{p_1 k \lambda}\left(ds\right)-\int_{0}^t\sum_{k=1}^{\infty} \mathbf{1}_{\left\{A_{s-}=k\right\}}\mathcal{N}_{p_2 k \lambda}\left(ds\right). $$
Remark that $A_t\geq 0$: Let $\tau$ be the hitting time whereby the process $\left(A_t\right)_{t\geq 0}$ hits zero, then $\mathbf{1}_{\left\{A_{s-}=k\right\}}=0$ for all $k\geq 1$ and $s> \tau$. Therefore, $A_t=0$ for all $t\geq \tau$, as the integration above is zero over $\left(\tau,t\right)$ for any $t\geq \tau$.
Further, by compensating the Poisson point processes, we recover an integral equation only in terms of $\left(A_t\right)_{t\geq 0}$ up to a zero-mean martingale term:
$$A_t=A_0+\int_{0}^t\sum_{k=0}^{\infty} \mathbf{1}_{\left\{A_{s-}=k\right\}}\left(\mathcal{N}_{p_1 k \lambda}\left(ds\right)-p_1k\lambda ds+p_1k\lambda ds\right)\\-\int_{0}^t\sum_{k=0}^{\infty} \mathbf{1}_{\left\{A_{s-}=k\right\}}\left(\mathcal{N}_{p_2 k \lambda}\left(ds\right)-p_2 k \lambda ds+p_2 k \lambda ds\right), $$
which yields
$$A_t=A_0+\underbrace{\int_{0}^t\sum_{k=0}^{\infty} \mathbf{1}_{\left\{A_{s-}=k\right\}}\left(\mathcal{N}_{p_1 k \lambda}\left(ds\right)-p_1k\lambda ds\right)-\int_{0}^t\sum_{k=0}^{\infty} \mathbf{1}_{\left\{A_{s-}=k\right\}}\left(\mathcal{N}_{p_2 k \lambda}\left(ds\right)-p_2 k \lambda ds\right)}_{:=M_{A}(t)} \\ +\int_{0}^t\sum_{k=0}^{\infty} \mathbf{1}_{\left\{A_{s-}=k\right\}}p_1k\lambda ds-\int_{0}^t\sum_{k=0}^{\infty} \mathbf{1}_{\left\{A_{s-}=k\right\}}p_2 k \lambda ds,$$
where $M_{A}(t)$ is a zero-mean martingale (e.g., [1]). Therefore,
$$ A_t = A_0 + M_{A}(t)+(p_1-p_2)\lambda\int_{0}^t A_{s-}ds.$$
In the same vain, we can write the (pathwise) dynamics for $B_t$
$$ B_t = B_0 + M_{B}(t)+\left(\lambda p_3+2\lambda p_2\right)\int_{0}^t A_{s-} ds -\gamma\int_{0}^t B_{s-} ds. $$
Now, you can take $E\left[\cdot\left|A_0,\,B_0\right.\right]$ over the first equation (dynamics of $A_t$) and over the second one (dynamics of $B_t$) to obtain the ODEs you conjectured.
[1] Rogers and Williams, Diffusions, Markov Processes and Martingales: Foundations, 2nd edition, vol. 2, Cambridge University Press, September 2000.
