Calculating $E(1+M_t)^2\int_0^t M_s^2 ds$ and $E(1+M_t)^2\int_0^t M_s^2 dM_s$ Let $ M= (M_t)_{t\geq 0}$ be a Standard Brownian Motion. I would like to calculate
$$E\left[(1+M_t)^2\int_0^t M_s^2 ds\right]$$ and $$E\left[(1+M_t)^2\int_0^t M_s^2 dM_s\right].$$
For the first one, I tried to use Fubini's theorem, but I get a strange result. I think I'm calculating wrongly
$$
E\int_0^t M_t^2M_s^2 d s
$$
For the first one, I use Itô's formula:
$$\int_0^t M_s^2 dM_s = \frac{1}{3}M_t^3 -\int_0^t M_s ds,$$
ant then again Fubini...
Am I doing it right? Is there other way? Thanks
 A: You seem to be doing it correctly. In the first case, you can use the Tonelli theorem rather than the Fubini theorem, because the integrand of the double-integral $(1+M_t)^2M_s^2$ is non-negative a.s., therefore we may interchange integrals, and the first one equals :
$$
E\left[(1+M_t)^2\int_0^t M_s^2 ds\right] = \int_0^t E\left[(1+M_t^2)M_s^2\right]ds
$$
To evaluate the inner integral is a standard exercise in independence and stationarity of increments, as mentioned in a comment : indeed, \begin{align}
(1+M_t^2)M_s^2 & = M_s^2 + ((M_t-M_s)+M_s)^2M_s^2 \\& = M_s^2 + (M_t-M_s)^2M_s^2 + M_s^4 + 2(M_t-M_s)M_s^3
\end{align}
and therefore by linearity of expectations :
\begin{align}
E[(1+M_t^2)M_s^2] & = \color{blue}{E[M_s^2]} + \color{green}{E[(M_t-M_s)^2M_s^2]} + \color{red}{E[M_s^4]} + \color{fuchsia}{E[2(M_t-M_s)M_s^3]} \\
\\ & = \color{blue}{s} + \color{green}{E[(M_t-M_s)^2]E[M_s^2]} + \color{red}{E[N(0,s)^4]} +  \color{fuchsia}{E[2(M_t-M_s)]E[M_s^3]} \\
&= \color{blue}{s} + \color{green}{(t-s)s} + \color{red}{3s^2}+\color{fuchsia}{0}
\\ &= \underline{\mathbf{s + ts + 2s^2}}
\end{align}
and now $\int_0^t (s+ts+2s^2)ds$ is easy to calculate.

Key takeaway : Apply Fubini while looking out for Tonelli (which makes things so much easier!), and use independence of increments for taking expectations of polynomials of Brownian motion evaluated at various points.


For the second one, you have to apply the Ito formula as you have done, in order to simplify $\int_0^t M_s^2 dM_s$, with $f(x) = \frac{x^3}{3}$. (The use of the formula is justified since the initial process is Brownian motion, obviously an Ito process, and $f$ is smooth)
\begin{align}
\frac{M_s^3}3 = \int_0^t M_s^2dM_s + \int_0^t M_sds 
\end{align}
and therefore $\int_0^t M_s^2 dM_s = \frac{M_s^3}{3} - \int_0^t M_sds$. Whereupon the second question simplifies :
$$
E\left[(1+M_t^2)\int_0^t M_s^2dM_s\right] = E\left[(1+M_t^2)\left(\frac{M_s^3}{3} - \int_0^t M_sds\right)\right]\\ 
= E\left[(1+M_t^2)\frac{M_s^3}{3}\right] - E\left[(1+M_t^2)\int_0^t M_sds\right]$$
Now, for the first one, write $M_t = (M_t-M_s)+M_s$, expand out and use independence and stationarity of increments.
For the second one, we need to use Fubini, because a non-negative integrand is not present. However, it is not difficult to show that $$\int_0^t E\left[|(1+M_t^2)||M_s|\right]ds < \infty$$
using independence of increments : $$(1+M_t^2)M_s = M_s + M_s(M_t-M_s)^2 + (M_s)^3 + 2(M_s)^2(M_t-M_s)$$ and therefore by the triangle inequality and independence $$E\left[|(1+M_t^2)||M_s|\right] \leq E[|M_s|] + E[|M_s|]E[|M_t-M_s|^2]+E[|M_s|^3] + 2E[|M_s^2|]E[|M_t-M_s|] $$
Now, one can use scaling, reduce to the standard normal and show that the RHS is a polynomial in $s$ and $t$, whose integral from $0$ to $t$ is then obviously finite.
Once we use Fubini, then again independence of increments, as shown in part $1$, completes the answer.

On other ways to evaluate these : I am not so sure. The stage is still a very basic one, in the sense that we aren't using anything beyond the definition of the Brownian motion, and the Ito formula. I thought some kind of Stochastic Fubini might work for the second part (it is a theorem that allows an exchange of an Ito and a Lebesgue integral) but I think it overcomplicates the situation, so doesn't really count.
