# Energy conservation Hamiltonian dependency [duplicate]

Suppose the a system has a Hamiltonian $H = H(q,p)$, and suppose $H$ does not depend explicitly on time. If $H\neq E$ the total energy of the system, does this necessarily say that $E$ is not conserved? Why?

• This question has no general answer. Just from $H\neq E$ you cannot conclude that $E$ is not conserved. It depends on you particular system whether or not any expression that's not the Hamiltonian will be conserved. – ACuriousMind Jan 22 '16 at 2:04
• Possible duplicate of Example where Hamiltonian $H \neq T+V=E$, but $E=T+V$ is conserved. Specifically, the answer at that question provides a counter example. – jacob1729 Nov 6 '19 at 19:57

• That is not correct. Consider the Lagrangian $L = \frac{1}{2}mR^2\left(\dot\theta^2 + \omega^2\sin^2\theta\right) - \frac{1}{2}k\left(L^2+R^2 - 2LR\cos\theta\right)$. It describes the motion of a mass on a ring, connected by a spring, and its Hamiltonian is independent in time, but is not the total energy. – JonTrav1 Jan 22 '16 at 8:11