Stochastic calculus - Stopping times, martingales I am preparing for an exam and one of the problems is:
Compute $\mathbb{E}[ \sigma B^2_{\sigma}]$ when $\sigma = \inf \{t \geq 0 : |B_t| = \sqrt{2} \}$, where B is Standard Brownian Motion. 
I am not sure where to begin because I have seen that $\mathbb{E}[B^2_{\sigma}] \ = \ \mathbb{E}\sigma$ for bounded stopping time, yet I am shamefully clueless about how to solve this problem. Could anyone give me a helping hand please? 
 A: Because of the continuity of the sample paths of Brownian motion, we have $$|B_{\sigma}| = \sqrt{2};$$ hence $B_{\sigma}^2=2$ which implies
$$\mathbb{E}(\sigma B_{\sigma}^2) = 2 \mathbb{E}(\sigma).$$
This means that everything boils down to calculating $\mathbb{E}(\sigma)$. To this end, recall that $M_t := B_t^2-t$ is a martingale. By the optional stopping theorem, $M_{t \wedge \sigma}$, $t \geq 0$, is a martingale. In particular,
$$\mathbb{E}(M_{t \wedge \sigma}) = \mathbb{E}(M_0)=0,$$
i.e.
$$\mathbb{E}(B_{t \wedge \sigma}^2) = \mathbb{E}(\sigma \wedge t). \tag{1}$$
Since $|B_{t \wedge \sigma}| \leq \sqrt{2}$ for all $t \geq 0$, we can apply the dominated convergence theorem to conclude that
$$2 = \mathbb{E}(B_{\sigma}^2) = \lim_{t \to \infty} \mathbb{E}(B_{t \wedge \sigma}^2).$$
On the other hand, the monotone convergence theorem yields
$$\mathbb{E}(\sigma) = \lim_{t \to \infty} \mathbb{E}(\sigma \wedge t).$$
Letting $t \to \infty$ in $(1)$, we find
$$\mathbb{E}(\sigma)=2.$$
Hence, $$\mathbb{E}(\sigma B_{\sigma}^2) = 4.$$
A: First of all , $\sigma$ is finite almost surely (law of iterated logarithm)
At time $t=\sigma$, it is trivial to see that $B_{\sigma}^2=|B_{\sigma}|^2=\sqrt{2}^2=2$ a.s.
Furthermore , the process $M_t=B_t^2-t$ is a martingale, because $B$ is a martingale and its quadratic variation function is $t$.
The process $U_t=M_{t\wedge\sigma}$ is also a martingale( a stopped martingale is a martingale) 
$$U_0=E(U_t)$$
In particular using the limit, and the dominated convergence theorem
$$0=U_0=lim_{t \to \infty}E(U_t)=E(lim_{t \to \infty}U_t)=E(M_{\sigma})=E(B_{\sigma}^2)-E(\sigma)$$
which the results you are looking for. 
