Here is a practice problem I encountered with Stochastic integral expectation. How to use Ito's formula to calculate the expectation of the following stochastic integral? $$ \mathrm{E}\left(\int_0^ts\mathrm{d}(B_s^2)\right)^2 $$ $B_t$ is standard Brownian motion.
I have tried to calculate the expectation by the following way: $$f(xy)=xy=tB_t^2$$ use Ito formula $$ tB_t^2 =\int_{0}^{t}B_s^2ds+\int_{0}^{t}sdB_s^2+\frac12\int_{0}^{t}1d\langle B^2,t\rangle +\frac12\int_{0}^{t}1d\langle B^2,t\rangle +\frac12\int_{0}^{t}0d\langle s\rangle+\frac12\int_{0}^{t}0d\langle B\rangle_s $$ But I am not sure $$ \langle B^2,t\rangle=0 $$ If $$ \langle B^2,t\rangle=0 $$ is incorrect, is there another way to calculate this expectation?
Too long for a comment:
Since some people use the horrible notation $(dB_t)^2=dt$ instead of $d\langle B\rangle_t=dt$ please confirm that it is not what you want in, say, $$\tag{1} \int_0^ts\,dB_s^2\,. $$ It seems you want $$\tag{2} \int_0^ts\,d(B_s)^2\,. $$ If that is the case, here is my hint: By Ito, $$\tag{3} d(B_s)^2=2\,B_s\,dB_s+\,ds\,. $$ This leaves you with the very easy task to "calculate" the expectation of the right hand side in $$\tag{4} \int_0^ts\,d(B_s)^2=2\int_0^ts\,B_s\,dB_s+\frac{t^2}{2}\,. $$ Alternatively you can start with \begin{align}\tag{5} \int_0^ts\,d(B_s)^2&=tB_t^2-\int_0^tB_s^2\,ds\,. \end{align} The expectation of this is \begin{align}\tag{6} \mathbb E\Big[\int_0^ts\,d(B_s)^2\Big]=t\mathbb E[B_t^2]-\int_0^t\mathbb E[B_s^2]\,ds=t^2-\int_0^ts\,ds=\frac{t^2}{2} \end{align} as it should.
Using (4) you could have a very easy life calculating \begin{align} \mathbb E\Big[\Big(\int_0^ts\,d(B_s)^2\Big)^2\Big]&= \mathbb E\Big[\Big(2\int_0^ts\,B_s\,dB_s\Big)^2\Big]+\frac{t^4}{4}\tag{7}\\ &\stackrel{\text{Ito isometry}}{=}4\,\mathbb E\Big[\int_0^ts^2\,B_s^2\,ds\Big]+\frac{t^4}{4}\tag{8}\\ &=4\int_0^ts^3\,ds+\frac{t^4}{4}\,.\tag{9} \end{align} I let you finish.