Archer Poisson Process problem An archer wishes to shoot an arrow at a target. The prospective flight path of the arrow is subject to birds flying past at random times, according to a Poisson process with rate $\mu$ per second. To proceed with shooting the arrow, the archer requires a time frame of $b$ seconds without any distraction (i.e. no birds flying through the prospective path for $b$ seconds). He stops as soon as he has shot the arrow. Let $S$ be the total time required to finish. Solve for $E(S)$. 
Hint: by parts,   $\int \mu x e^{−\mu x} dx = −xe^{−\mu x} − \frac1\mu e^{−\mu x}$
I feel that $S=$ time gone by waiting for the $b$ seconds + $b$ seconds, but I could be wrong. This about as much as I gather from the question.
The answer is supposed to be $\frac{e^{b\mu}-1}{\mu}.$
 A: The archer waits for at least $b$ seconds.   If no birds have flown passed in that time she shoots.   Otherwise when a bird flies passed she starts again.
If the birds arrive in a Poisson process the wait time between birds, $T$, is exponentially distributed.
The expected time-til-shooting, $\mathsf E(S)$, is $$\begin{align}\mathsf E(S) ~=~& \mathsf E(S\mid T>b)~\mathsf P(T>b) + \mathsf E(S\mid T\leq b)~\mathsf P(T\leq b)
\\[2ex]
~=~& b~\mathsf P(T>b) + \big(\mathsf E(S)+\mathsf E(T\mid T<b)\big)~\mathsf P(T\leq b)
\\[4ex]
\therefore~\mathsf E(S) ~=~& b+\dfrac{\mathsf E(T\mid T\leq b)~\mathsf P(T\leq b)}{1-\mathsf P(T\leq b)}
\\[2ex]
 ~=~& b+\dfrac{\int_0^b t\mu\mathsf e^{-t\mu}\operatorname d t}{\mathsf e^{-b\mu}}
\end{align}$$
Can you now complete?
A: Hint: the last "cycle" contributes $b$ to the time. Each other cycle contributes $X_i$ to the time, where $X_i$ is exponential with rate $\mu$ conditioned on $X_i < b$. You can compute $E[X_i]$ easily enough. However, there are a random number of cycles, and you need to take that into account. Accordingly, what is the distribution of the number of cycles required?
(This is probably not the easiest approach, but it works.)
A: The archer is waiting for the first interarrival (time between birds) that exceeds b, so we compute the expected amount of time passed waiting for an interrarival of time greater than b, then add b to it to give him time to aim/shoot. The interrarival time is distributed as $exp(\mu)$ and if it is also $<b$ has expectation $\int_0^b x\mu e^{-\mu x}=-be^{-\mu b}+1/\mu-e^{-\mu b}/\mu$, using the hint. The probability that an interrarival time is in fact $<b$ is $\int_b^\infty \mu e^{-\mu b}=1-e^{-\mu b}.$ If we assume the interrarivals are iid, the expected number of them until one fails to be $<b$ is the mean of a geometric random variable with parameter $e^{-\mu b}$, i.e., $e^{\mu b}$. So on average $e^{\mu b}$ interrarivals of average duration $-be^{-\mu b}+1/\mu-e^{-\mu b}/\mu$, for a total duration $-b+e^{\mu b}/\mu-1/\mu$ and adding $b$ gives the indicated answer. 
