# Hamiltonian mechanics

Classical mechanics $\vec{F} = \frac{\mathrm{d}}{\mathrm{d}t}(m \vec{v})$
Newton's Second Law
History of ...

Hamiltonian mechanics is a reformulation of classical mechanics that was introduced in 1833 by Irish mathematician William Rowan Hamilton. It arose from Lagrangian mechanics, a previous reformulation of classical mechanics introduced by Joseph Louis Lagrange in 1788, but can be formulated without recourse to Lagrangian mechanics using symplectic spaces (see Mathematical formalism, below). The Hamiltonian method differs from the Lagrangian method in that instead of expressing second-order differential constraints on an n-dimensional coordinate space (where n is the number of degrees of freedom of the system), it expresses first-order constraints on a 2n-dimensional phase space.

As with Lagrangian mechanics, Hamilton's equations provide a new and equivalent way of looking at classical mechanics. Generally, these equations do not provide a more convenient way of solving a particular problem. Rather, they provide deeper insights into both the general structure of classical mechanics and its connection to quantum mechanics as understood through Hamiltonian mechanics, as well as its connection to other areas of science.

## Simplified overview of uses

For a closed system the sum of the kinetic and potential energy in the system is represented by a set of differential equations known as the Hamilton equations for that system. Hamiltonians can be used to describe such simple systems as a bouncing ball, a pendulum or an oscillating spring in which energy changes from kinetic to potential and back again over time. Hamiltonians can also be employed to model the energy of other more complex dynamic systems such as planetary orbits in celestial mechanics and also in quantum mechanics.

The Hamilton equations are generally written as follows: $\dot p = -\frac{\partial \mathcal{H}}{\partial q}$ $\dot q =~~\frac{\partial \mathcal{H}}{\partial p}$

In the above equations, the dot denotes the ordinary derivative with respect to time of the functions p = p(t) (called generalized momenta) and q = q(t) (called generalized coordinates), taking values in some vector space, and $\mathcal{H}$ = $\mathcal{H}(p,q,t)$ is the so-called Hamiltonian, or (scalar valued) Hamiltonian function. Thus, a little more explicitly, one can equivalently write $\frac{\mathrm d}{\mathrm dt}p(t) = -\frac{\partial}{\partial q}\mathcal{H}(p(t),q(t),t)$ $\frac{\mathrm d}{\mathrm dt}q(t) =~~\frac{\partial}{\partial p}\mathcal{H}(p(t),q(t),t)$

and specify the domain of values in which the parameter t ("time") varies.

For a detailed derivation of these equations from Lagrangian mechanics, see below.

### Basic physical interpretation

The simplest interpretation of the Hamilton Equations is as follows, applying them to a one-dimensional system consisting of one particle of mass m under time independent boundary conditions and exhibiting conservation of energy: The Hamiltonian $\mathcal{H}$ represents the energy of the system, which is the sum of kinetic and potential energy, traditionally denoted T & V, respectively. Here q is the x-coordinate and p is the momentum, mv. Then $\mathcal{H} = T + V , \quad T = \frac{p^2}{2m} , \quad V = V(q) = V(x).$

Note that T is a function of p alone, while V is a function of x (or q) alone.

Now the time-derivative of the momentum p equals the Newtonian force, and so here the first Hamilton Equation means that the force on the particle equals the rate at which it loses potential energy with respect to changes in x, its location. (Force equals the negative gradient of potential energy.)

The time-derivative of q here means the velocity: the second Hamilton Equation here means that the particle’s velocity equals the derivative of its kinetic energy with respect to its momentum. (For the derivative with respect to p of p2/2m equals p/m = mv/m = v.)

### Using Hamilton's equations

1. First write out the Lagrangian L = TV. Express T and V as though you were going to use Lagrange's equation.
2. Calculate the momenta by differentiating the Lagrangian with respect to velocity.
3. Express the velocities in terms of the momenta by inverting the expressions in step (2).
4. Calculate the Hamiltonian using the usual definition, $\mathcal{H} = \sum_i p_i {\dot q_i} - \mathcal{L}$. Substitute for the velocities using the results in step (3).
5. Apply Hamilton's equations.