## Hamilton's Equations

Hamilton's equations are an alternative to the Euler-Lagrange equations to find the equations of motion of a system. They are applied to the Hamiltonian function of the system. Hamilton's equations are

$\dot{q_i} = \frac{\partial H}{\partial p_i}$

$\dot{p_i} = -\frac{\partial H}{\partial q_i}$

$\frac{\partial L}{\partial t} = -\frac{\partial H}{\partial t}$

Where H is the Hamiltonian, $q_i$ are the generalized coordinates, $p_i$ are the generalized momenta, and a dot represents the total time derivative.

The Hamiltonian can be found by performing a Legendre transformation on the Lagrangian of the system:

$H = \dot{q_i}p_i - L(q,\dot{q},t)$

where the Einstein summation notation is used, a dot represents the total time derivative, qi are the generalized coordinates, pi are the generalized momenta.

These momenta are found by differentiating the Lagrangian with respect to the generalized velocities $\dot{q_i}$. Mathematically

$p_i = \frac{\partial L}{\partial \dot{q_i}}$.

In some cases, H = T + V, the total energy of the system. There are two conditions for this. First, the equations defining the generalized coordinates q don't depend on time explicitly. Second, the forces involved in the system are derivable from a scalar potential. The forces must be conservative (such as gravity).[1]

References:

1. Goldstein, Poole, Safko. Classical Mechanics 3rd ed. 2002