This is purely recreational, but I'm eager to know the answer. I was playing around with Hamiltonian systems whose Hamiltonian is not equal to their mechanical energy $E$.
If we split the kinetic energy $K$ and the potential energy $V$ in homogeneous polynomials on $\dot{q}^k$, the time-derivative of the generalised coordinates. For instance, $$K = \sum_{n=1}^N\frac{1}{2}m_n\dot{\vec{r}}_n^2 = \underbrace{\sum_{n=1}^N\frac{m_n}{2}\frac{\partial\vec{r}_n}{\partial t}\cdot\frac{\partial\vec{r}_n}{\partial t}}_{K_0} + \underbrace{\dot{q}^k\sum_{n=1}^Nm_n\frac{\partial\vec{r}_n}{\partial q^k}\cdot\frac{\partial\vec{r}_n}{\partial t}}_{K_1} + \underbrace{\dot{q}^k\dot{q}^\ell\sum_{n=1}^N\frac{m_n}{2}\frac{\partial\vec{r}_n}{\partial q^k}\cdot\frac{\partial\vec{r}_n}{\partial q^\ell}}_{K_2};$$ with $N$ the number of particles, $m_n$ the mass of the $n$th particle and $\vec{r}_n$ its position. We will assume $V$ is a conservative (so, non-generalised) potential, so it does not depend on these $\dot{q}$s and, thus, $V=V_0$.
It's easy to see, from the definition of $H$ as a Legendre transform of $L$, that $$H = K + V - (2K_0 + K_1),$$ hence, we can write $$\frac{\mathrm{d}E}{\mathrm{d}t} = \frac{\mathrm{d}}{\mathrm{d}t}(E-H)+\frac{\mathrm{d}H}{\mathrm{d}t} = \frac{\mathrm{d}}{\mathrm{d}t}(2K_0 + K_1)-\frac{\partial L}{\partial t}$$ using Hamilton's equations, and using $L = K-V$ we finally arrive at $$\frac{\mathrm{d}E}{\mathrm{d}t} = \frac{\mathrm{d}}{\mathrm{d}t}(2K_0 + K_1)-\frac{\partial K}{\partial t}+\frac{\partial V}{\partial t}\tag{1}.$$
We can also compute this total time-derivative of mechanical energy in a more Newtonian framework, and we find $$\begin{aligned}\frac{\mathrm{d}E}{\mathrm{d}t} & = \frac{\mathrm{d}}{\mathrm{d}t}\left(\frac{1}{2} m\vec{v}^2 + V\right) = m\vec{v}\cdot\vec{a} + \vec{v}\cdot\vec\nabla V + \frac{\partial V}{\partial t} \\ & = \vec{v}\cdot(\underbrace{\vec{F}^\text{consrv} + \vec{F}^\text{constr} + \vec{F}^\text{ncon}}_\text{total force $\vec{F}$}) + \vec{v}\cdot(-\vec{F}^\text{consrv}) + \frac{\partial}{\partial t}V = \dot{W}^\text{ncon} + \frac{\partial V}{\partial t} \end{aligned}\tag{2}$$ assuming only one particle, and defining $\vec{v} = \dot{\vec{r}}$, $\vec{a} = \ddot{\vec{r}}$, because these equations look pretty ugly already without summations and subindices.
The time-dependences of $K$ should come either from external forces that aren't been taking into account or from being in a non-inertial frame of reference, which would give rise to ficticial forces. In any case, comparing Eq. (1) and Eq. (2), I expect the time-derivative of the work done by these forces, $\dot{W}$, to equal $$\frac{\mathrm{d}}{\mathrm{d}t}(2K_0 + K_1)-\frac{\partial K}{\partial t},$$ but manipulating that into something that makes sense is quite difficult. I began by rewriting it as $$\ddot{q}^k\frac{\partial}{\partial\dot{q}^k}T_2 + \dot{q}^k\frac{\partial}{\partial q^k}(2T_0 + T_1) + \frac{\partial}{\partial t}(T_0-T_2),$$ but I get a mess that's difficult to simplify.
I'm asking either for hints on how to simplify it or somehow manifest that those derivatives equal $\dot{W}$, or for someone to point out a flaw in my reasoning that makes all of this meaningless.