## 1.10.1 Coordinate Constraints

In the previous section, we showed that for motion of a system with the constraint $\varphi(t, q(t), Dq(t)) = 0$, for stationary action, the path variations, $\eta(t)$, must be tangent to the constraint surface. And in order for the variation to be tangent to the constraint at a given time, it must satisfy the condition:

Now consider constraints that are only functions of the coordinates, i.e,

Now the variation is tangent to the constraint if

We also know from Eq. 1.183 in the previous section that,

Eq. 1.186 and 1.183 together should determine the motion of the constrained system.

Eq 1.183 is satisfied if the dot product of the first term (aka the residual of Lagranges Equations) and $\eta(t)$ is zero at all times. This is also the definition for two functions of time to be orthogonal to each other. To quote footnote 92 from the book:

We take two tuple-valued functions of time to be orthogonal if at each instant the dot product of the tuples is zero. Similarly, tuple-valued functions are considered parallel if at each moment one of the tuples is a scalar multiple of the other. The scalar multiplier is in general a function of time.

So the residual of the Lagrange equations is orthogonal to any $\eta(t)$. Also, $\eta(t)$ is tangent to the constraint surface, which means that it is orthogonal to the normal to the constraint surface.

A vector that is orthogonal to all vectors orthogonal to a given vector is parallel to the given vector.

Therefore, the residual of Lagrange equations is parallel to the normal to the constraint surface; which means the two functions are proportional:

The proportionality factor $\lambda$ is itself a function of time and need not be a constant. This equation, along with the constraint equation $\varphi \circ \Gamma[q] = 0$ is enough to determine the path $q$ and to eliminate the unknown function $\lambda$.

We can now form an augmented Lagrangian by treating $\lambda$ as one of the coordinates.

The Lagrange equations associated with the coordinates are just the modified Lagrangian in Eq. 1.187. The equation assoicated with $\lambda$ is just the constraint equation. So the system is fully specified. This Lagrangian is also of the same form as the one described in Section 1.6.2.

### How do we eliminate $\lambda$ from the Lagrange Equations?

If the new function $\lambda$, can be written as a composition of a local tuple function over the original, *unaugmented* path: $\lambda = \Lambda \circ \Gamma[q]$, then it is a redundant degree of freedom and can be eliminated from the system if required.

Consider the Lagrangian with an extra term $\Lambda\varphi$ where $\varphi$ is the constraint function:

The Lagrange equations for $L’‘$ is the same as that for $L$ but with some extra terms arising from $\Lambda\varphi$. Applying the Euler-Lagrange operator to $L’’$:

Composing $\mathscr{E}[L]$ with $\Lambda[q]$ results in the Lagrange equations for $L’’$. Since the constraints are satisfied on the path, $\varphi \circ \Gamma[q] = 0$, which implies that $D_t(\Lambda \circ \Gamma[q]) = 0$.

Therefore, composing $\mathscr{E}[L]$ with $\Lambda[q]$, we get:

$\partial_2\varphi = 0$ as the constraints do not depend on velocity. Then,

We can see here that the Lagrange equations for $L’‘$ is the same as that for $L’$, with an extra term. Comparing this to Eq. 1.187, we can see that $\lambda = \Lambda \circ \Gamma[q]$, which is determined purely by the unaugmented state. Therefore $\lambda$ can be eliminated from the Lagrange equations of the augmented Lagrangian.

The explicit Lagrange equations derived from the augmented Lagrangian depend on the accelerations $D^2 q$ as well as $\lambda$. Now that $\lambda$ has been showed to be derived purely form the unaugmented state, so too is $D^2 q$ (as there are no other elements in the dynamic equations). Therefore the dynamic evolution of the system is determined purely by the dynamical state.

### The Pendulum using Constraints

$$\require{cancel}$$

**Figure 1.8**

The pendulum can be modeled as a point-mass constrained to always be at a constant distance from a pivot point. The system can be represented by the following Lagrangian and constraint:

The augmented Lagrangian is:

The Lagrange equations for this augmented Lagrangian is:

These equations can be simplified by switching to polar coordinates, $x = r\sin{\theta}$ and $y = -r\cos{\theta}$. Substituting this in the constraint equation, we get, $r = l$. Plugging this into the equations 1.196 and 1.197:

Multiply Eq. 1.200 by $\cos\theta$ and Eq. 1.201 by $\sin{\theta}$ and add to get:

This is indeed the same equation as what we get if we used $\theta$ as an unconstrained generalized coordinate for the pendulum. We can also compute $\lambda$ in terms of the other variables from Eq.1.196 as:

This further confirms what we showed in the previous section, that $\lambda$ really is the composition function of the local state of the path. Also, to be noted here is the $2l\lambda$ is a force – the sum of the outward component of gravity and the centrifugal force. This is the tension in the pendulum rod. It is effectively the force that is constraining the mass to stay at a constant distance from the pivot.

### Building systems from parts

**Figure 1.9: A compound spring-mass system is decomposed into two subsystems.**

We can analyze compound systems using augmented Lagrangians to enforce constraints between the individual parts. Consider the compound spring-mass system at the top of Figure 1.9. One way to analyze this is as a single system with two coordinates $x_1$ and $x_2$ to represent the extension of the springs from their equilibrium lengths of $X_1$ and $X_2$.

An alternative procedure would be to break it into two parts – one being the spring-mass attached to the wall, and the other being the second spring-mass system with its attachment point specified by an additional coordinate $\xi$ (which may have its own velocity). The Lagrangian for each part can be written separately. The Lagrangian of the combined system is the sum of the two component Lagrangians along with a constraint $\xi = X_1 + x_1$ to ensure that the two systems are attached.

So the Lagrangian for the part attached to the wall is:

and the Lagrangian for the part that attaches to it is:

Combining the two Lagrangians with the contact constraint, we get:

The Lagrange’s equations for the system are:

For eliminating $\xi$ and $\lambda$, substitute Eq. 1.210 into Eq. 1.209,

Substituting for $\lambda$ in Eq. 1.207,

Substituting for $\xi$ in Eq. 1.208,

Equations 1.211 and 1.212 are the equations of motion for the compound system. This is a general strategy that can be used to create a library of primitive components.

Each component may be characterized by a Lagrangian with additional degrees of freedom for the terminals where that component may be attached to others. We then can construct composite Lagrangians by combining components, using constraints to glue together the terminals.