physics2u
Depth
PU-201 / L07 · lecture

Constraints and Lagrange Multipliers

~7 min read · Tier toggle changes depth (T1 plain · T2 standard · T3 rigour)

BEFORE YOU START

You should be comfortable deriving the Euler-Lagrange equations from the principle of stationary action and understand how generalized coordinates reduce the degrees of freedom in a mechanical system.

Why this matters

Lagrange multipliers allow us to calculate constraint forces without guessing their direction or magnitude.

In standard Lagrangian mechanics, we typically choose coordinates that automatically satisfy constraints, such as using an angle for a pendulum instead of Cartesian coordinates. While this simplifies the equations of motion, it hides the forces exerted by the constraints, such as the tension in the pendulum string or the normal force on a surface. In many engineering and physics problems, these constraint forces are the primary quantity of interest. The method of Lagrange multipliers provides a systematic way to retain the full set of Cartesian coordinates, impose the constraints algebraically, and solve for both the motion and the unknown constraint forces simultaneously.

The Idea in Plain Language

Imagine a bead sliding on a frictionless wire. The wire exerts a force on the bead to keep it on the path, but we do not know the magnitude or direction of this force at any given moment. In Newtonian mechanics, we would have to guess the force vector and solve a complex system of equations. In the Lagrangian approach, we treat the constraint as a mathematical condition that the position must satisfy. We introduce a new variable, the multiplier, which acts like a "price tag" for violating the constraint. By adding this term to the equations of motion, we effectively let the mathematics determine the exact force required to keep the system on the constraint surface. The multiplier itself is directly proportional to the constraint force, allowing us to extract it after solving the equations.

Formulating the Problem

Consider a system with \( n \) degrees of freedom described by generalized coordinates \( q_1, \dots, q_n \). Suppose there are \( m \) independent holonomic constraints, expressed as functions \( f_\alpha(q, t) = 0 \) for \( \alpha = 1, \dots, m \). The standard Lagrangian \( L = T - V \) describes the dynamics if the system were free. However, the actual motion is restricted to the submanifold defined by the constraints.

To incorporate these restrictions, we modify the action principle. Instead of requiring the action \( S = \int L \, dt \) to be stationary, we require the augmented action \( S^* \) to be stationary, where we add the constraints multiplied by time-dependent functions \( \lambda_\alpha(t) \):

\[ S^* = \int_{t_1}^{t_2} \left( L(q, \dot{q}, t) + \sum_{\alpha=1}^{m} \lambda_\alpha(t) f_\alpha(q, t) \right) dt \]

The functions \( \lambda_\alpha(t) \) are the Lagrange multipliers. They are not known a priori; they are determined by the equations of motion along with the coordinates \( q_i(t) \).

Deriving the Equations of Motion

We apply the Euler-Lagrange equation to the augmented Lagrangian \( L^* = L + \sum_{\alpha} \lambda_\alpha f_\alpha \). The variation with respect to the coordinates \( q_i \) yields:

\[ \frac{d}{dt} \left( \frac{\partial L^*}{\partial \dot{q}_i} \right) - \frac{\partial L^*}{\partial q_i} = 0 \]

Since \( \lambda_\alpha \) does not depend on \( \dot{q}_i \), the first term is simply \( \frac{d}{dt} \left( \frac{\partial L}{\partial \dot{q}_i} \right) \). The second term splits into the partial derivative of \( L \) and the partial derivative of the constraint term:

\[ \frac{d}{dt} \left( \frac{\partial L}{\partial \dot{q}_i} \right) - \frac{\partial L}{\partial q_i} = \sum_{\alpha=1}^{m} \lambda_\alpha(t) \frac{\partial f_\alpha}{\partial q_i} \]

The left-hand side is the standard Euler-Lagrange expression for the free system. The right-hand side represents the generalized forces of constraint, denoted \( Q_i^c \). Thus, the equation of motion becomes:

\[ \frac{d}{dt} \left( \frac{\partial L}{\partial \dot{q}_i} \right) - \frac{\partial L}{\partial q_i} = Q_i^c = \sum_{\alpha=1}^{m} \lambda_\alpha(t) \frac{\partial f_\alpha}{\partial q_i} \]

In addition to these \( n \) equations, we must satisfy the \( m \) constraint equations \( f_\alpha(q, t) = 0 \). This gives a total of \( n + m \) equations for the \( n + m \) unknowns \( q_i(t) \) and \( \lambda_\alpha(t) \).

Interpreting the Multipliers as Forces

The physical interpretation of \( \lambda_\alpha \) depends on the choice of coordinates. If the coordinates \( q_i \) are Cartesian coordinates \( x, y, z \), the generalized force \( Q_i^c \) is simply the component of the constraint force vector \( \mathbf{F}^c \) in the \( i \)-th direction.

For a single constraint \( f(x, y, z, t) = 0 \), the constraint force is normal to the surface defined by \( f = 0 \). The gradient \( \nabla f \) points in the direction of the steepest increase of \( f \), which is perpendicular to the surface. The equation for the force components is:

\[ F_a^c = \lambda \frac{\partial f}{\partial q_a} \quad \text{for } a = x, y, z \]

This can be written in vector form as:

\[ \mathbf{F}^c = \lambda \nabla f \]

Here, \( \lambda \) scales the gradient vector to provide the correct magnitude of the force. If the constraint is a rigid rod of length \( l \) attached to the origin, \( f = x^2 + y^2 + z^2 - l^2 = 0 \). Then \( \nabla f = 2x \mathbf{i} + 2y \mathbf{j} + 2z \mathbf{k} = 2\mathbf{r} \). The force is \( \mathbf{F}^c = 2\lambda \mathbf{r} \), which is directed radially, as expected for a central constraint force.

The derivation

◆ DERIVATION EMBED · D-127 · not re-derived here

Constraint Forces via Lagrange Multipliers

For a system whose configuration coordinates q1,…,qn are subject to m independent holonomic constraints fα(q,t)=0, adjoining each constraint to Lagrange's equations with an undetermined multiplier λα(t) gives the unreduced equations of motion, and the adjoined terms Qic=Σαλα ∂fα/∂qi are exactly the generalized forces of constraint that would otherwise have to be supplied by hand.

Qic = Σα=1m λα(t)  ∂fα/∂qi    ( in Cartesian:  Fac = Σα λα ∇afα )
Open full derivation →
Tier 3 · watch out

The sign of the Lagrange multiplier \( \lambda \) is arbitrary and depends on the definition of the constraint function \( f \). If you write the same constraint as \( -f = 0 \) instead of \( f = 0 \) (for example \( l^2 - r^2 = 0 \) instead of \( r^2 - l^2 = 0 \)), \( \lambda \) changes sign, but the physical force \( \mathbf{F}^c = \lambda \nabla f \) is unchanged. Always check the direction of \( \nabla f \) to ensure the force points in the physically correct direction (e.g., tension pulling inward vs. normal force pushing outward). C

Worked example

Problem. A particle of mass \( m \) moves in the \( xy \)-plane under the influence of a uniform gravitational field \( \mathbf{g} = -g \mathbf{j} \). It is constrained to move along a straight line defined by \( y = x \). Find the equations of motion and the constraint force components \( F_x^c \) and \( F_y^c \).

  1. Define the Lagrangian for the free particle: \( L = T - V = \frac{1}{2}m(\dot{x}^2 + \dot{y}^2) - (-mgy) = \frac{1}{2}m(\dot{x}^2 + \dot{y}^2) + mgy \).
  2. Identify the constraint: \( f(x, y) = y - x = 0 \). Calculate the partial derivatives: \( \frac{\partial f}{\partial x} = -1 \), \( \frac{\partial f}{\partial y} = 1 \).
  3. Write the augmented equations of motion. For \( x \): \( m\ddot{x} = \lambda \frac{\partial f}{\partial x} = -\lambda \). For \( y \): \( m\ddot{y} + mg = \lambda \frac{\partial f}{\partial y} = \lambda \).
  4. Use the constraint \( y = x \) to imply \( \ddot{y} = \ddot{x} \). Substitute \( \ddot{y} \) with \( \ddot{x} \) in the \( y \)-equation: \( m\ddot{x} + mg = \lambda \).
  5. Solve the system for \( \lambda \) and \( \ddot{x} \). From the \( x \)-equation, \( \lambda = -m\ddot{x} \). Substitute into the modified \( y \)-equation: \( m\ddot{x} + mg = -m\ddot{x} \). This gives \( 2m\ddot{x} = -mg \), so \( \ddot{x} = -g/2 \). Consequently, \( \ddot{y} = -g/2 \).
  6. Determine \( \lambda \): \( \lambda = -m(-g/2) = mg/2 \).
  7. Calculate the constraint forces: \( F_x^c = -\lambda = -mg/2 \) and \( F_y^c = \lambda = mg/2 \).
\[ \mathbf{F}^c = -\frac{mg}{2} \mathbf{i} + \frac{mg}{2} \mathbf{j} \]

Units check. \( m \) is in kg, \( g \) is in \( \mathrm{m/s^2} \). The product \( mg \) is in \( \mathrm{kg \cdot m/s^2} = \mathrm{N} \). The result is a force, which is dimensionally consistent.

CHECK YOURSELF

Three quick tests

  1. What is the physical meaning of the Lagrange multiplier \( \lambda \) when using Cartesian coordinates?
    AnswerIt is the scalar magnitude that scales the gradient of the constraint function to give the constraint force vector.
  2. If the constraint is \( f(x,y) = x^2 + y^2 - R^2 = 0 \), what is the direction of the constraint force?
    AnswerRadial, along the vector \( \nabla f = 2x\mathbf{i} + 2y\mathbf{j} \), which points from the origin to the particle.
  3. How many equations are needed to solve for the motion and constraint forces of a system with \( n \) coordinates and \( m \) constraints?
    Answer\( n + m \) equations: \( n \) Euler-Lagrange equations and \( m \) constraint equations.
PROBLEMS

Problem set for PU-201 →

Each derivation in this unit ends with five graded problems with full solutions.

NOTES

Lecture notes drafted with a local model and checked line by line by the editor; every number in the worked example was recomputed.

Derivations cited: D-127 · Threads: force, energy, symmetry