Why does the partial derivative with respect to $x$ of a function depending only on $\dot{x}$ vanish?
Calculus of variations -- how does it make sense to vary the position and the velocity independently?