= Solution
For $T_n=T\wedge n$, <Itô formula> and the differential equation show that
$$
d\bigl(e^{-\lambda s}V(X_s)\bigr)
=e^{-\lambda s}\sigma(X_s)V'(X_s)dW_s
$$
up to $T$. After localization this is a martingale, and boundedness of $V$ permits optional stopping. Thus, conditionally on $X_0$,
$$
V(X_0)=\mathbb E\left[e^{-\lambda T_n}V(X_{T_n})\mid X_0\right].
$$
On $\{T<\infty\}$, path continuity gives $X_T\in\{\ell,r\}$ and hence $V(X_T)=1$. On $\{T=\infty\}$, boundedness of $V$ makes $e^{-\lambda n}V(X_n)\to0$. The <dominated convergence theorem> therefore yields
$$
V(X_0)=\mathbb E[e^{-\lambda T}\mid X_0]
$$
on $\{\ell<X_0<r\}$, with the stated convention when $T=\infty$.
Back to article page