I was assigned this exercise by my Stochastic Analysis Professor.
Exercise.
Let $B$ be a one-dimensional Brownian Motion, and consider the following processes: $X_t=\int_0^tB_sds\quad Y_t=\int_0^ts^2dB_s$. Compute, for $s,t\geq0$, $Cov(X_s,Y_t)$.
Solution.
This is how i would solve it.
It is known that the stochastic integral (with respect to the Brownian Motion), as a process, is a martingale. So $Y_t$ is a martingale. It is known that $\mathbb{E}(Y_t)=0$, too. So, using these two facts, we get
$Cov(X_s,Y_t)=\mathbb{E}(X_sY_t)=\mathbb{E}(X_sY_s)\quad s\leq t$.
It is kwown that
$Cov(\int_a^bX_tdB_t,\int_a^bY_tdB_t)=\mathbb{E}(\int_a^bX_tdB_t\int_a^bY_tdB_t)=\mathbb{E}(\int_a^bX_tY_tdt)$ whenever the processes $X_t$ and $Y_t$ satisfy some integrability assumptions. So at this point I would proceed like this
$\mathbb{E}(X_sY_s)=\mathbb{E}[\int_0^sB_udu\int_0^sv^2dB_v]=\mathbb{E}[\int_0^s(\int_0^udB_w)du\int_0^sv^2dB_v]=\mathbb{E}[\int_0^s[\int_0^udB_w\int_0^sv^2dB_v]du]=$
$=\mathbb{E}[\int_0^s[\int_0^udB_w(\int_0^uv^2dB_v+\int_u^sv^2dB_v)]du]=\int_0^s\mathbb{E}[\int_0^udB_w(\int_0^uv^2dB_v+\int_u^sv^2dB_v)]du=\int_0^s(\int_0^uv^2dv)du=\frac{s^4}{12}.$
In this way I get the same result my Professor got in the solution he posted on his webpage, nevertheless he procedeed in a different way. Infact, he wrote
$\mathbb{E}(X_sY_t)=\mathbb{E}(X_sY_s)=s^2\int_0^s\mathbb{E}(B_uB_s)du-2\int_0^s\int_0^su\mathbb{E}(B_uB_v)dudv=$
$=s^2\int_0^sudu-2\int_0^s\int_0^s\min(u,v)dudv=\ldots=\frac{s^4}{12}$.
I really don't get this
$\mathbb{E}(X_sY_s)=s^2\int_0^s\mathbb{E}(B_uB_s)du-2\int_0^s\int_0^su\mathbb{E}(B_uB_v)dudv$
while for the rest I'm ok because one of the characterizations of the Brownian Motion is as a gaussian process with mean zero and $Cov(B_s,B_t)=\min(s,t)$.
Thank you all.
Note that by Itô's formula (applied for $f(t,x) := t^2 \cdot x$), we have
$$s^2 B_s = \int_0^s r^2 \, dB_r + 2 \int_0^s r B_r \, dr.$$
This is equivalent to
$$Y_s = s^2 B_s - 2 \int_0^s r B_r \, dr$$
and that's exactly the identity which your professor used.