mean hitting time for $M/M/1$ Consider a manufacturing process with batches of raw materials
coming in. Suppose that the interarrival times of batches are i.i.d. exponential random variables
with rate λ and their processing times are i.i.d exponential random variables with rate µ. Due to
financial constraints, there is only one machine which can only process one batch of raw materials
at any given instance. We assume that once a batch gets processed by the machine, it leaves the
system immediately.
Let X(t) denote the number of batches in the system at time t and let $T_j := inf\{t ≥ 0 : X(t) = j\}$be the hitting time to have j batches in the system,I want to derive an expression for $E_i[T_j]$ only using $(λ, µ)$
so firstly ,I can derive an expression for $E_i[T_j]$ in terms of $E_{i+1}[T_j ]$, and $E_{i-1}[T_j ]$ (and $λ$, $µ$).
but i can't solve this  characteristic equation of this cubic recurrence relation.
please help me to derive an expression for $E_i[T_j]$ only using $(λ, µ)$
 A: I'm going to make two assumptions: 
(1)$j>i$
(2) $\mu \neq \lambda$
Let's define $\tau_i =$ time to go to $i+1$, starting from $i$. 
$$ E[\tau_i] = \frac{1}{\lambda+ \mu} + \frac{\mu}{\mu + \lambda} \cdot(E[\tau_{i-1}]+ E[\tau_{i}])$$
$$ E[\tau_i] = \frac{1}{\lambda} + \frac{\mu}{\lambda} \cdot(E[\tau_{i-1}])$$
Now, let's get the general function for $E[\tau_i]$
$E[\tau_0]= \frac{1}{\lambda}$
$E[\tau_1]= \frac{1}{\lambda} + \frac{1}{\lambda}\cdot\frac{\mu}{\lambda} $
$E[\tau_2]= \frac{1}{\lambda} + \frac{1}{\lambda}\cdot(\frac{\mu}{\lambda} + (\frac{\mu}{\lambda})^2)$
$\vdots$
$E[\tau_i]= \frac{1}{\lambda} + \frac{1}{\lambda}\cdot(\frac{\mu}{\lambda} + (\frac{\mu}{\lambda})^2 + \cdots +  (\frac{\mu}{\lambda})^i) = \frac{1-(\frac{\mu}{\lambda})^{i+1}}{\lambda -\mu}$
Therefore, $$E_i[T_j] = \sum_{k=i}^{j-1}\tau_k = \frac{j-i}{\lambda - \mu} - \sum_{k=i}^{j-1}\frac{1-(\frac{\mu}{\lambda})^{i+1}}{\lambda -\mu} = \frac{j-i}{\lambda - \mu} - \frac{(\frac{\mu}{\lambda})^{i+1}}{\lambda -\mu} \cdot \frac{1-(\frac{\mu}{\lambda})^{j-i}}{1-\frac{\mu}{\lambda}}$$
