I am reading something about martingale and this surprises me:
Let $(B_t)$ be a Brownian motion and $M_t= M_0 + \int_0^t Y_s d B_s$ an $L^2$ martingale for $t \in [0,1]$.
The author claims the following:
By Itô’s formula and the martingale property of $M$, we have
$$E\left[\int_0^1 Y_s^2 ds\right] = E[M_1 B_1 - M_0 B_0]$$
How to see this?
As suggested in the comments, there should be no square within the expectation. Note that $dM_t = Y_t dB_t$ and $d \langle M_t , B_t\rangle = Y_t dt$. By Itô's product rule: $$d(M_t B_t) = M_t dB_t + B_t dM_t + d \langle M_t , B_t\rangle= M_t dB_t + B_t dM_t + Y_t dt$$ The $M_t dB_t + B_t dM_t$ term corresponds to a martingale that starts at zero, so its expectation is zero. Thus, $$\mathbb{E}(M_t B_t - M_0B_0) = \mathbb{E}\left( \int_0^t Y_s ds \right)$$