# Holonomic constraints

In classical mechanics, holonomic constraints are relations between the position variables (and possibly time) that can be expressed in the following form:
$f(u_{1},u_{2},u_{3},\ldots ,u_{n},t)=0$
where $\{u_{1},u_{2},u_{3},\ldots ,u_{n}\}$ are n generalized coordinates that describe the system (in unconstrained configuration space). For example, the motion of a particle constrained to lie on the surface of a sphere is subject to a holonomic constraint, but if the particle is able to fall off the sphere under the influence of gravity, the constraint becomes non-holonomic. For the first case, the holonomic constraint may be given by the equation
$r^{2}-a^{2}=0$
where $r$ is the distance from the centre of a sphere of radius $a$, whereas the second non-holonomic case may be given by
$r^{2}-a^{2}\geq 0$
Velocity-dependent constraints (also called semi-holonomic constraints) such as
$f(u_{1},u_{2},\ldots ,u_{n},{\dot {u}}_{1},{\dot {u}}_{2},\ldots ,{\dot {u}}_{n},t)=0$
are not usually holonomic.

## Holonomic system

In classical mechanics a system may be defined as holonomic if all constraints of the system are holonomic. For a constraint to be holonomic it must be expressible as a function: $f(u_{1},\ u_{2},\ u_{3},\ \ldots ,\ u_{n},\ t)=0,\,$ i.e. a holonomic constraint depends only on the coordinates $u_{j}$ and maybe time $t$. It does not depend on the velocities or any higher-order derivative with respect to t. A constraint that cannot be expressed in the form shown above is a nonholonomic constraint.

### Introduction

As described above, a holonomic system is (simply speaking) a system in which one can deduce the state of a system by knowing only the change of positions of the components of the system over time, but not needing to know the velocity or in what order the components moved relative to each other. In contrast, a nonholonomic system is often a system where the velocities of the components over time must be known to be able to determine the change of state of the system, or a system where a moving part is not able to be bound to a constraint surface, real or imaginary. Examples of holonomic systems are gantry cranes, pendulums, and robotic arms. Examples of nonholonomic systems are Segways, unicycles, and automobiles.

### Terminology

The configuration space $\mathbf {u}$ lists the displacement of the components of the system, one for each degree of freedom. A system that can be described using a configuration space is called scleronomic.
$\mathbf {u} ={\begin{bmatrix}u_{1}&u_{2}&\ldots &u_{n}\end{bmatrix}}^{\mathrm {T} }$
The event space is identical to the configuration space except for the addition of a variable $t$ to represent the change in the system over time (if needed to describe the system). A system that must be described using an event space, instead of only a configuration space, is called rheonomic. Many systems can be described either scleronomically or rheonomically. For example, the total allowable motion of a pendulum can be described with a scleronomic constraint, but the motion over time of a pendulum must be described with a rheonomic constraint.
$\mathbf {u} ={\begin{bmatrix}u_{1}&u_{2}&\ldots &u_{n}&t\end{bmatrix}}^{\mathrm {T} }$
The state space $\mathbf {q}$ is the configuration space, plus terms describing the velocity of each term in the configuration space.
$\mathbf {q} ={\begin{bmatrix}\mathbf {u} \\\mathbf {\dot {u}} \end{bmatrix}}={\begin{bmatrix}u_{1}&\ldots &u_{n}&{\dot {u}}_{1}&\ldots &{\dot {u}}_{n}\end{bmatrix}}^{\mathrm {T} }$
The state-time space adds time $t$.
$\mathbf {q} ={\begin{bmatrix}\mathbf {u} \\\mathbf {\dot {u}} \end{bmatrix}}={\begin{bmatrix}u_{1}&\ldots &u_{n}&t&{\dot {u}}_{1}&\ldots &{\dot {u}}_{n}\end{bmatrix}}^{\mathrm {T} }$

### Examples
#### Gantry crane

As shown on the right, a gantry crane is an overhead crane that is able to move its hook in 3 axes as indicated by the arrows. Intuitively, we can deduce that the crane should be a holonomic system as, for a given movement of its components, it doesn't matter what order or velocity the components move: as long as the total displacement of each component from a given starting condition is the same, all parts and the system as a whole will end up in the same state. Mathematically we can prove this as such:
We can define the configuration space of the system as: $\mathbf {u} ={\begin{bmatrix}x\\y\\z\end{bmatrix}}$
We can say that the deflection of each component of the crane from its "zero" position are $B$, $G$, and $O$, for the blue, green, and orange components, respectively. The orientation and placement of the coordinate system does not matter in whether a system is holonomic, but in this example the components happen to move parallel to its axes. If the origin of the coordinate system is at the back-bottom-left of the crane, then we can write the position constraint equation as: $(x-B)+(y-G)+(z-(h-O))=0$
Where $h$ is the height of the crane. Optionally, we may simplify to the standard form where all constants are placed after the variables: $x+y+z-(B+G+h-O)=0$
Because we have derived a constraint equation in holonomic form (specifically, our constraint equation has the form $f(x,y,z)=0$ where $\{x,y,z\}\in \mathbf {u}$), we can see that this system must be holonomic.

#### Pendulum

As shown on the right, a simple pendulum is a system composed of a weight and a string. The string is attached at the top end to a pivot and at the bottom end to a weight. Being inextensible, the string’s length is a constant. This system is holonomic because it obeys the holonomic constraint
${x^{2}+y^{2}}-L^{2}=0,$
where $(x,\ y)$ is the position of the weight and $L$ is length of the string.

#### Rigid body

The particles of a rigid body obey the holonomic constraint
$(\mathbf {r} _{i}-\mathbf {r} _{j})^{2}-L_{ij}^{2}=0,\,$
where $\mathbf {r} _{i}$, $\mathbf {r} _{j}$ are respectively the positions of particles $P_{i}$ and $P_{j}$, and $L_{ij}$ is the distance between them. If a given system is holonomic, rigidly attaching additional parts to components of the system in question cannot make it non-holonomic, assuming that the degrees of freedom are not reduced (in other words, assuming the configuration space is unchanged).

### Pfaffian form

Consider the following differential form of a constraint:
$\sum _{j}\ A_{ij}\,du_{j}+A_{i}\,dt=0$
where $A_{ij},A_{i}$ are the coefficients of the differentials $du_{j},dt$ for the ith constraint equation. This form is called the Pfaffian form or the differential form.
If the differential form is integrable, i.e., if there is a function $f_{i}(u_{1},\ u_{2},\ u_{3},\ \ldots ,\ u_{n},\ t)=0$ satisfying the equality
$df_{i}=\sum _{j}\ A_{ij}\,du_{j}+A_{i}\,dt=0$
then this constraint is a holonomic constraint; otherwise, it is nonholonomic. Therefore, all holonomic and some nonholonomic constraints can be expressed using the differential form. Examples of nonholonomic constraints that cannot be expressed this way are those that are dependent on generalized velocities. With a constraint equation in Pfaffian form, whether the constraint is holonomic or nonholonomic depends on whether the Pfaffian form is integrable. See Universal test for holonomic constraints below for a description of a test to verify the integrability (or lack of) of a Pfaffian form constraint.

### Universal test for holonomic constraints

When the constraint equation of a system is written in Pfaffian constraint form, there exists a mathematical test to determine whether the system is holonomic.
For a constraint equation, or $i$ sets of constraint equations (note that variable(s) representing time can be included, as from above $A_{i}\in A_{ij}$ and $\,dt\in du_{j}$ in the following form): $\sum _{j}^{n}\ A_{ij}\,du_{j}=0;\,$
we can use the test equation: $A_{\gamma }\left({\frac {\partial A_{\beta }}{\partial u_{\alpha }}}-{\frac {\partial A_{\alpha }}{\partial u_{\beta }}}\right)+A_{\beta }\left({\frac {\partial A_{\alpha }}{\partial u_{\gamma }}}-{\frac {\partial A_{\gamma }}{\partial u_{\alpha }}}\right)+A_{\alpha }\left({\frac {\partial A_{\gamma }}{\partial u_{\beta }}}-{\frac {\partial A_{\beta }}{\partial u_{\gamma }}}\right)=0$ where $\alpha ,\beta ,\gamma =1,2,3\ldots n$ in (n/3)=n(n−1)(n−2)/6 {\textstyle {\binom {n}{3}}={\frac {n(n-1)(n-2)}{6}}} combinations of test equations per constraint equation, for all $i$ sets of constraint equations.
In other words, a system of three variables would have to be tested once with one test equation with the terms $\alpha ,\beta ,\gamma$ being terms $1,2,3$ in the constraint equation (in any order), but to test a system of four variables the test would have to be performed up to four times with four different test equations, with the terms $\alpha ,\beta ,\gamma$ being terms $1,2,3$, $1,2,4$, $1,3,4$, and $2,3,4$ in the constraint equation (each in any order) in four different tests. For a system of five variables, ten tests would have to be performed on a holonomic system to verify that fact, and for a system of five variables with three sets of constraint equations, thirty tests (assuming a simplification like a change-of-variable could not be performed to reduce that number). For this reason, it is advisable when using this method on systems of more than three variables to use common sense as to whether the system in question is holonomic, and only pursue testing if the system likely is not. Additionally, it is likewise best to use mathematical intuition to try to predict which test would fail first and begin with that one, skipping tests at first that seem likely to succeed.
If every test equation is true for the entire set of combinations for all constraint equations, the system is holonomic. If it is untrue for even one test combination, the system is nonholonomic.

#### Example

Consider this dynamical system described by a constraint equation in Pfaffian form. $\cos(\theta )dx+\sin(\theta )dy+\left[y\cos(\theta )-x\sin(\theta )\right]d\theta =0$
The configuration space, by inspection, is $\mathbf {u} ={\begin{bmatrix}x&y&\theta \end{bmatrix}}^{\mathrm {T} }$. Because there are only three terms in the configuration space, there will be only one test equation needed. We can organize the terms of the constraint equation as such, in preparation for substitution: $A_{\alpha }=\cos \theta$ $A_{\beta }=\sin \theta$ $A_{\gamma }=y\cos \theta -x\sin \theta$ $u_{\alpha }=dx$ $u_{\beta }=dy$ $u_{\gamma }=d\theta$
Substituting the terms, our test equation becomes: $\left(y\cos \theta -x\sin \theta \right)\left[{\frac {\partial }{\partial x}}\sin \theta -{\frac {\partial }{\partial y}}\cos \theta \right]+\sin \theta \left[{\frac {\partial }{\partial \theta }}\cos \theta -{\frac {\partial }{\partial x}}(y\cos \theta -x\sin \theta )\right]+\cos \theta \left[{\frac {\partial }{\partial y}}(y\cos \theta -x\sin \theta )-{\frac {\partial }{\partial \theta }}\sin \theta \right]=0$
After calculating all partial derivatives, we get: $(y\cos \theta -x\sin \theta )\left[0-0\right]+\sin \theta \left[-\sin \theta -(-\sin \theta )\right]+\cos \theta \left[\cos \theta -\cos \theta \right]=0$
Simplifying, we find that: $0=0$ We see that our test equation is true, and thus, the system must be holonomic.
We have finished our test, but now knowing that the system is holonomic, we may wish to find the holonomic constraint equation. We can attempt to find it by integrating each term of the Pfaffian form and attempting to unify them into one equation, as such: $\int \cos \theta \,dx=x\cos \theta +f(y,\theta )$ $\int \sin \theta \,dy=y\sin \theta +f(x,\theta )$ $\int \left(y\cos \theta -x\sin \theta \right)d\theta =y\sin \theta +x\cos \theta +f(x,y)$
It's easy to see that we can combine the results of our integrations to find the holonomic constraint equation: $y\sin \theta +x\cos \theta +C=0$ where C is the constant of integration.

#### Constraints of constant coefficients

For a given Pfaffian constraint where every coefficient of every differential is a constant, in other words, a constraint in the form: $\sum _{j}\ A_{ij}\,du_{j}+A_{i}\,dt=0;\;\{A_{ij},A_{i};\,j=1,2,\ldots ;\,i=1,2,\ldots \}\in \mathbb {R}$
the constraint must be holonomic.
We may prove this as follows: consider a system of constraints in Pfaffian form where every coefficient of every differential is a constant, as described directly above. To test whether this system of constraints is holonomic, we use the universal test. We can see that in the test equation, there are three terms that must sum to zero. Therefore, if each of those three terms in every possible test equation are each zero, then all test equations are true and this the system is holonomic. Each term of each test equation is in the form: $A_{3}\left({\frac {\partial A_{2}}{\partial u_{1}}}-{\frac {\partial A_{1}}{\partial u_{2}}}\right)$ where:
* $A_{1}$, $A_{2}$, and $A_{3}$ are some combination (with (n/3)=n(n−1)(n−2)/6{\textstyle {\binom {n}{3}}=n(n-1)(n-2)/6} total combinations) of $A_{ij};\,j=1,2,\ldots$ and $A_{i}$ for a given constraint $i$.
* $u_{1}$, $u_{2}$, and $u_{3}$ are the corresponding combination of $u_{j};\,j=1,2,\ldots$ and $dt$.
Additionally, there are $i$ sets of test equations.
We can see that, by definition, all $A_{n}$ are constants. It is well-known in calculus that any derivative (full or partial) of any constant is $0$. Hence, we can reduce each partial derivative to: $A_{3}{\big0-0{\big )}$
and hence each term is zero, the left side each test equation is zero, each test equation is true, and the system is holonomic.

#### Configuration spaces of two or one variable

Any system that can be described by a Pfaffian constraint and has a configuration space or state space of only two variables or one variable is holonomic.
We may prove this as such: consider a dynamical system with a configuration space or state space described as: $\mathbf {u} ={\begin{bmatrix}u_{1}&u_{2}\end{bmatrix}}^{\mathrm {T} }$
if the system is described by a state space, we simply say that $u_{2}$ equals our time variable $t$. This system will be described in Pfaffian form: $A_{i1}\,du_{1}+A_{i2}\,du_{2}=0$
with $i$ sets of constraints. The system will be tested by using the universal test. However, the universal test requires three variables in the configuration or state space. To accommodate this, we simply add a dummy variable $\lambda$ to the configuration or state space to form: $\mathbf {u} ={\begin{bmatrix}u_{1}&u_{2}&\lambda \end{bmatrix}}^{\mathrm {T} }$
Because the dummy variable $\lambda$ is by definition not a measure of anything in the system, its coefficient in the Pfaffian form must be $0$. Thus we revise our Pfaffian form: $A_{i1}\,du_{1}+A_{i2}\,du_{2}+0\,d\lambda =0$
Now we may use the test as such, for a given constraint $i$ if there are a set of constraints: $0\left({\frac {\partial A_{i2}}{\partial u_{1}}}-{\frac {\partial A_{i1}}{\partial u_{2}}}\right)+A_{i2}\left({\frac {\partial A_{i1}}{\partial \lambda }}-{\frac {\partial }{\partial u_{1}}}0\right)+A_{i1}\left({\frac {\partial }{\partial u_{2}}}0-{\frac {\partial A_{i2}}{\partial \lambda }}\right)=0$
Upon realizing that :${\frac {\partial }{\partial \lambda }}f(u_{1},u_{2})=0$ because the dummy variable $\lambda$ cannot appear in the coefficients used to describe the system, we see that the test equation must be true for all sets of constraint equations and thus the system must be holonomic. A similar proof can be conducted with one actual variable in the configuration or state space and two dummy variables to confirm that one-degree-of-freedom systems describable in Pfaffian form are also always holonomic.
In conclusion, we realize that even though it is possible to model nonholonomic systems in Pfaffian form, any system modellable in Pfaffian form with two or fewer degrees of freedom (the number of degrees of freedom is equal to the number of terms in the configuration space) must be holonomic.
Important note: realize that the test equation failed because the dummy variable, and hence the dummy differential included in the test, will differentiate anything that is a function of the actual configuration or state space variables to $0$. Having a system with a configuration or state space of: $\mathbf {u} ={\begin{bmatrix}u_{1}&u_{2}&u_{3}\end{bmatrix}}^{\mathrm {T} }$
and a set of constraints where one or more constraints are in the Pfaffian form: $A_{i1}du_{1}+A_{i2}du_{2}+0du_{3}=0$
does not guarantee the system is holonomic, as even though one differential has a coefficient of $0$, there are still three degrees of freedom described in the configuration or state space.

### Transformation to independent generalized coordinates

The holonomic constraint equations can help us easily remove some of the dependent variables in our system. For example, if we want to remove $x_{d}$, which is a parameter in the constraint equation $f_{i}$, we can rearrange the equation into the following form, assuming it can be done,
$x_{d}=g_{i}(x_{1},\ x_{2},\ x_{3},\ \dots ,\ x_{d-1},\ x_{d+1},\ \dots ,\ x_{N},\ t),\,$
and replace the $x_{d}$ in every equation of the system using the above function. This can always be done for general physical systems, provided that the derivative of $f_{i}$ is continuous, then by the implicit function theorem, the solution $g_{i}$, is guaranteed in some open set. Thus, it is possible to remove all occurrences of the dependent variable $x_{d}$.
Suppose that a physical system has $N$ degrees of freedom. Now, $h$ holonomic constraints are imposed on the system. Then, the number of degrees of freedom is reduced to $m=N-h$. We can use $m$ independent generalized coordinates ($q_{j}$) to completely describe the motion of the system. The transformation equation can be expressed as follows:
$x_{i}=x_{i}(q_{1},\ q_{2},\ \ldots ,\ q_{m},\ t)\ ,\qquad i=1,\ 2,\ \ldots N.\,$

### Classification of physical systems

In order to study classical physics rigorously and methodically, we need to classify systems. Based on previous discussion, we can classify physical systems into holonomic systems and non-holonomic systems. One of the conditions for the applicability of many theorems and equations is that the system must be a holonomic system. For example, if a physical system is a holonomic system and a monogenic system, then Hamilton's principle is the necessary and sufficient condition for the correctness of Lagrange's equation.