How can you prove
$$\frac{\partial f}{\partial y} = \frac{d}{d x} \left( \left( \frac{\partial}{\partial \frac{dy}{dx} } \right) \right)f ?$$
It's tempting to cancel the two $dx$'s, but can this be done?
Is there a guide to when you can safely cancel such terms and treat them as ordinary fractions?
$f$ depends on $y$ and $y$ depends on $x$.
This is Lagrangian field theory.