Let $W$ be a standard Brownian motion, compute the stochastic integral $\int_0^t s W_s^2dW_s$.
I think I need to use itô's formula. In the answeres it says that the function I should take is: $f(t,x)=t\frac{x^3}{3}$. However I don't know why i should take that formula. It would really help if I knew why that formula is used. The book gives as final answere that the integral is equal to:
$\frac{t}{3}W_t^3 -\int_0^t \frac{W_s^3}{3} +sW_s \ \ ds$
I do get kind of close to this answer I think since I got stuck at
$\int_0^t \frac{W_s^3}{3}ds+\int_0^tsW_s^2dW_s +0.5\int_0^t 2sW_sd[W]_s = \frac{t}{3}W_s^3 +\int_0^t \frac{W_s^3}{3}ds +\int_0^tsW_sd[W]_s$
However I have difficulties with using the d[W]_s part. I tried $\int_0^tsW_sd[W]_s =\int_0^tsW_sf(t,x)ds$ but this doesn't seem to get me the correct answer.
Consider the differential $$d(tW_t^3)=W_t^3dt+td(W_t^3)$$ With Ito we find $dF:=d(W_t^3)$. The derivatives are $$\frac{\partial F}{\partial t}=0, \ \ \ \frac{\partial F}{\partial w}=3w^2, \ \ \ \frac{\partial^2 F}{\partial w^2}=6w$$ So $$dF=\frac{\partial F}{\partial w}dW_t+\frac{1}{2}\frac{\partial^2 F}{\partial w^2}dt=3W_t^2dW_t+3W_tdt$$ By plugging it in the first one: $$d(tW_t^3)=W_t^3dt+3tW_t^2dW_t+3tW_tdt$$ Finally $$3\int_0^tsW_s^2dW_s=tW_t^3-\int_0^tW_s^3ds-3\int_o^t sW_sds$$ $$\int_0^tsW_s^2dW_s=\frac{t}{3}W_t^3-\int_0^t\frac{W_s^3}{3}ds-\int_0^t sW_sds$$
Consider $F:=tW_t^3/3$. By Ito, we find the derivatives $$\frac{\partial F}{\partial t}=\frac{w^3}{3}, \ \ \ \frac{\partial F}{\partial w}=tw^2, \ \ \ \frac{\partial^2 F}{\partial w^2}=2tw$$ So $$dF=d\bigg(\frac{t}{3}W_t^3\bigg)=\frac{W_t^3}{3}dt+tW_t^2dW_t+tW_tdt$$ And again $$\int_0^tsW_s^2dW_s=\frac{t}{3}W_t^3-\int_0^t\frac{W_s^3}{3}ds-\int_0^tsW_sds$$