Solution (source code)

= Solution

On the event $T<\infty$, continuity puts $X_T$ on the boundary, where $u=1$. The limit found in part (c) is therefore $e^{-\lambda T}$, defining this expression to be zero when $T=\infty$. Taking expectations and using the bounded convergence justified in part (c) gives
$$
\boxed{\mathbb E e^{-\lambda T}=\mathbb E M_\infty=\mathbb E M_0=u(X_0).}
$$
The conclusion does not require almost-sure finiteness of $T$. It is the <discounted boundary-hitting representation> for a bounded solution of $\mathcal Lu=\lambda u$.