Hamilton's Equations Website Links For
Equations
 

Information About

Hamilton's Equations




Hamilton's equations provide a new and equivalent way of looking at classical mechanics. Generally, these equations do not provide a new, more convenient way of solving a particular problem but rather they provide deeper insights into the structure of classical mechanics in general and its connection to quantum mechanics.


DERIVING HAMILTON'S EQUATIONS


We can derive Hamilton's equations by looking at how the Lagrangian changes as you change the time and the positions and velocities of particles.


d L = \sum_i \left ( rac{\partial L}{\partial q_i} d q_i + rac{\partial L}{\partial {\dot q_i}} d {\dot q_i} ight ) + rac{\partial L}{\partial t} dt


Now the generalized momenta were defined as p_i = rac{\partial L}{\partial {\dot q_i}} and Lagrange's equations tell us that

rac{d}{dt} rac{\partial L}{\partial {\dot q_i}} - rac{\partial L}{\partial q_i} = F_i

where F_i is the generalized force. We can rearrange this to get

rac{\partial L}{\partial q_i} = {\dot p}_i - F_i

and substitute the result into the variation of the Lagrangian


d L = \sum_i \left [ \left ( {\dot p}_i - F_i ight ) d q_i + p_i d {\dot q_i} ight ) + rac{\partial L}{\partial t}dt


We can rewrite this as


d L = \sum_i \left [ \left ( {\dot p}_i - F_i ight ) d q_i + d \left ( p_i {\dot q_i} ight ) - {\dot q_i} d p_i ight ) + rac{\partial L}{\partial t}dt


and rearrange again to get


d \left ( \sum_i p_i {\dot q_i} - L ight ) = \sum_i \left [ \left ( F_i-{\dot p}_i ight ) d q_i + {\dot q_i} d p_i ight ) - rac{\partial L}{\partial t}dt


The term on the left-hand side is just the Hamiltonian that we have defined before, so we find that


d H = \sum_i \left [ \left ( F_i-{\dot p}_i ight ) d q_i + {\dot q_i} d p_i ight ) - rac{\partial L}{\partial t}dt = \sum_i \left [ rac{\partial H}{\partial q_i} d q_i +
rac{\partial H}{\partial p_i} d p_i ight ] + rac{\partial H}{\partial t}dt


where the second equality holds because of the defintion of the partial derivatives.


Hamilton's Equations


The result encourages us to think of the Hamiltonian not just a function of coordinates, velocities and time, but alternatively as a function of coordinates, momenta and time. We have


rac{\partial H}{\partial p_i} = {\dot q}_i, rac{\partial H}{\partial q_i} = F_i - {\dot p}_i,
rac{\partial H}{\partial t} = - rac{\partial L}{\partial t}

The first two relativions give 2n first-order differential equations called Hamilton's canonical equations of motion.


USING HAMILTON'S EQUATIONS


1) First write out L = T - V. Express T and V as though you we re going to use Lagrange's equation.

2) Calculate the momenta by differentiating the Lagrangian.

3) Express the velocities in terms of the momenta by inverting the expressions in step (2).

4) Calculate the Hamiltonian using the usual definition

H = \sum_i p_i {\dot q_i} - L

Substitute for the velocities using the results in step (3).

5) Apply Hamilton's equations.


An example


A pendulum of mass m is suspended by a string of length l. Let's use Hamilton's equations to find the equations of motion.

We have

L = rac{1}{2} m l^2 {\dot heta}^2 + m g l \cos heta

so

p_ heta = m l^2 {\dot heta}

and

{\dot heta} = p_ heta / (m l^2).


Now let's calculate the Hamiltonian


H = p_ heta {\dot heta} - L rac{1}{2} m l^2 {\dot heta}^2 - m g l \cos heta
= rac{p_ heta^2}{2 m l^2} + m g l \cos heta


and apply Hamilton's equations. There are no external forces so we have


{\dot p}_ heta = - rac{\partial H}{\partial heta} = -m g l \sin heta,
{\dot heta} = rac{\partial H}{\partial p_ heta} = rac{p_ heta}{m l^2}


Notice how the second relation just gave us back what we already knew from the inversion in the previous step. I could combine these expressions by take the time derivative of the second expression and substituting in the first one. I get a single second order differential equation


{\ddot heta} = - rac{g}{l} \sin heta


that is the same as the one I would have gotten had I used the Lagrange technique. Hey, I never promised that Hamilton's equations would make solving specific problems easier.