The particles could be restricted to travel along a curve or surface. Specifically one could have some function of the coordinates of each particle and time vanish. These restrictions are either kinematical or geometrical in nature.
This is called a holonomic constraint. For example we could have
which expresses that the distances between two particles that make up a rigid body are fixed.
There are non-holonomic constraints. For example, one could have
for a particle travelling outside the surface of a sphere or constraints that depend on velocities as well,
A familar example of the latter is a ball rolling on a surface.
We will be dealing exclusively with holonomic constraints in this course.
D'Alembert's principle relies on the concept of virtual displacements. The idea is that you can imagine freezing the system in time and jiggling each of the particles in a way consistent with the various constraints at that particular time and determine the work (virtual work) needed to perform these virtual displacements.
We will denote the virtual displacement of a particle as
The virtual displacement must be consistent with the constraints.
For each particle we have
and summing over the particles we have
Let's divide the force on each particle into applied forces and constraints
so we have
If we assume that the forces of constraint do no virtual work, then the last term vanishes. This is a reasonable assumption because the force of constraint to restrict a particle to a surface is normal to that surface but a displacement consistent with the constraints is tangent to the surface so the dot product will vanish and the force of constraint performs no virtual work. If the constraints are a function of time, the forces of constraint can perform work on the particles but the whole idea of D'Alembert's principle is that we have frozen time.
This leaves us with
D'Alembert's principle. The forces of constraints are gone! However, the coordinates are not independent, so the equation is only a statement about the sum of the various forces, momenta and virtual displacements.
For each coordinate we can define a conjugate momentum to be
This is called the generalized momentum conjugate to the coordinate . Let's look at Lagrange's equations with this definition
so if the Lagrangian does not depend on a particular coordinate , then the momentum conjugate to the coordinate does not change with time; it is conserved. This conserved momentum is called a first integral. The coordinate that doesn't affect the Lagrangian is called a cyclic coordinate.
In general the Lagrangian will depend on the coordinates, velocities and time; what happens if vanishes? Is there a conserved quantity similar to the momenta?
Let calculate the total derivative of the Lagrangian with respect to time,
Now let's use the definition of the momenta and the Lagrange's equation to simplify things a bit,
From the analysis so far it would appear that one can only construct a Lagrangian when the forces that act on a particle are conservative (they can be derived from a potential ). It is indeed the case that truly dissipative forces such as friction cannot be directly included in a Lagrangian formulation, but forces that can be written in the form may be included in the Lagrangian. Although this seems very restrictive, an important force of this class is the magnetic force on a charged particle.
In electrostatics the electric field is simply the gradient of the electrostatic potential, but for more general fields we have
where is the vector potential. The magnetic field may be written as
Let's consider the function
The total time derivative of the vector potential generates several terms (due to the chain rule) to yield
Notice that the terms proportional to cancel leaving
The first term is simply the charge of the particle times the x-component of the electric field. The second term is the charge of the particles times the x-component of , so the following Lagrangian will yield the equations of motion
If the vector potential and the scalar potential do not depend on time, then and
is conserved. The force is not conservative but the system is.