A version of Wald identity Let $W$ be a standard one-dimensional Brownian motion. Let $T$ be a stopping time with $\mathbb{E}\sqrt{T}<+\infty$. Then
$$\mathbb{E}W_T=0\quad \mathbb{E}W^2_T=\mathbb{E}T$$
I can prove these identies under the condition $\mathbb{E}T<+\infty$. But what about this one?
 A: OK, since I slipped again (there is no way I will believe nowadays that after 40 one's abilities do not decline sharply, though when I was younger I was more optimistic about the lifetime of a mathematician), let's try to figure it out.
We are going to use the standard trick of considering the truncated stopping times $T_\tau=\min(\tau,T)$. Everything is fine for them, so the whole problem is passing to the limit. 
The only good idea I have about the Brownian motion is to construct some sub- and super-martingales and play with them a bit. The key, of course, is to control $E\Phi(W(T_\tau))$ where $\Phi(x)$ is some function growing a bit faster than $|x|$, so we can pass to the limit in any expression growing linearly in $W(T_\tau)$. 
Notice that if $E\sqrt T<+\infty$, then so is $E\Psi(T)$ with some regular concave $\Psi(x)$ vanishing at $0$ and growing a bit faster than $\sqrt x$. Now the key point is that $\Psi(t+W(t)^2)-2\Psi(t)$ is a super-martingale (concavity of $\Psi$ plus the fact that the first derivative $\Psi'$ is decreasing). Thus, for our "decent" stopping time $T_\tau$, we have 
$$
E\Psi(W(T_\tau)^2)\le E\Psi(T_\tau+W(T_\tau)^2)\le 2E\Psi(T_\tau)\le 2E\Psi(T)\,,
$$ 
which is exactly what we were looking for. 
The first statement is now immediate. For the second one we need to work a bit more. Assume that $E[W(T)^2]<+\infty$. Consider a convex function $\Phi(x)$ defined as $x^2$ on $[-2A,2A]$ and extended linearly so that it is $C^1$ beyond that interval. Also, define $\Psi(x)=x$ on $[0,A^2]$ and make it concave, smooth, and constant on $[2A^2,+\infty]$. Then $2\Phi(W(t))-\Psi(T+W(t)^2)$ is a sub-martingale, so 
$$
E\Psi(T_\tau)\le E\Psi(T+W(T_\tau)^2)\le 2E\Phi(W(T_\tau))\,.
$$
Now we can pass to the limit as $\tau\to+\infty$ to get $E\Psi(T)\le 2E\Phi(W(T))\le 2E[W(T)^2]$. Finally, letting $A\to\infty$, we get (by Fatou, say) $ET<+\infty$, after which you know everything yourself.
I hope there is no stupid error this time :-)
A: Well, I provide a proof using Burkholder-Davis-Gundy(BDG) inequality.(http://en.wikipedia.org/wiki/Quadratic_variation#Martingales)
Let $M=\left\{M_t=W_{t\wedge T};0\le t<+\infty\right\}$, then $M$ is a martingale with $\langle M\rangle_t=t\wedge T$, so by BDG inequality, we have there exists a constant $K>0$ such that
$$\mathbb{E}M_T^*\le K\mathbb{E}\sqrt{T}<+\infty$$
where $M_t^*=\sup_{0\le s\le t}|M_s|$.
Since for all $t\ge0$
$$|M_t|\le\sup_{0\le s\le t}|M_s|=\sup_{0\le s\le t}|W_{s\wedge T}|\le\sup_{0\le s\le T}|W_{s\wedge T}|=\sup_{0\le s\le T}|M_s|=M_T^*$$
Hence $M$ is uniformly integrable, $\mathbb{E}W_T=\mathbb{E}M_T=0$.
Hence $\left\{M_t;0\le t\le+\infty\right\}$ is a martingale with last element $M_T=W_T$, $\left\{M_t^2;0\le t\le+\infty\right\}$ is a submartingale.
If $\mathbb{E}T<+\infty$, then we already know that $\mathbb{E}W_T^2=\mathbb{E}T$.
If $\mathbb{E}W_T^2<+\infty$, then for all $t>0$, since $M_t = \mathbb{E}[W_T \mid \mathcal{F}_t]$, the conditional Jensen inequality yields
$$\mathbb{E}M_t^2\le \mathbb{E}W_T^2<+\infty$$
hence $M$ is $L^2$ bounded, hence $L^2$ convergent.
By the monotone convergence theorem, we have
$$\mathbb{E}T=\mathbb{E}\lim_{t\to+\infty}(t\wedge T)=\lim_{t\to+\infty}\mathbb{E}(t\wedge T)=\lim_{t\to+\infty}\mathbb{E}W_{t\wedge T}^2=\lim_{t\to+\infty}\mathbb{E}M_{t}^2=\mathbb{E}M_T^2<+\infty,$$
so again $\mathbb{E}W_T^2=\mathbb{E}T$.
