Concepts and formulas

Lagrangian and Hamiltonian mechanics

Constraints

Imposing constraints on a system is simply another way of stating that there are forces present in the problem that cannot be specified directly, but are known in term of their effect on the motion of the system.  Holonomic constraints are constraints of the form
fm(r1,r2,r3,...,rn,t) = 0,   m = 1, 2, 3, ... , k.
They reduce the number of degrees of freedom of the system;  k equations of constraints reduce the number of the degree of freedom of an n-particle system from 3n to 3n - k, if the constraints are holonomic.
If the constraints are holonomic, then the forces of constraints do no virtual work.
Consider a virtual displacement of the system, i.e. an infinitesimal change in the coordinates of the system, denoted by dri, consistent with the constraints imposed on the system at a given instant t.  The work done by the force in the virtual displacement dri is called the virtual work.  For holonomic constraints, the forces of constraints are perpendicular to the virtual displacements and do no virtual work.


Generalized coordinates

Any set of independent quantities q1, q2, ... , qs, which completely define the position of the system with s degrees of freedom, are called generalized coordinates of the system, and the derivatives  are called generalized velocities.
Examples:

The generalized coordinates q1, ... , qs can be expressed in terms of the Cartesian coordinates the system.
q1 = q1(r1, r2, ... , rn ), ... , qn-m(r1, r2, ... , rn ).
These equations, together with the equation of constraints, can be inverted to find the r's in terms of the q's.


Lagrangian Mechanics

Assume a system has n independent generalized coordinates {qi}.  Assume that the generalized applied forces
{Qj} = {∑iFi·ri/∂qj}
are given by
Qj = -∂U/∂qj  or  -∂U/∂qj + d/dt(∂U/∂(dqi/dt)),
with U some scalar function, i.e. the generalized applied forces are derivable from a potential.  Then the equations of motion may be obtained from Lagrange's equations,

d/dt(∂L/∂(dqi/dt)) -  ∂L/∂qi = 0,

where L = T - U is the Lagrangian of the system.  L is a function of the coordinates qi and the velocities dqi/dt.

Example of a velocity dependent potential

If not all the forces acting on the system are derivable from a potential, then Lagrange's equations can be written in the form

d/dt(∂L/∂(dqi/dt)) -  ∂L/∂qi = Qj,

where L contains the potential of the conservative forces and Qj represents the generalized forces not arising from a potential.

Link:  Derive Lagrange's equations from D'Alembert's Principle

Define the generalized momentum or conjugate momentum or canonical momentum through
∂L/∂(dqi/dt) = pi.
If the Lagrangian does not contain a given coordinate qj then the coordinate is said to be cyclic and the corresponding conjugate momentum pj is conserved.

The Hamiltonian H of a system is given by

H(q, p, t) = ∑i(dqi/dt)pi - L.  

H is a function of the generalized coordinates and momenta of the system.  The equations of motion can be obtained from Hamilton's equations,

dqi/dt = ∂H/∂pi,  dpi/dt = -∂H/∂qi.

Assume now that the generalized forces are given by Qj = -∂U/∂qj.


Coupled small oscillations

Let L = ½∑ij[Tij(dqi/dt)(dqj/dt) - kijqiqj]  with Tij = Tji,  kij = kji

Then solutions of the form qj = Re(Ajeiωt) can be found.
We can find the ω2 from det(kij - ω2Tij) = 0. 
For a system with n degrees of freedom, n characteristic frequencies ωα can be found. 
Some frequencies may be degenerate.
For a particular frequency ωα we solve

j[kij - ωα2Tij]A = 0

to find the A.  

[While the secular equation det(kij2Tij) = 0 can in principle always be solved, it is often simpler to find the normal modes by using physical insight and noting the symmetries of the system.]

The most general solution for each coordinate qj is a sum of simple harmonic oscillations in all of the frequencies ωα.

qj = Re∑α(CαAexp(iωαt)).