I have the following SDE
$$ dx = -at^2 xdt + gdW $$
that I apply the following transformation to, $y=e^{at^3/3}$, which gives me the e^{at^3/3}for $y$
$$ dy = e^{at^3/3}gdW $$
Now, solving this is easy and I get (after transforming back to $x$)
$$ x(t) = x_0e^{-at^3/3} + ae^{-at^3/3}\int_0^t{e^{as^3/3}dW(s)} $$
Now, I am asked to find the mean and variance of $x$. For the mean I get
$$ \langle x \rangle = \langle x_0e^{-at^3/3} \rangle + \langle ae^{-at^3/3}\int_0^t{e^{as^3/3}dW(s)} \rangle \\ = x_0e^{-at^3/3}+ ae^{-at^3/3}\int_0^t{e^{as^3/3}\langle dW(s)} \rangle \\ = x_0e^{-at^3/3} $$
How would I go about finding the variance? Can I use the solution $x$ I found, or do I have to solve $d(x^2)$?
Indeed using the integration factor Solution to General Linear SDE we obtain
$$x(t) = x_0e^{-at^3/3} + ae^{-at^3/3}\int_0^t{e^{as^3/3}dW(s)}.$$
The Itô-integral has mean zero. For the variance, we can use Itô isometry to get
$$Ex^{2}(t) = E\left[\left(ae^{-at^3/3}\int_0^t{e^{as^3/3}dW(s)}\right)^{2}\right]=a^{2} e^{-a2t^3/3}\int_0^t e^{a2s^3/3}ds.$$