Computing the expected value of the fourth power of Brownian motion I am trying to derive the variance of the stochastic process $Y_t=W_t^2-t$, where $W_t$ is a Brownian motion on $( \Omega , F, P, F_t)$.
At a certain point it is necessary to compute the following expectation
$$\mathbb{E}[W_t^4]= 4\mathbb{E}\left[\int_0^t W_s^3 dW_s\right] +6\mathbb{E}\left[\int_0^t W_s^2 ds \right]$$
I know the solution but I do not understand how I could use the property of the stochastic integral for $W_t^3 \in L^2(\Omega , F, P)$ which takes to compute $$\int_0^t \mathbb{E}\left[(W_s^3)^2\right]ds$$
Similarly, why is it allowed in the second term
$$\int_0^t \mathbb{E}[W_s^2]ds$$
to move the expectation inside the integral?
 A: We have that $V[W^2_t-t]=E[(W_t^2-t)^2]$ so
$$E[(W_t^2-t)^2]=\int_\mathbb{R}(x^2-t)^2\frac{1}{\sqrt{t}}\phi(x/\sqrt{t})dx=\int_\mathbb{R}(ty^2-t)^2\phi(y)dy=\\
=t^2\int_\mathbb{R}(y^2-1)^2\phi(y)dy=t^2(3+1-2)=2t^2$$
where $\phi(x)=(2\pi)^{-1/2}e^{-x^2/2}$.
A: @Snoop's answer provides an elementary method of performing this calculation. You may use Itô calculus to compute $$\mathbb{E}[W_t^4]= 4\mathbb{E}\left[\int_0^t W_s^3 dW_s\right] +6\mathbb{E}\left[\int_0^t W_s^2 ds \right]$$ in the following way. Observe that by token of being a stochastic integral, $\int_0^t W_s^3 dW_s$ is a local martingale. But Brownian motion has all its moments, so that $W_s^3 \in L^2$ (in fact, one can see $\mathbb{E}(W_t^6)$ is bounded and continuous so $\int_0^t \mathbb{E}(W_s^6)ds < \infty$), which means that $\int_0^t W_s^3 dW_s$ is a true martingale and thus $$\mathbb{E}\left[ \int_0^t W_s^3 dW_s \right] = 0$$
To compute the second expectation, we may observe that because $W_s^2 \geq 0$, we may appeal to Tonelli's theorem to exchange the order of expectation and get: $$\mathbb{E}\left[\int_0^t W_s^2 ds \right] = \int_0^t \mathbb{E} W_s^2 ds = \int_0^t s ds = \frac{t^2}{2}$$
Altogether, this gives you the well-known result $\mathbb{E}(W_t^4) = 3t^2$.
