Advanced Classical Mechanics/Constraints and Lagrange's Equations

There is more to classical mechanics than $$F=ma$$. Often the motion of a system is constrained in some way.

What are constraints?

 * 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.

$$ f\left (\vec r_1,\vec r_2, \vec r_3, \cdots, t \right ) = 0 $$

This is called a holonomic constraint. For example we could have

$$ \left ( \vec r_i - \vec r_j \right )^2 - c_{ij}^2 = 0 $$

which expresses that the distances between two particles that make up a rigid body are fixed.

$$r^2 - a^2 \geq 0$$ for a particle travelling outside the surface of a sphere or constraints that depend on velocities as well,
 * There are non-holonomic constraints.  For example, one could have

$$ f\left (\vec r_1,\vec r_2, \vec r_3, \cdots, \vec v_1,\vec v_2, \vec v_3, \cdots , t \right ) = 0. $$

A familar example of the latter is a ball rolling on a surface.

We will be dealing exclusively with holonomic constraints in this course.

What are the consequences?

 * The coordinates are no longer independent. They are related through the equations of constraint.
 * The force of constraint are not given so they must be determined from the solution (if you actually want them at all).
 * If the constraints are holonomic, the equations of constraint can be used to eliminate some of the coordinates to get a set of generalized independent coordinates.

These generalized coordinates usually will not fall into pairs or triples that transform as vectors, e.g. the natural coordinates for motion restricted to a sphere are spherical coordinates ($$\theta,\phi$$).

D'Alembert's Principle
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 $$\delta \vec r_i$$. The virtual displacement must be consistent with the constraints.

For each particle we have

$$ \vec F_i = \dot \vec p_i ~\rm{so}~ \vec F - \dot \vec p_i= 0 $$

and summing over the particles we have

$$ \sum_i \left ( \vec F_i - \dot \vec p_i \right ) \cdot \delta \vec r_i = 0. $$

Let's divide the force on each particle into applied forces and constraints

$$ \vec F_i = \vec F_i^{(a)} + \vec f_i $$

so we have

$$ \sum_i \left ( \vec F_i - \dot \vec p_i \right ) \cdot \delta \vec r_i = \sum_i \left ( \vec F_i^{(a)} - \dot \vec p_i \right ) \cdot \delta \vec r_i + \sum_i \vec f_i \cdot \delta \vec r_i= 0. $$

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

$$ \sum_i \left ( \vec F_i^{(a)} - \dot \vec p_i \right ) \cdot \delta \vec r_i = 0, $$

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.

Generalized Coordinates
We can try to find a set of independent coordinates given the constraints. Let's write

$$ \vec r_i = \vec r_i \left ( q_1, q_2, q_3, \cdots, t \right ) $$

and so

$$ \vec v_i = \frac{d \vec r_i}{d t} = \sum_k \frac{\partial \vec r_i}{\partial q_k} \dot q_k + \frac{\partial \vec r_i}{\partial t} $$

and a virtual displacement is

$$ \delta \vec r_i = \sum_j \frac{\partial \vec r_i}{\partial q_j} \delta q_j. $$

Notice that there is no $$dt$$ in the virtual displacement because time is held fixed. Now let's look at the first term in D'Alembert's equation

$$ \sum_i \vec F_i \cdot \delta \vec r_i = \sum_i \vec F_i \cdot  \left ( \sum_j \frac{\partial \vec r_i}{\partial q_j} \delta q_j \right ) =  \sum_j \left ( \sum_i \vec F_i \cdot  \frac{\partial \vec r_i}{\partial q_j} \right )  \delta q_j = \sum_j Q_j \delta q_j $$

where $$Q_j$$ is called a generalized force.

The second term takes a bit more work. We have

$$ \sum_i \dot \vec p_i \cdot \delta \vec r_i = \sum_i m_i \ddot \vec r_i  \cdot \delta \vec r_i = \sum_i m_i \ddot \vec r_i \left ( \sum_j \frac{\partial \vec r_i}{\partial q_j} \delta q_j \right ). $$

Let's focus on a particular one of the generalized coordinates j. We have

$$ \sum_i m_i \ddot \vec r_i \cdot \frac{\partial \vec r_i}{\partial q_j} = \sum_i \left [ \frac{d}{dt} \left ( m_i \dot \vec r_i \cdot \frac{\partial \vec r_i}{\partial q_j} \right ) - m_i \dot \vec r_i \cdot \frac{d}{dt} \left ( \frac{\partial \vec r_i}{\partial q_j} \right ) \right ] $$

$$= \sum_i \left [ \frac{d}{dt} \left ( m_i \vec v_i \cdot \frac{\partial \vec r_i}{\partial q_j} \right ) - m_i \dot \vec r_i \cdot \frac{\partial \vec v_i}{\partial q_j}  \right ] $$

We can use the fact that

$$ \frac{\partial \vec v_i}{\partial \dot q_j} = \frac{\partial \vec r_i}{\partial q_k} $$

from the defintion of $$\vec v_i$$ to get

$$= \sum_i \left [ \frac{d}{dt} \left ( m_i \vec v_i \cdot \frac{\partial \vec v_i}{\partial \dot q_j} \right ) - m_i \dot \vec r_i \cdot \frac{\partial \vec v_i}{\partial q_j}  \right ] $$

$$= \frac{d}{dt} \left [ \frac{\partial}{\partial \dot q_j} \sum_i \left ( \frac{1}{2} m_i v_i^2 \right ) \right ] - \frac{\partial}{\partial q_j} \left [ \sum_i \left ( \frac{1}{2} m_i v_i^2 \right ) \right ]. $$

Notice that the quantity in the innermost parenthesis is just the total kinetic energy of the system $$T$$ so we have

$$ \sum_j \left \{ \left [ \frac{d}{dt} \left ( \frac{\partial T}{\partial \dot q_j} \right ) - \frac{\partial T}{\partial q_j} \right ] - Q_j \right \} \delta q_j = 0. $$

Lagrange's Equations
If the constraints are holonomic, we can pick the $$q_j$$ to be independent so the various $$\delta q_j$$ are completely arbitrary and the quantity in braces must vanish to yield

$$ \left [ \frac{d}{dt} \left ( \frac{\partial T}{\partial \dot q_j} \right ) - \frac{\partial T}{\partial q_j} \right ] = Q_j. $$

These expressions are sometimes called Lagrange's equations, but the term Lagrange's equations is often reserved for the case of a conservative force. In this case we have

$$ \vec F_i = - \vec \nabla_i V $$ so

$$ Q_j = \sum_i \vec F_i \cdot \frac{\partial \vec r_i}{\partial q_j} = - \sum_i \vec \nabla_i V\cdot \frac{\partial \vec r_i}{\partial q_j} = - \frac{\partial V}{\partial q_j} $$

In this case we can rearrange the equation to give

$$ \left [ \frac{d}{dt} \left ( \frac{\partial T}{\partial \dot q_j} \right ) - \frac{\partial (T-V)}{\partial q_j} \right ] = 0. $$

Furthermore, if the forces do not depend explicitly on the velocities we can define, the Lagrangian to be $$ L = T - V $$

and write Lagrange's equations in their traditional form

$$ \left [ \frac{d}{dt} \left ( \frac{\partial L}{\partial \dot q_j} \right ) - \frac{\partial L}{\partial q_j} \right ] = 0. $$

Conserved Quantities
For each coordinate we can define a conjugate momentum to be

$$ p_i = \frac{\partial L}{\partial {\dot q}_i}. $$

This is called the generalized momentum conjugate to the coordinate $$q_i$$. Let's look at Lagrange's equations with this definition

$$ \frac{d p_i}{dt} = \frac{\partial L}{\partial q_i} $$

so if the Lagrangian does not depend on a particular coordinate $$q_i$$, 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 $$\partial L/\partial t$$ vanishes? Is there a conserved quantity similar to the momenta?

Let calculate the total derivative of the Lagrangian with respect to time,

$$ \frac{d L}{d t} = \sum_i \left [ \frac{\partial L}{\partial q_i} {\dot q}_i + \frac{\partial L}{\partial {\dot q}_i} {\ddot q}_i \right ] + \frac{\partial L}{\partial t}. $$

Now let's use the definition of the momenta and the Lagrange's equation to simplify things a bit,

$$ \frac{d L}{d t} = \sum_i \left [ \frac{d p_i}{d t} {\dot q}_i + p_i {\ddot q}_i \right ] + \frac{\partial L}{\partial t}  = \sum_i \frac{d ( p_i {\dot q}_i )}{d t}  + \frac{\partial L}{\partial t} $$

and rearranging

$$ \frac{\partial L}{\partial t} = \frac{d}{dt} \left ( L - \sum_i p_i {\dot q}_i \right ).$$

So if

$$ \partial L/\partial t = 0 $$

then the Hamiltonian,

$$ H = L - \sum_i p_i {\dot q}_i, $$

is conserved.

Lagrangians with Non-Conservative Forces
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 $$V$$). 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 $$d/dt (\partial L/\partial {\dot q})$$ 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.

$$ \vec F = q \left( \vec E + \vec v \times \vec B \right ). $$

In electrostatics the electric field is simply the gradient of the electrostatic potential, but for more general fields we have

$$ \vec E = -\vec \nabla \phi - \frac{\partial \vec A}{\partial t} $$

where $$\vec A$$ is the vector potential. The magnetic field may be written as

$$ \vec B = \vec \nabla \times \vec A. $$

Let's consider the function

$$ V = q \phi \left (\vec r, t\right )- q {\dot \vec r} \cdot \vec A \left (\vec r, t \right ) $$

and calculate

$$ \frac{d}{dt} \left ( \frac{\partial V}{\partial {\dot x}} \right ) - \frac{\partial V}{\partial x} = - q \frac{d A_x}{d t} - q \frac{\partial \phi}{\partial x} + q \left ( \dot x \frac{\partial A_x}{\partial x} + \dot y \frac{\partial A_y}{\partial x} + \dot z \frac{\partial A_z}{\partial x} \right ). $$

The total time derivative of the vector potential generates several terms (due to the chain rule) to yield

$$ \frac{d}{dt} \left ( \frac{\partial V}{\partial {\dot x}} \right ) - \frac{\partial V}{\partial x} = - q \left ( \frac{\partial A_x}{\partial t} + \dot x \frac{\partial A_x}{\partial x} + \dot y \frac{\partial A_x}{\partial y} + \dot z \frac{\partial A_x}{\partial z} \right ) - q \frac{\partial \phi}{\partial x} + q \left ( \dot x \frac{\partial A_x}{\partial x} + \dot y \frac{\partial A_y}{\partial x} + \dot z \frac{\partial A_z}{\partial x} \right ). $$

Notice that the terms proportional to $$\dot x$$ cancel leaving

$$ \frac{d}{dt} \left ( \frac{\partial V}{\partial {\dot x}} \right ) - \frac{\partial V}{\partial x} = - q \left ( \frac{\partial \phi}{\partial x} + \frac{\partial A_x}{\partial t} \right ) + q \left [ \dot y \left ( \frac{\partial A_x}{\partial y} - \frac{\partial A_y}{\partial x} \right ) + \dot z \left ( \frac{\partial A_x}{\partial z} - \frac{\partial A_z}{\partial x} \right )   \right ]. $$

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 $$\vec v \times \vec B$$, so the following Lagrangian will yield the equations of motion

$$ L = \frac{1}{2} m {\dot r}^2 + q \vec \dot r \cdot \vec A \left (\vec r, t\right ) - q \phi \left ( \vec r, t \right ). $$

If the vector potential and the scalar potential do not depend on time, then $$\partial L/\partial t = 0$$ and

$$ H = \frac{\partial L}{\partial \dot \vec r} \cdot \dot \vec r - L = \frac{1}{2} m {\dot r}^2 + q \phi \left ( \vec r, t \right ) $$

is conserved. The force is not conservative but the system is.