Hamilton Function

The especial elegance in the classical description of a mass point motion can be reached by using the Hamilton function H(p,q) for generalized impulse coordinate p and position coordinate q. When we have the simplest case then the Hamilton function is the sum of kinetic and potential energies: H(p,q) = Ekin(p)+V(q). The motion equations are then as follows:

dq/dt = ∂H/∂p

dp/dt = − ∂H/∂q

We would like to explain it using the "Harmonic Oscillator" example:
The potential is given by V(x) = ½ kx² with the strength constant k and deviation x. The total energy E is E = Ekin + V(x). Since Ekin = ½mv² and p = mv Þ Ekin = p²/2mÞ E = p²/2m + ½ kx². For the linear deviation x there will be just q = x (for pendulum q would be deviation angle) and p is the impulse coordinate:

H = p²/2m + ½kx²

Now we can write down the following equation for the impulse change in time (2. Hamilton equation):

dp/dt = -¶H/∂x = − kx

and for the coordinate change in time (1. Hamilton equation):

dx/dt = ∂H/∂p = p/m

Or:
d²x/dt² = (dp/dt)/m
and finally for dp/dt:
d²x/dt² = (dp/dt)/m = −(k/m)x

The solution: x = A · sin wt with w = (k/m)½
it follows: p = A m w · cos wt

This is a well-known vibration equation.