## 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$ is 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).

References:

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