For the following equation, I don't understand how the terms $df(X_t)$ and $f'(X_t)dX_t$ differ.
$$df(X_t) = f'(X_t)dX_t + 1/2 f''(X_t)(dX_t)^2$$
As I understand, both terms refer to the change in the function $f$ with respect to $X_t$. Where am I going wrong?
Thanks in advance.
In stochastic calculus, people tend to write $d$ as a sort of inverse operator to the integration. I think this is easier to explain this through an example. If someone writes $$ dX_t = \alpha(t) dt + \beta(t) dB_t $$ this is a short way to render the integral formulation (obtained after integrating in time on both ends) $$ X_t = X_0 + \int_0^t \alpha(s) ds + \int_0^t \beta(s) dB_s, $$ where $(B_t)_{t\ge 0}$ is a Brownian motion. There is two reasons for this, the first one being conciseness. The second one is that this is highly convenient when using Ito's formula. Indeed, if you know that $$ dX_t = \alpha(t) dt + \beta(t) dB_t$$ then Ito's formula can write $$df(X_t) = f'(X_t) dX_t + \frac12 f''(X_t) d\langle X \rangle_t, (1) $$ where $\langle X \rangle$ is the quadratic variation of the process $(X_t)_{t \ge 0}$ and from the formula for $dX_t$ above we get $$df(X_t) = f'(X_t) \alpha(t) dt + f'(X_t) \beta(t) dB_t + \frac12 f''(X_t) d\langle X \rangle_t, $$ where I replaced $dX_t$ with $\alpha(t) dt + \beta(t) dB_t$. Those are just notations, and we can always come back to the real equation. The Ito formula (1) is in fact $$ f(X_t) - f(X_0) = \int_0^t f'(X_s) dX_s + \frac12 \int_0^t f''(X_s) d\langle X \rangle_s,$$ or, using the formula for $dX_t$, $$ f(X_t) - f(X_0) = \int_0^t f'(X_s) \alpha(s) ds + \int_0^t f'(X_s) \beta(s) dB_s + \frac12 \int_0^t f''(X_s) d\langle X \rangle_s.$$ So, to answer your question: $df(X_t)$ is in fact $f(X_t) - f(X_0)$ while $f'(X_t) dX_t$ (which should be read as one single term) corresponds to $\int_0^t f'(X_s) dX_s$. You can try with some example to see the difference, typically if $\beta \ne 0$ the two terms do not match.