Expected number of lines in use in call centre (markov process: queuing theory) Suppose we have a call centre with infinitely many lines to be able to call to. Calls come in a rate of $\lambda$ and customers are served with rate $\mu$. It is easy to see that the $Q$-matris looks like
$$\left(
\begin{array}{cccccc}
-\lambda&\lambda&0&0&0&\dots\\
\mu&-(\mu+\lambda)&\lambda&0&0&\dots\\
0&2\mu&-(2\mu+\lambda)&\lambda&0&\dots\\
\dots&\dots&\dots&\dots&\dots&\dots&
\end{array}\right)
$$
Now I want to calculate the expected number of lines that are being used at time $t$ given that at time $0$ there were $n$ lines in use. 
Suppose $T$ is the stopping time which tells if something happens (so a new customer comes or a customer has been served). Then we have that $$E(X_t\text{ }|\text{ }X_0=n)\colon=E_n(X_t)=E_n(X_t1_{T\leq t})+E_n(X_t1_{T> t})=\int_{0}^t(\lambda+n\mu)e^{-(\lambda+n\mu)s}\left[\frac{\lambda}{\lambda+n\mu}E_{n+1}(X_t\text{ }|\text{ }T=s)+\frac{n\mu}{\lambda+n\mu}E_{n-1}(X_t\text{ }|\text{ }T=s)\right]ds+ne^{-(\lambda+n\mu)t}=\int_{0}^te^{-(\lambda+n\mu)s}\left[\lambda E_{n+1}(X_{t-s})+n\mu E_{n-1}(X_{t-s})\right]ds+ne^{-(\lambda+n\mu)t}$$
by the strong Markov property we have indeed that $E_{n-1}(X_t\text{ }|\text{ }T=s)=E_{n-1}(X_{t-s})$ and $E_{n+1}(X_t\text{ }|\text{ }T=s)=E_{n+1}(X_{t-s})$. The book where this exercise is from gives actually the solution already: $E_n(X_t)=ne^{-\mu t}+\lambda(1-e^{-\mu t})/\mu$. So what I did was first make the substitution $u=t-s$ and differentiate the integral-equation to obtain a differential-equation and I substituted the given solution and the equation did not hold. Now I really don't know where I went wrong. Is the reasoning behind obtaining the equation simply wrong? If that is not the case, I will try once more to see if I did not make stupid mistakes in my calculations. Thanks.
 A: Let $X_t$ be the number of busy servers in a $M/M/\infty$ queuing system. You want to compute $E(X_t|X_0=n)$. This can be done by considering the sum
$$X_t=Y_t+Z_t,$$
where $\{Y_t|X_0=n\}\sim Binomial(n,e^{-\mu t})$ is the number of servers that did not complete service in the interval $(0,t]$ (out of the $n$ that were busy), and $Z_t\sim Poisson\left(\frac{\lambda}{\mu}(1-e^{-\mu t})\right)$ is the number of servers that became busy during the interval $(0,t]$ and have not completed service.
The distribution of $Y_t|X_0=n$ should be straightforward but what I claimed for $Z_t$ requires proof. Suppose they are both true then the expected value you seek is:
$$E(X_t|X_0=n)=E(Y_t|X_0=n)+EZ_t=ne^{-\mu t}+\frac{\lambda}{\mu}(1-e^{-\mu t}).$$
We are left with proving the distribution of $Z_t$. You should be familiar with the basic properties of the Poisson process (uniform property of the arrival times), and with the probability generating function of Bernoulli, Binomial and Poisson random variables. If you are not, I suggest looking those up.
Let $N_t\sim Poisson(\lambda t)$ be the number of arrivals to the system during the interval. For $i=1,\ldots,N_t$, let $S_i$ denote a Bernoulli random variable specifying whether arrival $i$ is still in the system at time $t$. Note that $Z_t=\sum_{i=0}^{N_t}S_i$ where $S_0:=0$. We use the fact that given the total number of arrivals during $(0,t]$, the actual arrival times are independent and uniformly distributed on the interval:
$$P(S_i=1|N_t=k)=\int_0^t \frac{1}{t}e^{-\mu(t-u)}du=\frac{1}{\mu t}(1-e^{-\mu t}) .$$
Using the law of iterated expectation we compute the probability generating function of $Z_t$ for some $0<z<1$:
$$ 
\begin{eqnarray}
E(z^{Z_t}) &=& EE(z^{Z_t}|N_t)=EE(z^{\sum_{i=0}^{N_t}S_i}|N_t) \\
&=& E(1-P(S_1=1)+P(S_1=1)z)^{N_t} \\
&=& E(1+\frac{1}{\mu t}(1-e^{-\mu t})(z-1))^{N_t} \\
&=& e^{\frac{\lambda t}{\mu t}(1-e^{-\mu t})(z-1)}.
\end{eqnarray} $$
We can conclude that $Z_t\sim Poisson\left(\frac{\lambda}{\mu}(1-e^{-\mu t})\right)$, as required.
