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$? 



On the expectation of a path integral involving Brownian motion up to a random time
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.


