Hamiltonian mechanics requires a phase space QxP, and a function H:RxQxP --> R
A system has a dynamic state, which has the time, the configuration, and the momenta. Hamiltonian mechanics is formulated in terms of the dynamic state.
If we express the energy in terms of t,Q,P we have the Hamiltonian. A Hamiltonian is an example of an H-function: an H-function takes 2 vector arguments and a scalar argument (t, Q, P). It produces a scalar result.
If we express the energy in terms of t,Q,P we have the Hamiltonian
To do this we need to invert P(t, Q, Qdot) to get Qdot(t, Q, P). This is easy when L is a quadratic form in Qdot:
Fortunately this is the case in almost all of Newtonian mechanics, otherwise the P(t,Q,Qdot) function would be much more difficult to invert to obtain Qdot(t,Q,P).
Assume that F is quadratic in its arguments F(u) = 1/2 A u u + b u + c then v = A u + b, so u = A^(-1) (v - b)
Notice that Lagrangians and Hamiltonians are symmetrical with respect to the Legendre transform.
Makes a canonical point transformation from a time-invariant coordinate transformation T(q)
This is used in conjunction with a symplectic test for the C to establish that a time-dependent transformation is canonical.
To compute the K (addition to the Hamiltonian) from a time-dependent coordinate transformation F.
Time-Varying code
Originally from time-varying.scm.
One particularly useful canonical transform is the Poincare transform, which is good for simplifying oscillators.
Symplectic
Originally from symplectic.scm.
Without matrices