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?
Ito's formula says that given
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 $$