Lagrangian Mechanics: Generalized Coordinates And Forces

Learning Lab
My Journey Through Books, Discoveries, and Ideas

Lagrangian mechanics: generalized coordinates and forces

In this blog post, I introduce an alternative approach to classical mechanics: the Lagrangian method. This method provides a different perspective compared to Newton’s \mathbf F = m\mathbf a and often simplifies problem-solving, especially for systems with constraints. I focus here on the initial concepts: constraints, generalized coordinates, virtual displacements, and generalized forces.

Constraints and degrees of freedom

Consider a system of N particles. Without any restrictions, 3N coordinates are needed to specify the system’s configuration (3 coordinates per particle). However, systems often have constraints. Holonomic constraints are restrictions on the positions of the particles (and possibly time) that can be expressed as equations:

f_k(\mathbf r_1, \mathbf r_2, \ldots, \mathbf r_N, t) = 0

If there are k such independent holonomic constraints, they reduce the number of independent coordinates required to describe the system. The minimum number of coordinates needed is the number of degrees of freedom, n:

n = 3N - k

These n independent coordinates are called generalized coordinates, denoted as q_1, \ldots, q_n. They might be lengths, angles, or other parameters suitable for the system. The original Cartesian coordinates \mathbf r_i can be expressed as functions of these generalized coordinates and possibly time:

\mathbf r_i = \mathbf r_i(q_1, \ldots, q_n, t)

Virtual displacements

A virtual displacement, \delta \mathbf r_i, represents an infinitesimal change in the position of particle i that is consistent with the constraints, assuming time is held fixed. It can be expressed in terms of infinitesimal changes in the generalized coordinates, \delta q_j:

\delta \mathbf r_i = \sum_{j=1}^n \frac{\partial \mathbf r_i}{\partial q_j} \delta q_j

This concept is central to eliminating forces of constraint.

D’Alembert’s principle

Newton’s second law for particle i is m_i \mathbf a_i = \mathbf F_i + \mathbf F_{i, \text{constraint}}, where \mathbf F_i represents applied forces and \mathbf F_{i, \text{constraint}} represents constraint forces. D’Alembert rearranged this as (\mathbf F_i - m_i \mathbf a_i) + \mathbf F_{i, \text{constraint}} = 0.

The key insight is that for any virtual displacement \delta \mathbf r_i compatible with the constraints, the work done by the ideal constraint forces is zero:

\mathbf F_{i, \text{constraint}} \cdot \delta \mathbf r_i = 0

This is because ideal constraint forces are perpendicular to the allowed motion (the virtual displacement). Taking the scalar product with \delta \mathbf r_i and summing over all particles i leads to d’Alembert’s principle:

\sum_{i=1}^N (\mathbf F_i - m_i \mathbf a_i) \cdot \delta \mathbf r_i = 0

This principle effectively eliminates the need to explicitly calculate constraint forces when deriving the equations of motion.

Generalized forces

Let’s examine the work done by the applied forces \mathbf F_i during a virtual displacement:

\delta W = \sum_{i=1}^N \mathbf F_i \cdot \delta \mathbf r_i

Substituting the expression for \delta \mathbf r_i:

\delta W = \sum_{i=1}^N \mathbf F_i \cdot \left( \sum_{j=1}^n \frac{\partial \mathbf r_i}{\partial q_j} \delta q_j \right) = \sum_{j=1}^n \left( \sum_{i=1}^N \mathbf F_i \cdot \frac{\partial \mathbf r_i}{\partial q_j} \right) \delta q_j

This naturally leads to the definition of the generalized force Q_j corresponding to the generalized coordinate q_j:

Q_j = \sum_{i=1}^N \mathbf F_i \cdot \frac{\partial \mathbf r_i}{\partial q_j}

The generalized force Q_j represents the effective contribution of the applied forces towards changing the coordinate q_j. The virtual work can then be written compactly as:

\delta W = \sum_{j=1}^n Q_j \delta q_j

These concepts—generalized coordinates, virtual displacements, d’Alembert’s principle, and generalized forces—form the setup for deriving Lagrange’s equations.

For more insights into this topic, you can find the details here.