We have $W(t) = f(t)X(t)$. My textbook says that $dW = fdX + X\dfrac{df}{dt} dt$.
I don't get how they arrived at this conclusion. I get the first part, because $\dfrac{dW}{dX}dX = fdX$. But for the second part, I have no clue how they arrived there.
$(\dfrac{dW}{dt} + \dfrac{1}{2} \dfrac{d^2W}{dX^2})dt \stackrel{?}{=} X\dfrac{df}{dt} dt$
If so, could someone please explain why?
The Ito formula for a function $g(t, x)$ is $$d\bigl(g(t, X_t)\bigr) = \frac{\partial g}{\partial t}(t, X_t)\, dt + \frac{\partial g}{\partial x}(t, X_t)\, dX_t + \frac{1}{2}\frac{\partial^2 g}{\partial x^2} (t, X_t)\,d[X, X]_t$$ In your case, $W_t = g(t, X_t)$ for the function $g(t, x) = f(t)x$. The partials of $g$ are: $$\begin{split} \frac{\partial g}{\partial t}(t, x) &{}= f'(t)x,\\ \frac{\partial g}{\partial x}(t, x) &{}= f(t),\\ \frac{\partial^2 g}{\partial x^2}(t, x) &{} = 0. \end{split}$$ Substitution into the Ito formula gives your book's expression.