section_path: Relation to other formulations of classical physics/Hamiltonian
section_name: Hamiltonian
paragraph_text: Hamiltonian
  
  In Hamiltonian mechanics, the dynamics of a system are represented by a function called the Hamiltonian, which in many cases of interest is equal to the total energy of the system. The Hamiltonian is a function of the positions and the momenta of all the bodies making up the system, and it may also depend explicitly upon time. The time derivatives of the position and momentum variables are given by partial derivatives of the Hamiltonian, via Hamilton's equations. The simplest example is a point mass m {\displaystyle m} constrained to move in a straight line, under the effect of a potential. Writing q {\displaystyle q} for the position coordinate and p {\displaystyle p} for the body's momentum, the Hamiltonian is H (p, q) = p 2 2 m + V (q). {\displaystyle {\mathcal {H}}(p,q)={\frac {p^{2}}{2m}}+V(q).} In this example, Hamilton's equations are d q d t = ∂ H ∂ p {\displaystyle {\frac {dq}{dt}}={\frac {\partial {\mathcal {H}}}{\partial p}}} and d p d t = − ∂ H ∂ q. {\displaystyle {\frac {dp}{dt}}=-{\frac {\partial {\mathcal {H}}}{\partial q}}.} Evaluating these partial derivatives, the former equation becomes d q d t = p m, {\displaystyle {\frac {dq}{dt}}={\frac {p}{m}},} which reproduces the familiar statement that a body's momentum is the product of its mass and velocity. The time derivative of the momentum is d p d t = − d V d q, {\displaystyle {\frac {dp}{dt}}=-{\frac {dV}{dq}},} which, upon identifying the negative derivative of the potential with the force, is just Newton's second law once again.
  
  As in the Lagrangian formulation, in Hamiltonian mechanics the conservation of momentum can be derived using Noether's theorem, making Newton's third law an idea that is deduced rather than assumed.
  
  Among the proposals to reform the standard introductory-physics curriculum is one that teaches the concept of energy before that of force, essentially "introductory Hamiltonian mechanics".