Solve the stochastic differential equation $dX_t = \alpha X_t \, dW_t + \sigma X_t \, dt$ 
We want to solve:
$dX_t = \alpha X_t dW_t + \sigma X_t dt$
where the initial condition $X_0$ is given and $\alpha$, $\sigma$ are constant.

The solution goes as follows -  We rewrite the equation as:
$\frac{dX_t}{X_t} = \alpha dW_t + \sigma dt$
and we can get
$\int_0^t\frac{dX_u}{X_u} = \int_0^t\alpha dW_u + \int_0^t\sigma t = \alpha W_t + \sigma t $
We use Itos formula and set $f(t,x) = f(x) = \ln x$. Why do we do this?
But then we get:
$d \ln(X_t) = \frac{1}{X_t}dX_t - \frac{1}{2} \frac{1}{X_t^2}(dX_t)^2 = \frac{1}{X_t}dX_t - \frac{\alpha^2}{2}dt$
How do get the last step i.e how is:
$\frac{1}{2} \frac{1}{X_t^2}(dX_t)^2 = \frac{\alpha^2}{2}dt$
By this the solution conclude that we can write
$\ln(X_t)-\ln(X_0) = \int_0^t \frac{dX_u}{X_u} - \frac{\alpha^2t}{2}$
Why is this obvious?
The rest of the solution is rather trivial so i let it be out. Thanks!
 A: 
We use Itô's formula and set $f(t,x) = f(x) = \ln x$. Why do we do this?

Well, if we consider instead of the SDE
$$dX_t = \alpha X_t \, dW_t + \sigma X_t \, dt \tag{1}$$
the "associated" ordinary differential equation
$$dx_t = \sigma x_t \, dt$$
(i.e. we just drop the stochastic integral), then it is well-known that the substitution $y_t := \log x_t$ leads to a very simple ODE which can be solved explicitly. So, if we want to solve the SDE (1), we simply give it a try and use the same substitution as in the deterministic case.

[....] how is $\frac{1}{2} \frac{1}{X_t^2} \, (dX_t)^2 = \frac{\alpha^2}{2} \, dt$.

This follows from the heuristical (!) rules
$$(dW_t)^2 = dt \qquad dt \, dW_t = 0 \qquad (dt)^2 =0$$
and $(1)$; indeed
$$(dX_t)^2 = (\alpha X_t \, dW_t + \sigma X_t \, dt)^2 = \alpha^2 X_t^2 \, dt.$$

By this the solution concludes that we can write $$\ln X_t - \ln X_0 = \int_0^t \frac{dX_u}{X_u} - \frac{\alpha^2}{2} t. \tag{3}$$

We know from the above considerations that
$$d \ln (X_t) = \frac{1}{X_t} \,d X_t - \frac{\alpha^2}{2} \, dt.$$
By the very definition (!) this differential equation is to be understood as an integral equation, i.e.
$$\ln X_t - \ln X_ 0 = \int_0^t \, d\ln (X_u) = \int_0^t \frac{1}{X_u} \, dX_u - \int_0^t \frac{\alpha^2}{2} \, du.$$
