# Proving Wald's identity for Brownian motion

I'm trying to prove that for a Brownian motion $\big(B_t, \mathcal{F}_t \big)_{t\geq 0}$ and a stopping time $\tau$ satifying $\mathbb{E}[\tau]<\infty$, we have that $\mathbb{E}[B_\tau^2]=\mathbb{E}[\tau]$.

I know that $U_t=W_t^2-t$ is a martingale, and It's enough for me to show that $\mathbb{E} \big[ U_\tau\big]=0$. I define a sequence $U_{\tau \wedge n}$, and because it's a martingale I know by Doob's O.S.T that $\mathbb{E}[U_{\tau \wedge n}]=0$. Since $U_{\tau \wedge n}\rightarrow U_\tau$ almost surely, if I find a dominating function for $U_{\tau \wedge n}$, I will obtain that:

$0\equiv\mathbb{E}[U_{\tau \wedge n}]\rightarrow \mathbb{E}[U_\tau]$, which solves the problem.

However I've been having problems finding a dominating function for $U_{\tau \wedge n}$. I do know that:

$$\vert U_{\tau \wedge n}\vert \leq B_{\tau \wedge n}^2+\tau= B_\tau^2\cdot 1_{ \{ \tau \leq n\}}+ B_n^2\cdot 1_{ \{ \tau > n\}}+\tau \leq B_\tau^2+ B_n^2\cdot 1_{ \{ \tau > n\}}+ \tau$$

By Fatou's lemma I know that $B_\tau^2\in L^1$. Hence I already bounded the first and last term in $L^1$, and I just need to find an $L^1$ bound on $B_n^2\cdot 1_{ \{ \tau > n\}}$ to conclude.

I would very much appreciate any hint, as it seems to me as there is a little thing I am missing.

Use the martingale property of $(B_{t \wedge \tau})_{t \geq 0}$ and $(U_{t \wedge \tau})_{t \geq 0}$ to show that
$$\mathbb{E}((B_{n \wedge \tau}-B_{m \wedge \tau})^2) = \mathbb{E}(\tau \wedge n)-\mathbb{E}(\tau \wedge m), \qquad m \leq n,$$
and conclude that $(B_{n \wedge \tau})_{n \in \mathbb{N}}$ is an $L^2$-Cauchy sequence. By the completeness of $L^2$, the limit $X := \lim_{n \to \infty} B_{n \wedge \tau}$ exists in $L^2$. Since you already know that the sequence converges almost surely to $B_{\tau}$, it follows that $X=B_{\tau}$, and so $B_{\tau \wedge n} \to B_{\tau}$ in $L^2$. In particular,
$$\mathbb{E}(B_{\tau \wedge n}^2) \xrightarrow[]{n \to \infty} \mathbb{E}(B_{\tau}^2).$$