# On the expectation of a path integral involving Brownian motion up to a random time

Let $W$ be a one-dimensional standard Brownian motion and denote $$X_t=-\mu t + \sigma W_t, \quad t\ge 0,$$ where $\mu$ and $\sigma$ are positive constants. For $b<0$ denote the first passage time of level $b$ by $\tau$: $$\tau:=\inf\{t\ge 0: X_t=b\}.$$ My question is: how can one find $${\mathbb E}\left[\int_0^\tau X_t dt \right]?$$ Or slightly more general, $${\mathbb E}\left[\int_0^\tau f(X_t) dt \right]$$ for some measurable function $f$?

Define $u(x)=E^x\int_0^\tau X_s ds$, then $u$ satisfies $\sigma^2 u_{xx}/2-\mu u_x=-x$ with boundary condition $u(b)=0$ and $u(\infty)=\infty$. (This is missing a boundary condition, but a good way to discover the extra boundary condition at $b$ is to solve first in a strip and then take the width of the strip to infinity). Now solve the ODE (solution is explicit). When $f$ is involved, replace RHS of ODE by $f(x)$. I am not sure this is research level question.
• Professor Zeitouni, thanks a lot for your answer. I solved the ODE with two free parameters: $u(x)=A \exp(2\mu x/\sigma^2)+x^2/2\mu + \sigma^2 x/2\mu^2 + B$. The boundary condition $u(b)=0$ gives me one equation for the parameters $A,B$; but the other condition $u(\infty)=\infty$ does not give me an explicit equation. In fact, for any $A\ge 0$, I can find a $B$ so that both boundary conditions are satisfied. In other words, the solution to the ODE is not unique? Maybe I am still missing something. – epsilon Aug 27 '13 at 16:33
• As I wrote above: solve first in a bounded interval $[b,R]$ with both boundary conditions $0$. This gives you an $R$ dependent solution, and now take $R\to\infty$. This should give you the answer. (There is a technical point that indeed convergence occurs, but it is not too hard to prove, because of the fact that when starting at $x$, the probability to hit $+R$ decays exponentially as $R\to\infty$ while the gain in the value is only polynomial.) – ofer zeitouni Aug 27 '13 at 18:45