This seems like a simple chain-rule question, but I'm getting stumped. I've searched and searched, but apologies if this question was covered somewhere else.
$\frac{d}{dt}\left(\frac{\partial}{\partial \dot{x}}f\left(x(t),\dot{x}(t)\right)\right)$
With some handwaving and "brute intuition," I'm pretty sure the result is
$\frac{\partial}{\partial\dot{x}} \dot{f} - \frac{\partial}{\partial x} f$,
(where obviously the dot indicates the time derivative of the function), but I cannot get there rigorously. I can provide more context if needed, but I believe these are the essentials. I think it's safe to assume the derivatives commute.
Thanks in advance!