Proving a Probability Generating Function satisfies a partial differential Equation We have N animals grazing in a field. The animals graze independently, and periods of grazing and resting alternate for the animals. If an animal is resting at time t, the probability it begins grazing in the interval between $t$ and $t+h$ is $\lambda h+o(h)$, and if it is grazing at time t, the probability it will begin resting between $t$ and $t+h$ is $\mu h+o(h)$. 
Let $X(t)$ denote the number of animals grazing at time $t\ge 0$
We need to show that the pgf $P\left(t,s\right)=E\left(s^\left(Xt\right)\right)$ satisfies:
$${\partial P\over \partial t}= \left(1-s\right) \left(\mu+\lambda s\right) {\partial P\over \partial s}+N\lambda \left(s-1\right)P$$
The problem I have is in finding the forward Kolmogorov equations, since we need to adjust the birth and death coefficients, and I don't really know how to alter the baseline case. 
Any hint is greatly appreciated!
 A: The transition intensities of the process $(X(t))_t$ are, for every $0\leqslant x\leqslant N$, $x\to x+1$ at rate $\lambda\cdot(N-x)$ (this corresponds to the event that an animal resting at time $t$ begins to graze and there are $N-x$ animals resting at time $t$) and $x\to x-1$ at rate $\mu\cdot x$ (this corresponds to the event that an animal grazing at time $t$ begins to rest and there are $x$ animals grazing at time $t$). Thus, for $u$ positive and $u\to0$,
$$
E[s^{X(t+u)}\mid X(t)]=s^{X(t)+1}\cdot\lambda\cdot(N-X(t))\cdot u+s^{X(t)-1}\cdot\mu\cdot X(t)\cdot u+s^{X(t)}\cdot(1-\lambda\cdot(N-X(t))\cdot u-\mu\cdot X(t)\cdot u)+o(u).
$$
Thus,
$E[s^{X(t+u)}]=E[s^{X(t)}]+A(t,s)u+o(u)$ with
$$
A(t,s)=s\lambda E[(N-X(t))s^{X(t)}]+s^{-1}\mu E[X(t)s^{X(t)}]-\lambda E[(N-X(t))s^{X(t)}]-\mu E[X(t)s^{X(t)}].
$$
Introducing $P(t,s)=E[s^{X(t)}]$, one gets 
$$
\partial_tP(t,s)=A(t,s).
$$
Furthermore,
$E[X(t)s^{X(t)}]=s\partial_sP(t,s)$ hence
$$
A(t,s)=\lambda(s-1)(NP(t,s)-s\partial_sP(t,s))+s^{-1}\mu(1-s) s\partial_sP(t,s),
$$
from which the formula in the question follows.
