Stochastic Calculus - Ito decomposition I have got one question about Ito decomposition. Suppose $W_t$ is a Brownian Motion:

$X_t = W_t^2 + \int_0^t(W_t^3-1)du$

How to get $dX_t$? I am quited comfused by the integral. Should we calculate the integral first since it is just a normal integral. Or we take differential on both sides like:
$dX_t=dW_t^2+(W_t^3-1)du$ and use Ito's formula to calculate $dW_t^2$? If it is the latter case, why can't we do the integral first? If it is the former case, why can we do the differential first? Thanks so much!
By the very nature of paths of unbounded variation (such as those of Brownian motion), an expression such as $dW_t$ must be interpreted in integral form. In other words, when someone writes an expression of the form
$$dX_t = b dt + \sigma dW_t, \quad t \geqslant 0,$$
what they really mean is 
$$ X_t - X_0 = \int_0^t b ds + \int_0^t \sigma dW_s, \quad t\geqslant 0.$$
The differential notation is shorthand for the integral form and is defined to be the process $X_t$ which satisfies the integrated form in a suitable sense.

To answer your question, you can do either. That is, you can compute the integral $\int_0^t (W_s^3 - 1) ds$ directly, and then apply Itô's formula when applying the differential (as you must do with the $W_t^2$ term). However, if all you want is to write the process in differential form, there is no need to do this. Indeed,

\begin{align*}
d(X_t) &amp;= d(W_t^2) + (W_t^3 - 1)dt \\
&amp;= 2W_t dW_t + dt + (W_t^3 - 1)dt \\
&amp;= 2W_t dW_t + W_t^3 dt.
\end{align*}
Again, in the above, the first equality only makes sense because
$$W_t^2 - W_0^2 = \int_0^t 2W_s dW_s + \int_0^t ds.$$
X(t) = F(X,t) = X^2 + (X^3-1)t

Now you can use taylor expansion in terms of t and x and 1/2x^2 
thats it.