Let $(M_t, \mathcal{F}_t, 0 \leq t < \infty)$ be a martingale. For bounded stopping time $T$, we can deduce from Doob's Optional Sampling that $\mathbb E(M_T)=\mathbb E(M_0)$. Now let $T$ be a stopping time with finite expectation, i.e. $\mathbb E(T)<+\infty$. Can we deduce using $T\wedge n$ and perhaps Lebesgue's Dominated Convergence Theorem that $\mathbb E(M_T)=\mathbb E(M_0)$? If not, is there a sufficient condition for this to be true?
This question arose in studying Brownian motion. For $\tau:=\inf\{t>0:B_0=a,\,B_t=-b\}$ stopping time, we wish to show $\mathbb E(\tau)=ab$. One solution suggests $\mathbb E(B_\tau^2-\tau)=0$ by Doob's Optional Sampling Theorem. I wish to justify this claim with the above.
1) You first need to prove that $E(B_{\tau_{-b,a}})=0$ using Doob's Theorem. In order to do so, observe that $B_{t\wedge \tau_{-b,a}}$ is a bounded martingale. Moreover it can be easily proved that $P(\tau_{-b,a}<\infty)=1$. This is enough to apply Doob's Optional Stopping Theorem (see Revuz Yor's Continuous Martingales and Brownian Motion). Therefore, $$0=E(B_{\tau_{-b,a}})= aP(\tau_{-b,a}=a)-b(1-P(\tau_{-b,a}=a)). $$ This entails that $P(\tau_{-b,a}=a)=\frac{b}{b+a} $.
2) By Ito's formula it follows $$E(B^2_t-t)=0. $$ Applying Doob's Theorem as in step 1): $$ E(B^2_{\tau_{-b,a}})= E(\tau_{-b,a}), $$ but the left hand side equals $$b^2(1-\frac{b}{b+a} )+a^2\frac{b}{b+a} = ab. $$ The result is then proved.