Stochastic integral : $\int_0^T (W(s))^2dW(s)$ How to evaluate this integral $$\int_0^T(W(s))^2 \, dW(s)$$
where $W(s)$ is random variable associated with brownian motion.
I am new to this .Thanks in advance.
 A: $\newcommand{\var}{\operatorname{var}}\newcommand{\cov}{\operatorname{cov}}$
In comments under the question, you say your main concern is how to evaluate $\int_0^T W\,dt$.
By symmetry, $\mathbb E\left(\int_0^T W\,dt\right)=0$, so the substantial part is finding $\var\left(\int_0^T W\,dt\right)$.  If linearity of covariance in each argument separately applies to integrals and not merely to the finite case (so you may have to either think about how this can be shown, or cite a theorem in some book), then we have
$$
\cov\left( \int_0^T W(t)\,dt , \int_0^T W(s)\,ds \right) = \int_0^T\int_0^T \cov(W(t),W(s))\,dt\,ds
$$
$$
= \int_0^T\int_0^T \min\{s,t\}\,dt\,ds.
$$
Now do two integrals: one for the part of the square below the line $t=s$, and the other for the part above it.  (But they're the same, by symmetry.)
A: Let $f(W_t,t)=\frac{W^3}{3}$.
Ito's Lemma for Brownian motion is $df = (f_t+\frac{f_{ww}}{2}) dt + f_w dW$.
So $df = W dt + W^2 dW$
So $\int df = \frac{W^3}{3} + C =  \int W^2 dW + \int W dt + C$
So $\int W^2 dW = \frac{W^3}{3} -\int W dt + C$.
(This begs the question of What does it mean to integrate a Brownian motion with respect to time?.  This is discussed thoroughly here by Jonathan Goodman.)
So
$\int_0^T W_s^2 dW_s = \frac{W_T^3}{3} -\int_0^T W_s ds$
So
$E[\int_0^T W_s^2 dW_s] = E[\frac{W_T^3}{3} -\int_0^T W_s ds]
= E[\frac{W_T^3}{3}] - E[\int_0^T W_s ds]
= \frac{T}{3} E[W_T] - \int_0^T E[W_s] ds=0$
and
$E[(\int_0^T W_s^2 dW_s)^2] = E[(\int_0^T W_s^4 ds)] = (\int_0^T E[W_s^4] ds)
= (\int_0^T s^2 ds) = \frac{T^3}{3}$
by Itô isometry and Fubini's Theorem.
