In the initial value problem $y'(t)=f(t,y(t))$, I want to get a second derivative of $f$ with respect to $t$. \begin{align*}\frac{d^2}{dt^2}f(t,y)&=\frac{d}{dt}(f_t+f_yf)\\ &=f_{tt}+f_{ty}f+(f_t+f_yf)f_y+f(f_{yt}+f_{yy}f)\\ &=f_{tt}+2ff_{ty}+f^2f_{yy}+y''f_y.\end{align*}
Is this formula correct? Of course, I'm assuming that $f$ is smooth enough so that interchange of variables in differentiation is possible.