Suppose $D \subset \mathbb{R}^d$ is a domain and $f: \overline{D} \to \mathbb{R}$ is a continuous function, $C^2$ in $D$, satisfying$$f(x) = 0\text{ for }x\in \partial D,$$$${1\over2} \Delta f(x) = -1 \text{ for }x \in D.$$Let $B\_t$ be standard $d$-dimensional Brownian motion and let $\tau = \text{inf}\{t \ge 0 : B\_t \notin D\}.$ I have two questions.


* Is$$M\_t = f(B\_{t \wedge \tau}) + (t \wedge \tau)$$a local martingale?
* If $x \in D$, do we have$$\textbf{E}^x[\tau] = f(x)?$$



$M_t = f(B_{t \wedge \tau}) + (t \wedge \tau)$ local martingale, $\textbf{E}^x[\tau] = f(x)?$
Itô's formula asserts that $Y\_t = f(B\_t) + t$ is a (continuous) local martingale. Let $\tau\_n = \inf\{t : |Y\_t| \ge n\}$; then $\tau\_n \uparrow \infty$ and $Y\_{t \wedge \tau\_n}$ are bounded martingales. Then for each $n$, $M\_{t \wedge \tau\_n} = Y\_{(t \wedge \tau) \wedge \tau\_n}$ is a bounded martingale too. So $M\_t$ is a local martingale.


You didn't say $D$ had to be bounded, so take $D = \mathbb{R}^d$, so that $\partial D = \emptyset$ and $\tau = \infty$, so $E^0 \tau = \infty$. Set $f(x) = -\frac{1}{d} |x|^2$; then $\frac{1}{2}\Delta f = -1$ and $f(0) = 0 \ne \infty$.


If $D$ is bounded then the second claim is true. In this case $f$ is also bounded so $M\_t$ is a martingale. Thus $$f(x) = E^x M\_0 = E^x M\_t = E^x f(B\_{t \wedge \tau}) + E^x [ t \wedge \tau].$$
Since the Brownian motion will eventually exit $D$ with probability 1, we have $\tau < \infty$ almost surely, so as $t \to \infty$ we have $f(B\_{t \wedge \tau}) \to f(B\_{\tau}) = 0$ almost surely. Since $f$ is bounded, by dominated convergence, $E^x f(B\_{t \wedge \tau}) \to 0$. And by monotone convergence, $E^x[\tau \wedge t] \to E^x \tau$.


