Using Ito's formula, write down a stochastic diferential equation satiesfied by $Y_t:=X_t^2$, given both $Y_t$ and $X_t$ I am trying to solve this exercise and I am stuck in the third part of it. I checked the solution and it makes no sense to me, so I would really appreciate it if someone could explain to me how Ito's formula is applies in this case (maybe I don't know some rules). Thanks a lot! :)
So We have the following stochastic differential equation
$$dX_t=\alpha X_t dt+2dW_t, \quad X_0=0,$$
where $W_t$ is a standard Brownian motion and $\alpha\in\mathbb{R}$ is a constant.
From this I have obtained, using $Z_t=e^{-\alpha t}X_t$ that
$$X_t=e^{\alpha t}X_0+2e^{\alpha t}\int_0^t e^{-\alpha s}dW_s$$
Question: what rules does my professor use to give the solution below?
$$dY_t=d(X_t^2)=2X_tdX_t+2\frac{1}{2}2^2dt=2\alpha X_t^2 dt+4X_tdW_t+4dt$$
I understand the last step - it is simple substitution, but how does he get the previous one? 
 A: Ito's formula says that given 

$$ dX_t = \mu_t dt + \sigma_t dW_t $$
  and a $C^2$-function $f \colon \mathbf R^2 \to \mathbf R$, we have for $Y_t = f(t, X_t)$ that
  $$ dY_t = \left(\frac{\partial f}{\partial t}(t, X_t) + \mu_t \frac{\partial f}{\partial x}(t, X_t) + \frac{\sigma_t^2}{2}\frac{\partial^2 f}{\partial x^2}(t, X_t)\right)\, dt 
+ \sigma_t \frac{\partial f}{\partial x}\, dW_t $$

In your case, $\mu_t = aX_t$, $\sigma_t = 2$, $f(t,x) = x^2$, hence $\partial_t f(t,x) = 0$, $\partial_x(t,x) = 2x$, $\partial_x^2 f(t,x) = 2$, giving
$$ dY_t = \left(aX_t \cdot 2X_t + \frac{2^2}2\cdot 2\right)\,dt + 2 \cdot 2X_t\,dW_t = 2aX_t^2 \,dt + 4\,dt + 4X_t\, dW_t $$
A: Ito's formula:
http://en.wikipedia.org/wiki/Itō's_lemma
$Y = X^2$
1.) find $dY$ using the chain rule to order $(dX)^2$ with a taylor expansion and substitute for $dX$
$$dY=\frac {\partial Y}{\partial t}dt + \frac {\partial Y}{\partial X}dX + \frac 12 \frac {\partial^2 Y}{\partial X^2}(dX)^2$$
$$=2X(a(t)Xdt+2dW) + \frac 12*2(a(t)Xdt+2dW)^2 = 2X(a(t)Xdt+2dW) + (a(t)Xdt+2dW)^2$$
2.) use Ito's "box" rule to compute $(dX)^2$ and collect like terms
$(dW)^2=dt, dtdW=0, (dt)^2 = 0$
$$dY = 2X^2a(t)dt + 4XdW + 4dt$$ as desired
