Let $(B_t)$ a Brownian motion and $\tau$ an $L^1$ stopping time. I'm trying to prove that $$\mathbb E[B_\tau^2]=\mathbb E[\tau].$$
What I got so far is $$\mathbb E[B_{\tau\wedge t}^2]=\mathbb E[\tau\wedge t],$$ and thus $$\lim_{t\to \infty }\mathbb E[B_{\tau\wedge t}^2]=\mathbb E[\tau].$$
But how can I permute limit and expectation, i.e. why $$\lim_{t\to \infty }\mathbb E[B_{\tau\wedge t}^2]=\mathbb E[B_\tau^2]\ \ ?$$
You have that $$\mathbb E[(B_{\tau\wedge t}-B_{\tau\wedge s})^2]=\mathbb E[\tau\wedge t-\tau\wedge s].$$
In particular, since $\tau$ is $L^1$ finite, $(B_{\tau\wedge t}^2)_t$ is a $L^2$-"Cauchy" sequence. Therefore it converges. Since $\tau$ is a.s. finite, and $$\lim_{t\to \infty }B_{t\wedge \tau}=B_\tau,\ \ \text{a.s.}\tag{E}$$ by continuity of the Brownian motion, you have that $(E)$ also holds in $L^2$.