Let $B_t$ = Brownian motion at time $t$
I know that $(dB_t)^2 = dt$ and $d(f(x)) = f'(x)\,dx$ for some differentiable function.
Now, I have that $$M_t = B_t^2 - t$$
$$dM_t = d(B_t^2) - d(t)$$
$$dM_t = d(B_t^2) - 1\,dt$$
$$dM_t = 2B_t\,dB_t + dt - dt$$
I am struggling to see how the last line comes abot.
Why does $d(B_t^2) = 2B_t\,dB_t + dt$ ?
Edit: wait, this is just chain rule with Ito's formula for $f(B_t)$!!
In case anyone else has the same question;
Ito's formula for $f(B_t)$ is as follows;
We have $(dB_t)^2 = dt$
Then for some differentiable function $f(x)$
$$df(x) = f'(x)\,dx + \frac{1}{2}f''(x)(dx)^2$$ With the above being the result of a 2nd order taylor expansion.
Letting $x = B_t$
$$df(B_t) = f'(B_t)\,dB_t + \frac{1}{2}f''(B_t)\,dt$$
So, in our case, we use $f(x) = x^2$
$$d(x^2) = 2x\,dx + \left(\frac{2 \, dx}{2}\right)^2$$
Substitute $B_t^2 = x^2$
$$d(B_t^2) = 2B_t\,dB_t + (dB_t)^2 = 2B_t\,dB_t + dt$$
Ito's formula for $f(B_t)$ is as follows;
We have $(dB_t)^2 = dt$
Then for some differentiable function $f(x)$
$$df(x) = f'(x)dx + \frac{1}{2}f''(x)(dx)^2$$ With the above being the result of a 2nd order taylor expansion.
Letting $x = B_t$
$$df(B_t) = f'(B_t)dB_t + \frac{1}{2}f''(B_t)dt$$
So, in our case, we use $f(x) = x^2$
$$d(x^2) = 2xdx + (\frac{2 dx}{2})^2$$
Substitute $B_t^2 = x^2$
$$d(B_t^2) = 2B_tdB_t + (dB_t)^2 = 2B_tdB_t + dt$$