# When Hamiltonian and the total energy are the same

In which condition, the Hamiltonian is the same as the total energy of the system, or say $H=T+V$?

-
OP's question(v1) asks precisely the opposite of this Phys.SE question. – Qmechanic Oct 31 '12 at 17:54

The Hamiltonian in a conservative system describes the total internal energy of the system.

The formula $H=T+V$ with the traditional form of the kinetic energy is valid for a frictionless nonrelativistic system in Cartesian coordinates, possibly with external forces.

-

The Hamiltonian is a constant of the motion as long as it is independent of time. More deeply that means that the Lagrangian it comes from must be independent of time.

A constant Hamiltonian is the total energy if the potential is velocity independent.

-
But $H=T+V$ also holds for a forced harmonic oscillator, where $H$ is not a constant of the motion. – Arnold Neumaier Nov 1 '12 at 14:09

By definition, the Hamiltonian is always related to the total energy of the system via $\langle E \rangle = \mathrm{Tr}\{ H \rho \}$. But depending on what do you mean by $T$ and $V$ you equation may or may not be general.

-

The hamiltonian is the mechanical energy of the system when the equations defining the generalized coordinates do not include explicitly the time and all the forces that do work can be derived from a conservative potential (Goldstein 8.1)

-