1 Introduction

In an example of a skate moving on a frictionless surface, Hamel pointed out that when a nonholonomic constraint is embedded directly into the kinetic energy of an unconstrained mechanical system, the resultant equations of motion obtained using this kinetic energy do not lead to the correct equations of motion of the constrained system [1]. The example is meant to caution mechanicians against the substitution of nonholonomic constraints directly into the kinetic energy of an unconstrained system when trying to obtain the equation of motion for the constrained mechanical system. Hamel gave no reasons why such an innocuous looking substitution of the constraint—for after all, the constraint is to be satisfied by the system at every instant of time—should lead one to the wrong equations of motion for the constrained system. One should note that, as in Hamel’s example, even after the embedding of the constraint in the kinetic energy of the unconstrained system, the coordinates may still not be independent of one another so that even after the embedding is done one would still need to treat the problem as a problem of constrained motion, and would be obliged to use methods such as the Lagrange multiplier method (or, say, the fundamental equation of Udwadia and Kalaba [2] to obtain the appropriate equations of motion when using the embedded kinetic energy.

Following Hamel, Rosenberg in his book [3] considered several examples and set forth the following conjecture related to constrained mechanical systems that can be summarized as follows:

While embedding holonomic constraints in the kinetic energy (or Lagrangian) expression of an unconstrained mechanical system will yield the correct equations of motion of the constrained mechanical system after a proper application of Lagrange’s method to obtain the equations of motion, embedding nonholonomic constraints in the kinetic energy (or Lagrangian) in a similar fashion will yield, in general, incorrect equations of motion [3].

Udwadia and Wanichanon in considering the Hamel Paradox pointed out that the reason why this happens is because of an incorrect conceptualization of constrained motion [4]. They pointed out that the general problem of constrained motion in analytical dynamics requires conceptualization in the following three successive steps:

  1. 1.

    description of the unconstrained system in which all the coordinates are assumed to be independent of one another.

  2. 2.

    description of the constraints, and,

  3. 3.

    description of the constrained system through the use of the fundamental equation of constrained motion (see [2, 5,6,7,8] for theoretical development and [9,10,11,12,13,14] for applications).

Recently, Schutte and Udwadia [15] have shown the usefulness of this three-step conceptualization by using it as a basis for developing a new approach for modeling complex multi-body mechanical systems.

The general procedure and the fundamental equation obtained in Refs. [2, 5,6,7,8] are valid for sets of constraints that may include holonomic and/or nonholonomic constraints. These constraints (a) may be functionally dependent, (b) may be nonlinear in the generalized velocities, and (3) may explicitly depend on time.

They pointed out that when this conceptualization is followed systematically, one is ensured to obtain the correct equations of motion for a constrained mechanical system. They showed that embedding nonholonomic constraints in the expression for the kinetic energy of the unconstrained system disregards the three-step procedure outlined above. It conflates the unconstrained system with the constraints and the constrained system, and this causes the resultant equations of motion obtained to be, in general, incorrect.

They also pointed out that were the constraints to be all holonomic, then such an embedding of the constraints in the Lagrangian of the unconstrained system would be permissible. The reason for this is that a holonomically constrained system can always be transformed to an unconstrained system using a suitable transformation of coordinates; and this transformation can always be obtained from the independent holonomic constraints [16, 17]. Thus, replacing one of the generalized coordinates in terms of the others—completely embedding (see, Sect. 3 below for meaning of completely) an holonomic constraint in the Lagrangian of the unconstrained system—will simply describe the same holonomically constrained system but with one less dynamical (time varying) coordinate and one less independent constraint. For a constrained system with just one holonomic constraint, embedding the holonomic constraint in the Lagragian will simply yield the correct Lagrangian for an equivalent unconstrained system. Application of Lagrange’s formalism using this embedded Lagrangian will then yield the correct equations of motion for the constrained system.

In addition to solving Hamel’s example in extension, Ref. [4] showed several examples to illustrate these results. The approach used in them is the following. A single constraint is considered and embedded in the Lagrangian of the unconstrained system. After embedding the constraint this Lagrangian is used to obtain the equation of motion of the system utilizing Lagrange’s formalism. This result is then compared with that obtained using the fundamental equation, which gives the correct equation of motion of the constrained system. In the case of a single holonomic constraint, the general result stated earlier, namely, that the complete embedding of the constraint in the Lagrangian is equivalent to simply a change in coordinates that now produces an equivalent Lagrangian for the system that is unconstrained, was pointed out. This Lagrangian then results in the correct equations upon proper use of Lagrange’s formalism. In short, they found that such an embedding is permissible and would yield the correct equations of motion of the holonomically constrained system.

In the case of nonholonomic constraints, we cannot proceed with such a coordinate transformation. In other words, embedding the constraints in the Lagrangian cannot convert the system to an unconstrained system [16, 17], and they showed that the resultant Lagrangian, in general, does not correspond to either that of the constrained system or to that of the unconstrained system. The three-step procedure stated earlier having been ignored, causes the constrained system, the constraints, and the unconstrained systems to get conceptually conflated with one another. Upon using Lagrange’s formalism, the equations of motion obtained from this embedded Lagrangian consequently differ from the correct equations obtained using the fundamental equation.

A recent paper by Chen [18], gave the general equations of motion obtained after one embeds a set of independent Pffafian constraints in the kinetic energy of an unconstrained mechanical system. This was done by substituting the constraints in the expression for the kinetic energy of the unconstrained system and then directly using Lagrange’s equations in an effort to obtain the equations of motion of the constrained system. Thus, the paper aimed at formalizing the Hamel embedding method when the constraints are independent and linear in the generalized velocities (Pffafian). These equations were then compared with the correct equations obtained using the fundamental equation, which is referred to as the Udwadia–Kalaba equation in Ref. [18]. Whether the equations of motion from the embedded Lagrangian are correct (i.e., agree with what is obtained using the Udwadia–Kalaba equation) was established by using a set of examples. On the basis of the examples, by comparing the equation of motion obtained from the formalized Hamel embedding method with that obtained from the Udwadia–Kalaba equation, the paper concluded that embedding holonomic constraints in the Lagrangian, would, in general, yield incorrect equations of motion for a holonomically constrained mechanical system. This result is contrary to that of Ref. [4] and also to the conjecture given in Ref. [3].

Since both Refs. [4, 18] agree that use of the embedded Lagrangian will lead to incorrect equations of motion of the constrained system when the constraints are nonholonomic, it will be sufficient for us to begin by investigating first the situation in which the constraints are holonomic. Later, we consider the embedded Hamel equations given in Ref. [18] for nonholonomic constraints.

2 On embedding holonomic constraints in the Lagrangian of the unconstrained system

The main result in Ref. [18] hinges on the use of two examples of a holonomically constrained system, in which it is shown that the result from the embedded Hamel method is not the same as that obtained using the Udwadia–Kalaba equation. Hence it is claimed that for holonomically constrained systems, the embedded Lagrangian yields, in general, the incorrect equations of motion. We therefore revisit these same two examples in this section.

The two examples considered in Ref. [18] deal with a single particle of mass m subjected to no ‘given’ forces. The particle moves in 3-dimensional space and its position is given by (x, y, z) in an inertial Cartesian frame of reference. The kinetic energy of the unconstrained particle is given by

$$ T = \frac{1}{2}m(\dot{x}^{2} + \dot{y}^{2} + \dot{z}^{2} ). $$
(1)

Example 1

(Case (ii) in Ref. [18]) The unconstrained particle described above whose kinetic energy is given by relation (1) is subjected to the holonomic constraint

$$ xy = r(t),\;\;{\text{or,}}\;\;\;y = \frac{r(t)}{x},\quad \, x \ne 0. $$
(2)

Differentiating (2) yields, assuming that \(x \ne 0\), the relation

$$ \dot{y} = - \frac{y}{x}\dot{x} + \frac{{\dot{r}}}{x} = - \frac{r}{{x^{2} }}\dot{x} + \frac{{\dot{r}}}{x} $$
(3)

where we have used relation (2) in the second equality. Substituting for \(\dot{y}\) in Eq. (1) we get the so-called embedded kinetic energy as

$$ T^{\dag } = \frac{1}{2}m\left( {\dot{x}^{2} + \frac{{r^{2} }}{{x^{4} }}\dot{x}^{2} - 2\frac{{r\dot{r}}}{{x^{3} }}\dot{x} + \frac{{\dot{r}^{2} }}{{x^{2} }} + \dot{z}^{2} } \right). $$
(4)

We shall see in what follows that this gives an equivalent (and correct) description of the kinetic energy of the constrained particle, except that in this description the coordinates x and z are independent and the virtual displacements \(\delta x\) and \(\delta z\) can be chosen independently. Since these two coordinates are independent of each other, using this kinetic energy \(T^{\dag }\), the equations of motion by Lagrange’s formalism are

$$ \frac{{\text{d}}}{{{\text{d}}t}}\left( {\frac{{\partial \,T^{\dag } }}{{\partial \,\dot{x}}}} \right) - \frac{{\partial \,T^{\dag } }}{\partial \,x} = 0 $$
(5)

and

$$ \frac{{\text{d}}}{{{\text{d}}t}}\left( {\frac{{\partial \,T^{\dag } }}{{\partial \,\dot{z}}}} \right) - \frac{{\partial \,T^{\dag } }}{\partial \,z} = 0. $$
(6)

Since

$$ \frac{{\partial \,T^{\dag } }}{{\partial \,\dot{x}}} = m\left[ {\dot{x} + \frac{{r^{2} }}{{x^{4} }}\dot{x} - \frac{{r\dot{r}}}{{x^{3} }}} \right],\quad {\text{and}}\quad \frac{{\partial \,T^{\dag } }}{{\partial \,\dot{z}}} = m\dot{z} $$
(7)

we have

$$ \frac{{\text{d}}}{{{\text{d}}t}}\left( {\frac{{\partial \,T^{\dag } }}{{\partial \,\dot{x}}}} \right) = m\left[ {\left( {1 + \frac{{r^{2} }}{{x^{4} }}} \right)\ddot{x} + 5\frac{{r\dot{r}}}{{x^{4} }}\dot{x} - 4\frac{{r^{2} }}{{x^{5} }}\dot{x}^{2} - \frac{{\dot{r}^{2} }}{{x^{3} }} - \frac{{r\ddot{r}}}{{x^{3} }}} \right],\quad {\text{and}}\quad \frac{{\text{d}}}{{{\text{d}}t}}\left( {\frac{{\partial \,T^{\dag } }}{{\partial \,\dot{z}}}} \right) = m\ddot{z}. $$
(8)

We also get from relation (4)

$$ \frac{{\partial \,T^{\dag } }}{\partial \,x} = m\left[ { - 2\frac{{r^{2} }}{{x^{5} }}\dot{x}^{2} + 3\frac{{r\dot{r}}}{{x^{4} }}\dot{x} - \frac{{\dot{r}^{2} }}{{x^{3} }}} \right],\quad {\text{and}}\quad \frac{{\partial \,T^{\dag } }}{\partial \,z} = 0. $$
(9)

Using relations (8) and (9) in Eqs. (5) and (6), the equations of motion that the embedded kinetic energy \(T^{\dag }\) yields are

$$ m\left( {1 + \frac{{r^{2} }}{{x^{4} }}} \right)\ddot{x} = \frac{mr}{{x^{3} }}\left( { - \frac{{2\dot{r}\dot{x}}}{x} + \frac{{2r\dot{x}^{2} }}{{x^{2} }} + \ddot{r}} \right),\;\;\;{\text{and}}\;\;\;m\ddot{z} = 0. $$
(10)

The result obtained in Eq. (10) is the same as the result obtained using the Udwadia–Kalaba equation (Eq. (4.39) in Ref. [18]), and these equations are the correct equations of motion of the constrained particle.

The crucial observation is that the coordinate transformation (2) has converted the constrained holonomic system to an equivalent unconstrained system whose kinetic energy is correctly given by \(T^{\dag }\) in Eq. (4). The equivalent system is unconstrained since the coordinates x and z can now be chosen in (4) independently. Such a coordinate transformation is guaranteed to exist when any system has only one holonomic constraint [16, 17]. One simply uses the constraint equation to eliminate one of the variables, thereby obtaining an expression for the kinetic energy in which all the coordinates are (locally) independent.

Example 2

(Case (iii) in Ref. [18]): The particle described before whose unconstrained kinetic energy is given by Eq. (1) is now subjected to the holonomic constraint

$$ x^{2} + y^{2} = \rho^{2} . $$
(11)

Differentiating Eq. (11) with respect to time gives

$$ \dot{y} = \frac{{\rho \dot{\rho } - x\dot{x}}}{y}, \, y \ne 0 $$
(12)

so that

$$ \dot{y}^{2} = \frac{{(\rho \dot{\rho } - x\dot{x})^{2} }}{{y^{2} }} = \frac{{(\rho \dot{\rho } - x\dot{x})^{2} }}{{\rho^{2} - x^{2} }}. $$
(13)

The last equality above follows from Eq. (11). Eliminating \(\dot{y}\) from the expression of the kinetic energy of the unconstrained system yields the correct kinetic energy

$$ T^{\dag } = \frac{1}{2}m\left( {\dot{x}^{2} + \frac{{(\rho \dot{\rho } - x\dot{x})^{2} }}{{\rho^{2} - x^{2} }} + \dot{z}^{2} } \right) $$
(14)

of the constrained particle except that now the coordinates x and z are (locally) independent. Here again, the transformation (12) (i.e., the constraint) allows the variable y to be eliminated, so that the correct kinetic energy of the constrained system is (locally) obtained. Since the coordinates x and z are independent, the Lagrange’s formalism yields the equations of motion given by (5) and (6).

From (14) we get

$$ \frac{{\partial \,T^{\dag } }}{{\partial \,\dot{x}}} = m\left[ {\dot{x} + \frac{{x(x\dot{x} - \rho \dot{\rho })}}{{\rho^{2} - x^{2} }}} \right],\quad {\text{and}}\quad \frac{{\partial \,T^{\dag } }}{{\partial \,\dot{z}}} = m\dot{z} $$
(15)

so that

$$ \frac{d}{dt}\left( {\frac{{\partial \,T^{\dag } }}{{\partial \,\dot{x}}}} \right) = m\left[ {\left( {1 + \frac{{x^{2} }}{{\rho^{2} - x^{2} }}} \right)\ddot{x} + \frac{{2x(x\dot{x} - \rho \dot{\rho })^{2} }}{{(\rho^{2} - x^{2} )^{2} }} + \frac{{x(2\dot{x}^{2} - \dot{\rho }^{2} - \rho \ddot{\rho }) - \dot{x}\rho \dot{\rho }}}{{\rho^{2} - x^{2} }}} \right],\;\;\;\;{\text{and}}\quad \frac{d}{dt}\left( {\frac{{\partial \,T^{\dag } }}{{\partial \,\dot{z}}}} \right) = m\ddot{z}. $$
(16)

We also get from (14) the relations

$$ \frac{{\partial \,T^{\dag } }}{\partial \,x} = m\left[ {\frac{{x\dot{x}^{2} - \dot{x}\rho \dot{\rho }}}{{\rho^{2} - x^{2} }} + x\frac{{(\rho \dot{\rho } - x\dot{x})^{2} }}{{(\rho^{2} - x^{2} )^{2} }}} \right],\quad {\text{and}}\quad \frac{{\partial \,T^{\dag } }}{\partial \,z} = 0. $$
(17)

Using relations (16) and (17) in Eqs. (5) and (6) gives

$$ m\left( {1 + \frac{{x^{2} }}{{\rho^{2} - x^{2} }}} \right)\ddot{x} = \frac{m\,x}{{\rho^{2} - x^{2} }}\left\{ { - \left[ {\dot{x}^{2} + \frac{{(\rho \dot{\rho } - x\dot{x})^{2} }}{{\rho^{2} - x^{2} }}} \right] + \dot{\rho }^{2} + \rho \ddot{\rho }} \right\}\quad {\text{and}}\quad m\ddot{z} = 0. $$
(18)

The equations in (18) are the same as those obtained using the Udwadia–Kalaba equations in Ref. [18] [see Eq. (4.64)], and are the correct equations of motion.

We have thus shown that for the two examples in Ref. [18] of holonomically constrained systems that form the basis of the claim made in it, the embedding method gives the correct equations of motion.

Remark 1

In the development of the equations of motion using the Hamel embedding method there is an error in Eq. (2.15) thereby making the final equations obtained in Ref. [18] incorrect. Equation (2.15) should read (in the notation used in Ref. [18])

$$ \Phi (q,t) = ( - A_{1}^{ - 1} A_{2} )^{\rm T} M_{11} (A_{1}^{ - 1} c) + \frac{1}{2}M_{12}^{\rm T} (A_{1}^{ - 1} c) + \frac{1}{2}M_{21}^{{}} (A_{1}^{ - 1} c) + ( - A_{1}^{ - 1} A_{2} )^{\rm T} N_{1}^{\rm T} + N_{2}^{\rm T} . $$
(19)

The coefficients of the first three terms in Eq. (2.15) are incorrect. The right-hand side of relation (19) can be further simplified since \(M_{12} = M_{21}^{\rm T}\) and the second and third members are therefore identical, but we leave it in the form above for easy comparison. Had direct use of Lagrange’s equations with the embedded kinetic energy been made, as shown here, this error would have been obviated.

Remark 2

The reason why the example in Case (i) of Ref. [18] that also deals with holonomic constraints shows that the embedding method works, even though use is made of Eq. (2.15) in it, is the fortuitous choice of the constraint \(y - kx = 0\), for which \(c = 0\) in the notation in Ref. [18]. Hence the contribution made by the first three terms of \(\Phi (q,t)\) in Eq. (2.15) does not show up.

3 On embedding constraints and the formalized Hamel method

Consider an unconstrained mechanical system whose kinetic energy is given by

$$ T(q,\dot{q},t) = \frac{1}{2}\dot{q}^{\rm T} M(q,t)\dot{q} + N(q,t)\dot{q} + P(q,t), $$
(20)

where q is an n-vector (n by 1 vector), \(M > 0\) is an \(n\) by \(n\) symmetric matrix, \(N\) is an 1 by n vector, and \(P\) is a scalar. We partition the n-vector q so that \(q = [q_{{_{1} }}^{{\text{T}}} ,q_{{_{2} }}^{{\text{T}}} ]^{{\text{T}}} ,\) where \(q_{1}\) is an r-vector and \(q_{2}\) is an (nr)-vector. We assume that this unconstrained mechanical system is subjected to r independent constraints given by

$$ A_{1} (q_{1} ,q_{2} ,t)\dot{q}_{1} + A_{2} (q_{1} ,q_{2} ,t)\dot{q}_{2} = c(q_{1} ,q_{2} ,t). $$
(21)

When the rank of the r by r matrix \(A_{1}\) is r, the matrix \(A_{1}\) is invertible. One can then solve for \(\dot{q}_{1}\) from Eq. (21) and substitute it in the expression for the kinetic energy T given in Eq. (20) to yield the embedded kinetic energy given by

$$ T^{\dag } = T^{\dag } (\dot{q}_{2} ,q_{1} ,q_{2} ,t). $$
(22)

For simplicity we shall assume that the system is force-free (as in the examples in Ref. [18]) and that the ‘given’ force on the system is zero. One observes from Eq. (22) that even after substituting the constraint (21) in the kinetic energy of the unconstrained system, when the constraints are nonholonomic, the system is still constrained since \(q_{1} (t)\) is dependent, in general, on \(q_{2}\), \(\dot{q}_{2}\), and t. The coordinate \(q_{1}\) cannot, in general, be eliminated. More technically, the virtual displacements \(\delta q_{1}\) and \(\delta q_{2}\) are not independent. Also, since the coordinate \(q_{1} (t)\) is not independent of \(q_{2} (t)\), when using the Lagrange formalism, one cannot obtain the appropriate equations of motion using the kinetic energy \(T^{\dag }\) without the use of Lagrange multipliers (or some other method, such as, the fundamental equation) that recognizes that the coordinate r-vector \(q_{1}\) is constrained. The embedding, in short, does not go away, in general, with the interdependence of \(q_{1}\) and \(q_{2}\).

Thus, even though the constraint has been substituted in the kinetic energy of the unconstrained system, when the constraints are nonholonomic, the Lagrange formulation does not permit the equation of motion for \(q_{2}\) (obtained by using \(T^{\dag }\)) to be simply given by

$$ \frac{{\text{d}}}{{{\text{d}}t}}\left( {\frac{{\partial T^{\dag } }}{{\partial \dot{q}_{2} }}} \right) - \frac{{\partial T^{\dag } }}{{\partial q_{2} }} = 0 $$
(23)

since the coordinates \(q_{1} (t)\) and \(q_{2} (t)\) are not independent of one another. Hence the equations for Hamel’s embedding method given in (2.11)–(2.17) in Ref [18] do not give, in general, the correct equation of motion that would result from the use of the embedded kinetic energy \(T^{\dag }\) when using the machinery of Lagrangian dynamics.

While the above circumstance (lack of independence of the coordinates in the embedded kinetic energy \(T^{\dag }\)) most commonly occurs, in general, when the constraints are nonholonomic, it could occur even when the constraints are holonomic, if one were to ‘choose’ not to use the holonomic constraint equations to entirely eliminate both the coordinates and corresponding generalized velocities from the kinetic energy of the unconstrained system. One might think of eliminating the generalized velocities, while still allowing some or all of the coordinates to persist in the Lagrangian, a situation we refer to in what follows as ‘partial embedding.’ The following example illustrates this situation.

Example 3

Consider a system moving in 3-dimensional space. The kinetic energy of the unconstrained system is given by

$$ T = \frac{1}{2}[\dot{x}^{2} + (y^{2} + \alpha )\dot{y}^{2} + (z^{2} + \beta )\dot{z}^{2} ], \, \alpha ,\beta { > 0,} $$
(24)

where \(\alpha\) and \(\beta\) are constants. The system is subjected to no ‘given’ forces, but is subjected to the holonomic constraint

$$ y(t) = x(t) + c(t). $$
(25)

We shall illustrate what happens when we: (i) use the fundamental equation to obtain the equations of motion of the constrained system (see Appendix A) (ii) do a ‘partial embedding’ of the constraint (25) (to be explained shortly) in the kinetic energy expression (24) and then use the Lagrange formalism to get the equations of motion of the constrained system using the embedded kinetic energy \(T^{\dag }\)(see Appendix B) (iii) embed the constraint in the kinetic energy expression by eliminating both y and \(\dot{y}\) from the expression in (24) (thereby doing a ‘complete elimination’), and then use the embedded kinetic energy \(T^{\dag \dag }\) in the Lagrange formalism to obtain the equations of motion of the constrained system (see Appendix C).

Equation (25) yields \(\dot{y} = \dot{x} + \dot{c}\). Using this relation, we choose to partially embed this constraint by eliminating only \(\dot{y}\) from the expression for T given in (24) so as to obtain the (partially) embedded kinetic energy

$$ T^{\dag } (\dot{x},\dot{z},y,z,t): = T^{\dag } (\dot{q}_{2} ,q_{1} ,q_{2} ,t) = \frac{1}{2}[\dot{x}^{2} + (y^{2} + \alpha )(\dot{x} + \dot{c}(t))^{2} + (z^{2} + \beta )\dot{z}^{2} ], $$
(26)

where we have denoted \(q_{1} = y\) and \(q_{2} = [x, \, z]^{{\text{T}}}\).

We note that we have chosen not to eliminate \(y\) from the expression in (24), and have therefore carried out a ‘partial embedding’ of the constraint (25) in the kinetic energy of the unconstrained system. The reason for doing this is the following.

Were the constraint on the system to be a general nonholonomic constraint, say, \(\dot{y} = z\dot{x}\) instead of that given in (25), the elimination of y from the expression for T in (24) would be impossible, and y would not be independent of z and x in the expression for the embedded kinetic energy after having substituted for the \(\dot{y}^{2}\) term in (24) by using this constraint,\(\dot{y} = z\dot{x}\). But even for a holonomic constraint such as (25), as shown here, we can ‘choose’ not to eliminate y so that we obtain the embedded kinetic energy \(T^{\dag }\) as a function of the coordinate y—just like we would have obtained for the nonholonomic constraint \(\dot{y} = z\dot{x}\), which is not independent of x as shown in (25). The embedded kinetic energy \(T^{\dag }\) in (26) is now of the same functional form as that given in (22)—the form that would have arisen, in general, with the nonholonomic constraint \(\dot{y} = z\dot{x}\).

The development of the equations of motion using Lagrange’s formalism with this embedded kinetic energy \(T^{\dag }\) now requires that cognizance be given to the fact that the coordinates x and y, despite the (partial) embedding, are dependent on each other. As pointed out earlier such a coordinate dependence would be generally true when the constraints are nonholonomic.

The development of the equations of motion that this embedded kinetic energy \(T^{\dag }\) yields in confluence with the constraint (25) (since x and y are no longer independent) requires the use of the equation of motion for constrained systems with singular mass matrices (see Refs. [4, 19,20,21] for other examples). The equations obtained are (see Appendix B)

$$ \begin{aligned} \ddot{x} & = - \frac{{(y^{2} + \alpha )\ddot{c}}}{{y^{2} + \alpha + 1}} - \frac{{y\dot{y}^{2} }}{{y^{2} + \alpha + 1}} \\ \ddot{y} & = \frac{{\ddot{c}}}{{y^{2} + \alpha + 1}} - \frac{{y\dot{y}^{2} }}{{y^{2} + \alpha + 1}} \\ \ddot{z} & = \frac{{ - z\dot{z}^{2} }}{{z^{2} + \beta }}. \\ \end{aligned} $$
(27)

The fundamental equation from the use of \(T\) in (24) and the holonomic constraint (25) gives the same equations as those obtained in (27) (see Appendix A), thereby verifying that upon the use of the Lagrange formalism the (partially) embedded Lagrangian in the holonomic case will yield the same equation of motion as that given by the fundamental equation. Thus, partial embedment of the constraint in the kinetic energy is permissible, as long as the Lagrange formalism is properly followed.

In order to compare the results with the same example as that in Ref. [18], the equations provided by (2.11)–(2.17) in that reference, which use the same form of \(T^{\dag } (\dot{q}_{2} ,q_{1} ,q_{2} ,t)\) as given in (26) above, are recalled. This yields the equations (see Appendix D) [18]

$$ \begin{aligned} \ddot{x} & = - \frac{{(y^{2} + \alpha )\ddot{c}}}{{y^{2} + \alpha + 1}} - \frac{{2y\dot{y}^{2} }}{{y^{2} + \alpha + 1}} \\ \ddot{z} & = \frac{{ - z\dot{z}^{2} }}{{z^{2} + \beta }}. \\ \end{aligned} $$
(28)

Equations (28), which are derived from Ref. [18], are different from those obtained in (27). Recall that Eq. (27) is obtained by: (i) using the embedded kinetic energy \(T^{\dag }\) along with the proper formalism that recognizes that the coordinates y and x are dependent; and also (ii) using the fundamental equation. It is the correct equation of motion.

We know that ‘partial embedding’, i.e., use of the kinetic energy \(T^{\dag }\) in (26) should give us the correct equations of motion (27). However, due to the functional form of \(T^{\dag } = T^{\dag } (\dot{q}_{2} ,q_{1} ,q_{2} ,t)\) of (26), were we to use the formalized embedding equations given in Ref. [18], we would need to use Eqs. (2.13)–(2.17) [18]. But we find that these equations result in (28) and since Eq. (28) differs from the correct Eq. (27), Eqs. (2.13)–(2.17) (Ref. [18]) for the formalized Hamel embedding method appear incorrect. These equations of motion that are obtained in Ref. [18] using the embedded kinetic energy \(T^{\dag }\) do not pay heed to whether or not the coordinates (after the embedding) are dependent on one another. It is precisely for this reason that Eq. (28) differs from the correct equation given by (27). As explained before, this would occur, in general, if the constraints are nonholonomic, but the same effect, as shown here, can be seen to occur when using a partial embedding of a holonomic constraint. Hence there is the incorrectness of Eqs. (2.13)–(2.17) in Ref. [18] for nonholonomic constraints. We should note that for nonholonomic constraints the use of embedding (even after including the requirement that after the embedding is done one must pay attention to the dependence of the coordinates), will not lead to the correct equations of motion, as explained in Ref. [4].

Nonetheless, such a partial embedding of the holonomic constraint and use of the proper Lagrange formalism (that pays heed to the possible dependence of coordinates after doing the embedding) yields the same equations of motion as those obtained using the fundamental equation. Thus, even a partial substitution of the holonomic constraint in the kinetic energy yields the correct equations of motion when the Lagrangian formalism is properly followed, i.e., cognizance is given to dependent coordinates as demanded by the formalism.

Moreover, we could eliminate both y and \(\dot{y}\) from the kinetic energy T in (24), as one might normally do with a holonomic constraint, so that the embedded kinetic energy is given by

$$ T^{\dag \dag } (\dot{x},\dot{z},t) = \frac{1}{2}[\dot{x}^{2} + ((x + c)^{2} + \alpha )(\dot{x} + \dot{c}(t))^{2} + (z^{2} + \beta )\dot{z}^{2} ]. $$
(29)

Instead of ‘partial embedding’ as before, one might think of this as ‘complete embedding,’ and one can use the Lagrange formalism, now without the need for any Lagrange multiplier since the coordinates x and z are independent of one another. Alternately speaking, an appropriate transformation of coordinates has been done eliminating one of the (dynamical) coordinates and converting the system to an unconstrained system. Use of this embedded Lagrangian \(T^{\dag \dag }\) yields the same equations of motion given in (27) (see Appendix C), again showing that the (completely) embedded Lagrangian when used properly with the Lagrange formalism will yield the correct equations of motion of the constrained system for holonomic constraints.

4 Conclusion

The main conclusions of this paper are the following.

  1. 1.

    The examples that form the basis for the claim in Ref. [18] that the embedding method does not work, in general, for holonomically constrained systems have been shown here to have errors. The result that the embedding method works for holonomically constrained systems is true.

    The embedding of holonomic constraints in the Lagrangian of an unconstrained mechanical system will yield an embedded Lagrangian, which when used with the Lagrangian formalism, will yield the correct equations of motion of the holonomically constrained mechanical system.

  2. 2.

    The equations for the formalized Hamel embedding method must take cognizance of whether or not the coordinates, after the embedding is performed, are independent. When not independent, Lagrange’s formalism used with the embedded of holonomic constraints in the Lagrangian requires that the dependence of the coordinates be included when obtaining the equations of motion. Since the system is still constrained and the coordinates are not independent to each other, when using the Lagrange formalism, one cannot obtain the appropriate equations of motion without use of Lagrange multipliers or some other method, such as, the fundamental equation.

  3. 3.

    We should note that for nonholonomic constraints the use of embedding (even after including the requirement that after the embedding is done one must pay attention to the dependence of the coordinates), will not lead to the correct equations of motion.

  4. 4.

    Lastly, as explained in Ref. [4], we point out that the result that the embedding method works for holonomically constrained systems, does not rest on the working out of examples, but on the underlying result in analytical dynamics that any holonomically constrained mechanical system can be converted to an unconstrained system by a suitable coordinate transformation (complete embedding) through the use of the holonomic constraints.