Variance of certain Ito-process I found the following task in a book, I am studying with, and cannot figure out the result although it should be fairly simple...
Consider the Ito-process:
$$
_=(_−)^2+|_|_
$$
What is $Var (Y_t)$?
Edit:
I have used the Ito formula to derive a process $A_t$ such that $Y^2_t - A_t$ is a Martingale, i.e.
$$
dA_t = (2 Y_t (W_t - t )^2 + W_t^2 )dt
$$
 Therefore I wanted to compute the Expectation of $A_t$, but since that process again depends on $Y_t$ I could not figure out an analytical solution, in case there even is one.
 A: We use $\text{var}(Y_t) = \mathbb{E}(Y_t^2)-(\mathbb{E}(Y_t))^2$ to compute the variance. For simplicity, I will assume that $Y_0=0$.

Computation of $\mathbb{E}Y_t$

The process
$$M_t := \int_0^t |W_s| \, dW_s \tag{1}$$
is a martingale. In particular,
$$\mathbb{E}(M_t) = \mathbb{E}(M_0)=0,\qquad t \geq 0.$$
This implies
$$\mathbb{E}(Y_t) = \mathbb{E} \int_0^t (W_s-s)^2 \, ds,$$
which gives, by Fubini's theorem,
$$\mathbb{E}(Y_t) = \int_0^t \underbrace{\mathbb{E}((W_s-s)^2)}_{=s (s+1)} \, ds =  \frac{t^3}{3} + \frac{t^2}{2}.$$

Computation of $\mathbb{E}(Y_t W_t)$ and $\mathbb{E}(Y_t W_t^2)$ (this will be needed lateron)

Using
$$\mathbb{E} \left( \int_0^t f(s) \, dW_s \int_0^t g(r) \, dW_r \right) = \mathbb{E} \int_0^t f(s) g(s) \, ds \tag{2}$$
(which is a consequence of Itô's isometry, see e.g. here), we find for $M_t$, defined in $(1)$, that
\begin{align*} \mathbb{E}(W_t M_t) =\mathbb{E}\left( \int_0^t \, dW_s \int_0^t |W_r| \, dr \right) &= \int_0^t \mathbb{E}|W_s| \, ds  \\ &= \mathbb{E}(|W_1|) \int_0^t \sqrt{s} \, ds =\frac{2}{3} \mathbb{E}(|W_1|) t^{3/2}; \end{align*}
for the penultimate "=", we used that $W_s$ equals in distribution $\sqrt{s} W_1$. Similarly, it follws from $(2)$ and $$W_t^2 = \int_0^t W_s \, dW_s - \frac{t}{2}$$ that
\begin{align*} \mathbb{E}(W_t^2 M_t) &= \mathbb{E} \left( \int_0^t W_s \, dW_s \int_0^t |W_r| \, dW_r \right) - \frac{t}{2}\underbrace{ \mathbb{E}(M_t)}_{0} \\ &\stackrel{(2)}{=}  \int_0^t\mathbb{E}(|W_s| W_s )\, ds \\ &= \mathbb{E}(|W_1| W_1) \int_0^t s \, ds = \mathbb{E}(|W_1| W_1) \frac{t^2}{2}. \end{align*}
Moreover,
\begin{align*}\mathbb{E} \left(W_t \int_0^t (W_s-s)^2 \, ds \right) &= \int_0^t\underbrace{\mathbb{E}(W_t (W_s-s)^2)}_{=-2s^2} \, ds = - \frac{2}{3} t^3 \end{align*}
and
\begin{align*} \mathbb{E} \left( W_t^2 \int_0^t (W_s-s)^2 \, ds \right) = \int_0^t \underbrace{\mathbb{E}(W_t^2 (W_s-s)^2)}_{=ts+s^2 + s^2 t} \, ds = \frac{7}{6} t^3 + \frac{t^4}{3}. \end{align*}
Combining the above computation we get an explicit expression for $\mathbb{E}(Y_t W_t)$ and $\mathbb{E}(Y_t W_t^2)$.

Computation of $\mathbb{E}(Y_t^2)$

By Itô's formula,
$$\mathbb{E}(Y_t^2) = \int_0^t 2\mathbb{E}(Y_s (W_s-s)^2)) + \underbrace{\mathbb{E}(W_s ^2)}_{=s} \, ds.$$
The calculations from the first and second step allow us to compute $\mathbb{E}(Y_s (W_s-s)^2)$. Plugging everything in, we get $\mathbb{E}(Y_t^2)$. I leave it to you to write down the details...
