# An example of Itô integral for Brownian motion. Why that equality?

I quote Øksendal (2003)

Statement. Start from a 1-dimensional Brownian motion $$B_t$$. Assume $$B_0=0$$. Then $$\displaystyle{\int_0^t}B_sdB_s=\displaystyle{\frac{1}{2}B_t^2}-\displaystyle{\frac{1}{2}t}$$ Proof. Put $$\phi_n(s,\omega)=\sum B_j(\omega)\cdot\chi_{[t_j, t_{j+1}]}(s)$$, where $$B_j=B_{t_j}$$ and $$\chi$$ denotes the indicator function on the subset $$[t_j,t_{j+1}]$$. Then: \begin{align}\mathbb{E}\bigg[\int_0^t(\phi_n-B_s)^2ds)\bigg]&=\mathbb{E}\bigg[\sum_j\int_{t_j}^{t_{j+1}}(B_j-B_s)^2ds\bigg]\\&\color{red}{=}\sum_{j}\int_{t_j}^{t_{j+1}}(s-t_j)ds\\&=\cdots\end{align}

What I cannot understand is the $$\color{red}{\text{red}}$$ equality above. How can one pass from $$\mathbb{E}\bigg[\sum_j\int_{t_j}^{t_{j+1}}(B_j-B_s)^2ds\bigg]\tag{1}$$ to $$\sum_{j}\int_{t_j}^{t_{j+1}}(s-t_j)ds\tag{2}$$?

Possibly, which is the role of the outer expected value $$\mathbb{E}$$ (with respect to a probability measure $$\mathbb{P}$$, I guess) in this passage from $$(1)$$ to $$(2)$$?

Since for $$s>t$$, $$\mathsf{E}(B_s-B_t)^2=\mathsf{E}B_{s-t}^2=s-t$$, $$\mathsf{E}\left[\sum_{j}\int_{t_j}^{t_{j+1}}(B_s-B_j)^2\,ds\right]=\sum_{j}\int_{t_j}^{t_{j+1}}\mathsf{E}(B_s-B_j)^2\,ds=\sum_{j}\int_{t_j}^{t_{j+1}}(s-t_j)\,ds.$$
• The first equality $\mathsf{E}\left[\sum_{j}\int_{t_j}^{t_{j+1}}(B_s-B_j)^2\,ds\right]=\sum_{j}\int_{t_j}^{t_{j+1}}\mathsf{E}(B_s-B_j)^2\,ds$ follows from linearity of expectation $\mathsf{E}$, doesn'it? – Strictly_increasing Oct 15 '20 at 10:02
• $$\mathsf{E}\left[\int_{t_j}^{t_{j+1}}(B_s-B_j)^2\,ds\right]=\int_{\Omega}\left[\int_{t_j}^{t_{j+1}}(B_s(\omega)-B_j(\omega))^2\,ds\right]\mathsf{P}(d\omega)$$ – d.k.o. Oct 15 '20 at 11:31
• The product measure here is $\mu \times \mathsf{P}$, where $\mu$ is the Lebesgue measure on $\mathbb{R}$. So the "joint differential" is $d(\mu\times \mathsf{P})(s,\omega)$. – d.k.o. Oct 15 '20 at 13:55
• Pardon, just one very last observation: so, just for confirmation, in the reference it is meant that $$\int_{t_j}^{t_{j+1}}(B_s(\omega)-B_j(\omega))^2\,ds=\int_{t_j}^{t_{j+1}}(B_s(\omega)-B_j(\omega))^2\,d\mu(s)$$ with $\mu$ Lebeasgue measure on $\mathbb{R}$? ($f(s,\omega)$ is a stochastic process) – Strictly_increasing Oct 15 '20 at 15:55
• By the way, the equality there should be stated as $$\int_X\left(\int_Y f(x,y)d\nu(y)\right)d\mu(x)=\int_Y\left(\int_X f(x,y)d\mu(x)\right)d\nu(y)=\ldots$$ – d.k.o. Oct 15 '20 at 16:10