Introduction

Gauss principle, also known as the principle of least compulsion, was proposed by German mathematician Gauss CF in 1829. It is a universal principle in analytical mechanics1,2,3. Gauss principle is characterized by its extremal property, whereas neither d’Alembert-Lagrange’s principle nor Jourdain’s principle has extremality1. The advantage of Gauss principle is that it not only has a simple analytical expression, but also can be used to construct equations of motion for both holonomic and nonholonomic systems. It is this property that makes Gauss principle particularly useful in the field of dynamics modeling and approximate calculation of complex systems. Examples include multi-body system dynamics4,5,6,7,8, robot dynamics9,10, hybrid dynamics11, and elastic rod dynamics12, etc. Literature13 provides a good overview of the origin and development of the Gauss principle. The articles14,15,16,17,18,19,20 deal with the Gauss principle and its application in mechanical systems. Although the Gauss principle is complete when dealing with constrained mechanical systems involving first-order derivatives1, for systems with higher-order derivatives or higher-order constraints, the Gauss principle and its stationary value problem are still an open subject.

A higher-order derivative system refers to one whose Lagrangian function contains the higher-order derivatives of generalized coordinates with respect to time. The study of such systems can be traced back to the research of Ostrogradsky and Jacobi. The monograph21 presents generalized classical mechanics and field theory, in which the Lagrangian function contains higher-order derivatives. The study of higher-order derivative systems is not merely a simple extension in mathematics, but also has practical needs and physical significance. There are numerous related studies in this area, such as those listed in references22,23,24,25,26,27,28,29,30,31,32, etc. However, as far as the author is aware, the research on the Gauss principle involving systems of higher-order derivatives or higher-order constraints is still relatively rare.

Recently, by differentiating the d’Alembert principle with respect to time and introducing the generalized Gaussian variation in the jerky space, we established the generalized Gauss principle for the variable-acceleration dynamics33. Unlike33, in reference34, we derived the Gauss principle of variable-mass mechanics by taking the dot product of the Meshchersky equation with the Gaussian variation, and extended it to higher-order linear nonholonomic constraint systems.

In this paper, following the idea of reference34, we obtain the arbitrary-order Gauss principle by multiplying the d’Alembert principle by the \(m - \textrm{th}\) order Gaussian variation, and discuss its extremum properties. We also present the Appell form, Lagrange form and Nielsen form of the Gauss principle in generalized coordinates, derive the corresponding dynamical equations, and finally extend the results to higher-order nonlinear nonholonomic mechanical systems.

Gauss principle of arbitrary order

Dealing with a mechanical system composed of N particles. The d’Alembert principle is

$$\begin{aligned} - {m_i}{{{\ddot{{{\varvec{r}}}}}}_i} + {{{{\varvec{F}}}}_i}\, + {{{{\varvec{N}}}}_i} = 0\,\,\,\,\left( {i = 1,2, \cdots ,N} \right) \end{aligned}$$
(1)

where \({m_i}\) is mass, \({{{{\varvec{r}}}}_i}\) is the position vector, \({{{{\varvec{F}}}}_i}\) is the active force and \({{{{\varvec{N}}}}_i}\) is the constraint reaction.

Take the scalar product of Eq. (1) with \({\delta _{\mathrm{{Gm}}}}\mathop {{{{{\varvec{r}}}}_i}}\limits ^{\left( {m + 2} \right) }\), sum it over i, and assume that the constraints are ideal, then we have

$$\begin{aligned} \sum \limits _{i = 1}^N {\left( { - {m_i}{{{{\ddot{{{\varvec{r}}}}}}}_i} + {{{{\varvec{F}}}}_i}\,} \right) \cdot {\delta _{\mathrm{{Gm}}}}\mathop {{{{{\varvec{r}}}}_i}}\limits ^{\left( {m + 2} \right) } } = 0 \end{aligned}$$
(2)

where \({\delta _{\mathrm{{Gm}}}}\left( \cdot \right)\) represents the variation in the sense of Gauss in the space spanned by \(m - \textrm{th}\) order derivative of acceleration, which is called the \(m - \textrm{th}\) Gaussian variation, and its variation rule is as follows

$$\begin{aligned} {\delta _{\mathrm{{Gm}}}}t = 0,{\delta _{\mathrm{{Gm}}}}\mathop {{{{{\varvec{r}}}}_i}}\limits ^{\left( {m - j + 1} \right) } = 0,{\delta _{\mathrm{{Gm}}}}\mathop {{{{{\varvec{r}}}}_i}}\limits ^{\left( {m + 2} \right) } \ne 0\,\left( {m = 0,1,2, \cdots ;j = 0,1, \cdots ,m + 1} \right) \end{aligned}$$
(3)

When \(m = 0\), \({\delta _{\mathrm{{Gm}}}}\left( \cdot \right)\) reduces to the classical Gaussian variation. In the space spanned by the \(m - \textrm{th}\) order derivative of acceleration, the ideal constraints must satisfy the condition

$$\begin{aligned} \sum \limits _{i = 1}^N {{{{{\varvec{N}}}}_i} \cdot {\delta _{\mathrm{{Gm}}}}\mathop {{{{{\varvec{r}}}}_i}}\limits ^{\left( {m + 2} \right) } } = 0\ \end{aligned}$$
(4)

Formula (2) is called the arbitrary-order Gauss principle, and is reduced to the classical Gauss principle when \(m = 0\).

Define the generalized compulsion function as

$$\begin{aligned} {Z_{\mathrm{{wm}}}} = \frac{{{\mathrm{{d}}^m}}}{{\mathrm{{d}}{t^m}}}\left[ {\frac{1}{2}\sum \limits _{i = 1}^N {{m_i}{{\left( {{{{{\ddot{{{\varvec{r}}}}}}}_i} - \frac{{{{{{\varvec{F}}}}_i}\,}}{{{m_i}}}} \right) }^2}} } \right] \ \end{aligned}$$
(5)

Formula (5) can be expanded as

$$\begin{aligned} {Z_{\mathrm{{wm}}}} = \left\{ {\begin{aligned}&{\frac{1}{2}\sum \limits _{i = 1}^N {{m_i}{{\ddot{{{\varvec{r}}}}}}_i^2} - \sum \limits _{i = 1}^N {{{{{\varvec{F}}}}_i} \cdot {{{{\ddot{{{\varvec{r}}}}}}}_i}} + \cdots } & {{\text {for}}\quad m = 0}\\&{\sum \limits _{i = 1}^N {{m_i}{{{{\ddot{{{\varvec{r}}}}}}}_i} \cdot \mathop {{{{{\varvec{r}}}}_i}}\limits ^{\left( {m + 2} \right) } } - \sum \limits _{i = 1}^N {{{{{\varvec{F}}}}_i} \cdot \mathop {{{{{\varvec{r}}}}_i}}\limits ^{\left( {m + 2} \right) } } + \cdots } & {{\text {for}}\quad m = 1,2, \cdots } \end{aligned}} \right. \ \end{aligned}$$
(6)

where the symbol “ \({\cdots }\)” refers to the terms independent of \(\mathop {{{{{\varvec{r}}}}_i}}\limits ^{\left( {m + 2} \right) }\).

Calculating the \(m - \textrm{th}\) Gaussian variation, we get

$$\begin{aligned} {\delta _{\mathrm{{Gm}}}}{Z_{\mathrm{{wm}}}} = \sum \limits _{i = 1}^N {{m_i}{{{{\ddot{{{\varvec{r}}}}}}}_i} \cdot {\delta _{\mathrm{{Gm}}}}\mathop {{{{{\varvec{r}}}}_i}}\limits ^{\left( {m + 2} \right) } } - \sum \limits _{i = 1}^N {{{{{\varvec{F}}}}_i} \cdot {\delta _{\mathrm{{Gm}}}}\mathop {{{{{\varvec{r}}}}_i}}\limits ^{\left( {m + 2} \right) } } \ \end{aligned}$$
(7)

Thus formula (2) becomes

$$\begin{aligned} {\delta _{\mathrm{{Gm}}}}{Z_{\mathrm{{wm}}}} = 0\ \end{aligned}$$
(8)

Let \(\mathop {{{{{\varvec{r}}}}_i}}\limits ^{\left( {m + 2} \right) }\) be the acceleration of real motion of a particle in the space of \(m - \textrm{th}\) order derivative of acceleration, and \(\mathop {{{{{\varvec{r}}}}_i}}\limits ^{\left( {m + 2} \right) } + {\delta _{\mathrm{{Gm}}}}\mathop {{{{{\varvec{r}}}}_i}}\limits ^{\left( {m + 2} \right) }\) be the acceleration of the possible motion permitted by constraints, then the difference between their generalized compulsion functions \(\Delta {Z_{\mathrm{{wm}}}}\) is calculated as follows: when \(m = 0\), there is

$$\begin{aligned} \Delta {Z_{\mathrm{{w0}}}}&= \frac{1}{2}\sum \limits _{i = 1}^N {{m_i}{{\left( {{{{\ddot{{{\varvec{r}}}}}}_i} + {\delta _{\mathrm{{G0}}}}{{{\ddot{{{\varvec{r}}}}}}_i}} \right) }^2}} - \sum \limits _{i = 1}^N {{{{{\varvec{F}}}}_i} \cdot \left( {{{{\ddot{{{\varvec{r}}}}}}_i} + {\delta _{\mathrm{{G0}}}}{{{\ddot{{{\varvec{r}}}}}}_i}} \right) } - \frac{1}{2}\sum \limits _{i = 1}^N {{m_i}{{{\ddot{{{\varvec{r}}}}}}_i} \cdot {{{\ddot{{{\varvec{r}}}}}}_i}} + \sum \limits _{i = 1}^N {{{{{\varvec{F}}}}_i} \cdot {{{\ddot{{{\varvec{r}}}}}}_i}} \nonumber \\&= \frac{1}{2}\sum \limits _{i = 1}^N {{m_i}{{\left( {{\delta _{\mathrm{{G0}}}}{{{\ddot{{{\varvec{r}}}}}}_i}} \right) }^2}} + \sum \limits _{i = 1}^N {\left( {{m_i}{{{\ddot{{{\varvec{r}}}}}}_i} - {{{{\varvec{F}}}}_i}} \right) \cdot {\delta _{\mathrm{{G0}}}}{{{\ddot{{{\varvec{r}}}}}}_i}} \nonumber \\&= \frac{1}{2}\sum \limits _{i = 1}^N {{m_i}{{\left( {{\delta _{\mathrm{{G0}}}}{{{\ddot{{{\varvec{r}}}}}}_i}} \right) }^2}} > 0 \end{aligned}$$
(9)

when \(m \ge 1\), there is

$$\begin{aligned} \Delta {Z_{\mathrm{{wm}}}}&= \sum \limits _{i = 1}^N {{m_i}{{{\ddot{{{\varvec{r}}}}}}_i} \cdot \left( {\mathop {{{{{\varvec{r}}}}_i}}\limits ^{\left( {m + 2} \right) } + {\delta _{\mathrm{{Gm}}}}\mathop {{{{{\varvec{r}}}}_i}}\limits ^{\left( {m + 2} \right) } } \right) } - \sum \limits _{i = 1}^N {{{{{\varvec{F}}}}_i} \cdot \left( {\mathop {{{{{\varvec{r}}}}_i}}\limits ^{\left( {m + 2} \right) } + {\delta _{\mathrm{{Gm}}}}\mathop {{{{{\varvec{r}}}}_i}}\limits ^{\left( {m + 2} \right) } } \right) } \nonumber \\&- \sum \limits _{i = 1}^N {{m_i}{{{\ddot{{{\varvec{r}}}}}}_i} \cdot \mathop {{{{{\varvec{r}}}}_i}}\limits ^{\left( {m + 2} \right) } } + \sum \limits _{i = 1}^N {{{{{\varvec{F}}}}_i} \cdot \mathop {{{{{\varvec{r}}}}_i}}\limits ^{\left( {m + 2} \right) } } \nonumber \\&= \sum \limits _{i = 1}^N {{m_i}{{{\ddot{{{\varvec{r}}}}}}_i} \cdot {\delta _{\mathrm{{Gm}}}}\mathop {{{{{\varvec{r}}}}_i}}\limits ^{\left( {m + 2} \right) } } - \sum \limits _{i = 1}^N {{{{{\varvec{F}}}}_i} \cdot {\delta _{\mathrm{{Gm}}}}\mathop {{{{{\varvec{r}}}}_i}}\limits ^{\left( {m + 2} \right) } } = 0 \end{aligned}$$
(10)

For a mechanical system with two-sided ideal constraints, principle (8) shows that, for the real motion, the \(m - \mathrm{{th}}\) order derivative of acceleration makes the generalized compulsion function \({Z_{\mathrm{{wm}}}}\) yield a stationary value in the sense of the \(m - \mathrm{{th}}\) Gaussian variation.

When \(m = 0\), then principle (8) reduces to the classical Gauss least compulsion principle

$$\begin{aligned} \delta {Z_\mathrm{{w}}} = \delta \left\{ {\frac{1}{2}\sum \limits _{i = 1}^N {{m_i}{{\left( {{{{\ddot{{{\varvec{r}}}}}}_i} - \frac{{{{{{\varvec{F}}}}_i}\,}}{{{m_i}}}} \right) }^2}} } \right\} = 0\ \end{aligned}$$
(11)

Generalized coordinate representation of the arbitrary-order Gauss principle

Assume that \({{{{\varvec{r}}}}_i} = {{{{\varvec{r}}}}_i}\left( {{q_s},t} \right)\), then \(\left( {m + 2} \right)\) order derivative of \({{{{\varvec{r}}}}_i}\) with respect to time t reads

$$\begin{aligned} \mathop {{{ {{\varvec{r}}}}_i}}\limits ^{\left( {m + 2} \right) } = \sum \limits _{i = 1}^N {\frac{{\partial {{ {{\varvec{r}}}}_i}}}{{\partial {q_s}}}\mathop {{q_s}}\limits ^{\left( {m + 2} \right) } } + \cdots \end{aligned}$$
(12)

where \({q_s}\left( {s = 1,2, \cdots ,n} \right)\) are generalized coordinates, then

$$\begin{aligned} {\delta _{\mathrm{{Gm}}}}\mathop {{{ {{\varvec{r}}}}_i}}\limits ^{\left( {m + 2} \right) } = \sum \limits _{i = 1}^N {\frac{{\partial {{ {{\varvec{r}}}}_i}}}{{\partial {q_s}}}{\delta _{\mathrm{{Gm}}}}\mathop {{q_s}}\limits ^{\left( {m + 2} \right) } } \end{aligned}$$
(13)

Introduce the acceleration energy, i.e.,

$$\begin{aligned} S = \sum \limits _{i = 1}^N {\frac{1}{2}{m_i}{{{\ddot{{{\varvec{r}}}}}}_i} \cdot {{{\ddot{{{\varvec{r}}}}}}_i}} \end{aligned}$$
(14)

Take m order derivative of time t, \(m \ge 1\), and we get

$$\begin{aligned} \mathop S\limits ^{\left( m \right) } = \sum \limits _{i = 1}^N {{m_i}{{{\ddot{{{\varvec{r}}}}}}_i} \cdot \mathop {{{{{\varvec{r}}}}_i}}\limits ^{\left( {m + 2} \right) } } + \cdots \end{aligned}$$
(15)

Then the generalized compulsion function (6) can be expressed as

$$\begin{aligned} {Z_{\mathrm{{wm}}}} = \mathop S\limits ^{\left( m \right) } - \sum \limits _{i = 1}^N {{{{{\varvec{F}}}}_i} \cdot \mathop {{{{{\varvec{r}}}}_i}}\limits ^{\left( {m + 2} \right) } } + \cdots \quad \left( {m = 0,1,2, \cdots } \right) \end{aligned}$$
(16)

From Eqs. (14) and (15), we can get

$$\begin{aligned} \sum \limits _{i = 1}^N {{m_i}{{{\ddot{{{\varvec{r}}}}}}_i} \cdot \frac{{\partial {{{{\varvec{r}}}}_i}}}{{\partial {q_s}}}} = \frac{{\partial S}}{{\partial {{\ddot{q}}_s}}} = \cdots = \frac{{\partial \mathop S\limits ^{\left( m \right) } }}{{\partial \mathop {{q_s}}\limits ^{\left( {m + 2} \right) } }} \end{aligned}$$
(17)

By substituting formula (16) into principle (8) and using Eqs. (13) and (17), we get

$$\begin{aligned} \sum \limits _{s = 1}^n {\left( { - \frac{{\partial \mathop S\limits ^{\left( m \right) } }}{{\partial \mathop {{q_s}}\limits ^{\left( {m + 2} \right) } }} + {Q_s}} \right) {\delta _{\mathrm{{Gm}}}}\mathop {{q_s}}\limits ^{\left( {m + 2} \right) } } = 0 \end{aligned}$$
(18)

Equation (18) is the Appell form of the arbitrary-order Gauss principle with generalized coordinates. Where \({Q_s} = \sum \limits _{i = 1}^N {{{{{\varvec{F}}}}_i} \cdot \frac{{\partial {{{{\varvec{r}}}}_i}}}{{\partial {q_s}}}}\) is the generalized force.

From formula (17), principle (18) can also be written as

$$\begin{aligned} \sum \limits _{s = 1}^n {\left( { - \frac{{\partial S}}{{\partial {{\ddot{q}}_s}}} + {Q_s}} \right) {\delta _{\mathrm{{Gm}}}}\mathop {{q_s}}\limits ^{\left( {m + 2} \right) } } = 0 \end{aligned}$$
(19)

It is easy to prove35

$$\begin{aligned}&\sum \limits _{i = 1}^N {{m_i}{{{\ddot{{{\varvec{r}}}}}}_i} \cdot \frac{{\partial {{{{\varvec{r}}}}_i}}}{{\partial {q_s}}}} = \frac{\mathrm{{d}}}{{\mathrm{{d}}t}}\frac{{\partial \mathop T\limits ^{\left( {m + 1} \right) } }}{{\partial \mathop {{q_s}}\limits ^{\left( {m + 2} \right) } }} - \frac{{\partial T}}{{\partial {q_s}}}\nonumber \\&= \left( {m + 2} \right) \frac{\partial }{{\partial \mathop {{q_s}}\limits ^{\left( {m + 2} \right) } }}\frac{\mathrm{{d}}}{{\mathrm{{d}}t}}\mathop T\limits ^{\left( {m + 1} \right) } - \left( {m + 3} \right) \frac{{\partial \mathop T\limits ^{\left( {m + 1} \right) } }}{{\partial \mathop {{q_s}}\limits ^{\left( {m + 1} \right) } }} \end{aligned}$$
(20)

where \(T = \sum \limits _{i = 1}^N {\frac{1}{2}{m_i}{{{\dot{{{\varvec{r}}}}}}_i} \cdot {{{\dot{{{\varvec{r}}}}}}_i}}\) is kinetic energy, then principle (8) can also be expressed in Lagrange form

$$\begin{aligned} \sum \limits _{s = 1}^n {\left( { - \frac{\mathrm{{d}}}{{\mathrm{{d}}t}}\frac{{\partial \mathop T\limits ^{\left( {m + 1} \right) } }}{{\partial \mathop {{q_s}}\limits ^{\left( {m + 2} \right) } }} + \frac{{\partial T}}{{\partial {q_s}}} + {Q_s}} \right) {\delta _{\mathrm{{Gm}}}}\mathop {{q_s}}\limits ^{\left( {m + 2} \right) } } = 0 \end{aligned}$$
(21)

and Nielsen form

$$\begin{aligned} \sum \limits _{s = 1}^n {\left( { - \left( {m + 2} \right) \frac{\partial }{{\partial \mathop {{q_s}}\limits ^{\left( {m + 2} \right) } }}\frac{\mathrm{{d}}}{{\mathrm{{d}}t}}\mathop T\limits ^{\left( {m + 1} \right) } + \left( {m + 3} \right) \frac{{\partial \mathop T\limits ^{\left( {m + 1} \right) } }}{{\partial \mathop {{q_s}}\limits ^{\left( {m + 1} \right) } }} + {Q_s}} \right) {\delta _{\mathrm{{Gm}}}}\mathop {{q_s}}\limits ^{\left( {m + 2} \right) } } = 0\ \end{aligned}$$
(22)

If the system is holonomic, then \({\delta _{\mathrm{{Gm}}}}\mathop {{q_s}}\limits ^{\left( {m + 2} \right) }\) is independent of each other and arbitrary, so by principle (18), it follows

$$\begin{aligned} \frac{{\partial \mathop S\limits ^{\left( m \right) } }}{{\partial \mathop {{q_s}}\limits ^{\left( {m + 2} \right) } }} = {Q_s}\quad \left( {s = 1,2, \cdots ,n} \right) \ \end{aligned}$$
(23)

Equation (23) are Appell equations. By principle (21), we obtain

$$\begin{aligned} \frac{\mathrm{{d}}}{{\mathrm{{d}}t}}\frac{{\partial \mathop T\limits ^{\left( {m + 1} \right) } }}{{\partial \mathop {{q_s}}\limits ^{\left( {m + 2} \right) } }} - \frac{{\partial T}}{{\partial {q_s}}} = {Q_s}\quad \left( {s = 1,2, \cdots ,n} \right) \ \end{aligned}$$
(24)

Equation (24) are Lagrange equations. By principle (22), we obtain

$$\begin{aligned} \left( {m + 2} \right) \frac{\partial }{{\partial \mathop {{q_s}}\limits ^{\left( {m + 2} \right) } }}\frac{\mathrm{{d}}}{{\mathrm{{d}}t}}\mathop T\limits ^{\left( {m + 1} \right) } - \left( {m + 3} \right) \frac{{\partial \mathop T\limits ^{\left( {m + 1} \right) } }}{{\partial \mathop {{q_s}}\limits ^{\left( {m + 1} \right) } }} = {Q_s}\quad \left( {s = 1,2, \cdots ,n} \right) \end{aligned}$$
(25)

Equation (25) are Nielsen equations.

Applications to nonholonomic mechanics

Suppose that the system is subjected to g ideal \(\left( {m + 2} \right)\) order nonholonomic constraints

$$\begin{aligned} f_\beta ^{m + 2} = {f_\beta }\left( {{q_s},{{\dot{q}}_s}, \cdots ,\mathop {{q_s}}\limits ^{\left( {m + 2} \right) } ,t} \right) = 0\quad \left( {\beta = 1,2, \cdots ,g} \right) \end{aligned}$$
(26)

In the space spanned by the \(m - \mathrm{{th}}\) order derivative of acceleration, the restriction condition which is applied on the virtual displacements \({\delta _{\mathrm{{Gm}}}}\mathop {{q_s}}\limits ^{\left( {m + 2} \right) }\) is

$$\begin{aligned} \sum \limits _{s = 1}^n {\frac{{\partial f_\beta ^{m + 2}}}{{\partial \mathop {{q_s}}\limits ^{\left( {m + 2} \right) } }}{\delta _{\mathrm{{Gm}}}}\mathop {{q_s}}\limits ^{\left( {m + 2} \right) } } = 0 \end{aligned}$$
(27)

Construct the function

$$\begin{aligned} {Z_{f\mathrm{{m}}}} = {Z_{\mathrm{{wm}}}} - \sum \limits _{\beta = 1}^g {{\lambda _\beta }f_\beta ^{m + 2}} \end{aligned}$$
(28)

where \({\lambda _\beta } = {\lambda _\beta }\left( {{q_s},{{\dot{q}}_s}, \cdots ,\mathop {{q_s}}\limits ^{\left( {m + 1} \right) },t} \right)\) is the constraint multiplier. By using Eq. (16), Eq. (28) becomes

$$\begin{aligned} {Z_{f\mathrm{{m}}}} = \mathop S\limits ^{\left( m \right) } - \sum \limits _{i = 1}^N {{{{{\varvec{F}}}}_i} \cdot \mathop {{{{{\varvec{r}}}}_i}}\limits ^{\left( {m + 2} \right) } } - \sum \limits _{\beta = 1}^g {{\lambda _\beta }f_\beta ^{m + 2}} + \cdots \quad \left( {m = 0,1,2, \cdots } \right) \end{aligned}$$
(29)

Formula (29) can be called the arbitrary-order generalized compulsion function of nonholonomic systems.

Calculating the \(m - \textrm{th}\) Gaussian variation of Eq. (29) and noting that \({\delta _{\mathrm{{Gm}}}}{\lambda _\beta } = 0\), we get

$$\begin{aligned} {\delta _{\mathrm{{Gm}}}}{Z_{f\mathrm{{m}}}}&= \sum \limits _{i = 1}^N {{m_i}{{\ddot{\textbf{r}}}_i} \cdot {\delta _{\mathrm{{Gm}}}}\mathop {{\mathbf{{r}}_i}}\limits ^{\left( {m + 2} \right) } } - \sum \limits _{i = 1}^N {{\mathbf{{F}}_i} \cdot {\delta _{\mathrm{{Gm}}}}\mathop {{\mathbf{{r}}_i}}\limits ^{\left( {m + 2} \right) } } \nonumber \\&- \sum \limits _{\beta = 1}^g {{\lambda _\beta }\sum \limits _{s = 1}^n {\frac{{\partial f_\beta ^{m + 2}}}{{\partial \mathop {{q_s}}\limits ^{\left( {m + 2} \right) } }}{\delta _{\mathrm{{Gm}}}}\mathop {{q_s}}\limits ^{\left( {m + 2} \right) } } } \end{aligned}$$
(30)

Substituting Eqs. (2) and (27) into Eq. (30), we get

$$\begin{aligned} {\delta _{\mathrm{{Gm}}}}{Z_{f\mathrm{{m}}}} = 0\ \end{aligned}$$
(31)

Equation (31) is the arbitrary-order Gauss principle for nonholonomic systems.

Principle (31) can be expressed in Appell form

$$\begin{aligned} \sum \limits _{s = 1}^n {\left( { - \frac{{\partial \mathop S\limits ^{\left( m \right) } }}{{\partial \mathop {{q_s}}\limits ^{\left( {m + 2} \right) } }} + {Q_s} + \sum \limits _{\beta = 1}^g {{\lambda _\beta }\frac{{\partial f_\beta ^{m + 2}}}{{\partial \mathop {{q_s}}\limits ^{\left( {m + 2} \right) } }}} } \right) {\delta _{\mathrm{{Gm}}}}\mathop {{q_s}}\limits ^{\left( {m + 2} \right) } } = 0 \end{aligned}$$
(32)

Lagrange form

$$\begin{aligned} \sum \limits _{s = 1}^n {\left( { - \frac{\mathrm{{d}}}{{\mathrm{{d}}t}}\frac{{\partial \mathop T\limits ^{\left( {m + 1} \right) } }}{{\partial \mathop {{q_s}}\limits ^{\left( {m + 2} \right) } }} + \frac{{\partial T}}{{\partial {q_s}}} + {Q_s} + \sum \limits _{\beta = 1}^g {{\lambda _\beta }\frac{{\partial f_\beta ^{m + 2}}}{{\partial \mathop {{q_s}}\limits ^{\left( {m + 2} \right) } }}} } \right) {\delta _{\mathrm{{Gm}}}}\mathop {{q_s}}\limits ^{\left( {m + 2} \right) } } = 0\ \end{aligned}$$
(33)

and Nielsen form

$$\begin{aligned} \sum \limits _{s = 1}^n {\left( { - \left( {m + 2} \right) \frac{\partial }{{\partial \mathop {{q_s}}\limits ^{\left( {m + 2} \right) } }}\frac{\mathrm{{d}}}{{\mathrm{{d}}t}}\mathop T\limits ^{\left( {m + 1} \right) } + \left( {m + 3} \right) \frac{{\partial \mathop T\limits ^{\left( {m + 1} \right) } }}{{\partial \mathop {{q_s}}\limits ^{\left( {m + 1} \right) } }} + {Q_s} + \sum \limits _{\beta = 1}^g {{\lambda _\beta }\frac{{\partial f_\beta ^{m + 2}}}{{\partial \mathop {{q_s}}\limits ^{\left( {m + 2} \right) } }}} } \right) {\delta _{\mathrm{{Gm}}}}\mathop {{q_s}}\limits ^{\left( {m + 2} \right) } } = 0\ \end{aligned}$$
(34)

From principles (32)–(34), according to the Lagrange multiplier method, we obtain Appell’s equations for higher order nonholonomic systems, that is

$$\begin{aligned} \frac{{\partial \mathop S\limits ^{\left( m \right) } }}{{\partial \mathop {{q_s}}\limits ^{\left( {m + 2} \right) } }} = {Q_s} + \sum \limits _{\beta = 1}^g {{\lambda _\beta }\frac{{\partial f_\beta ^{m + 2}}}{{\partial \mathop {{q_s}}\limits ^{\left( {m + 2} \right) } }}} \ \end{aligned}$$
(35)

Lagrange’s equations (also known as Routh equations)

$$\begin{aligned} \frac{\mathrm{{d}}}{{\mathrm{{d}}t}}\frac{{\partial \mathop T\limits ^{\left( {m + 1} \right) } }}{{\partial \mathop {{q_s}}\limits ^{\left( {m + 2} \right) } }} - \frac{{\partial T}}{{\partial {q_s}}} = {Q_s} + \sum \limits _{\beta = 1}^g {{\lambda _\beta }\frac{{\partial f_\beta ^{m + 2}}}{{\partial \mathop {{q_s}}\limits ^{\left( {m + 2} \right) } }}} \end{aligned}$$
(36)

and Nielsen’s equations

$$\begin{aligned} \left( {m + 2} \right) \frac{\partial }{{\partial \mathop {{q_s}}\limits ^{\left( {m + 2} \right) } }}\frac{\mathrm{{d}}}{{\mathrm{{d}}t}}\mathop T\limits ^{\left( {m + 1} \right) } - \left( {m + 3} \right) \frac{{\partial \mathop T\limits ^{\left( {m + 1} \right) } }}{{\partial \mathop {{q_s}}\limits ^{\left( {m + 1} \right) } }} = {Q_s} + \sum \limits _{\beta = 1}^g {{\lambda _\beta }\frac{{\partial f_\beta ^{m + 2}}}{{\partial \mathop {{q_s}}\limits ^{\left( {m + 2} \right) } }}} \ \end{aligned}$$
(37)

Example

Let a particle with mass M move in the plane, the nonpotential generalized force on it is

$$\begin{aligned} {Q_1} = \frac{{M{{\dot{q}}_1}t}}{{1 + {t^2}}},\quad {Q_2} = - \frac{{M{{\dot{q}}_1}}}{{1 + {t^2}}} \end{aligned}$$
(38)

The nonholonomic constraint is

$$\begin{aligned} {f^{\left( 3 \right) }} = \mathop {{q_1}}\limits ^{\left( 3 \right) } - t\mathop {{q_2}}\limits ^{\left( 3 \right) } = 0 \end{aligned}$$
(39)

and acceleration energy is

$$\begin{aligned} S = \frac{1}{2}M\left( {\ddot{q}_1^2 + \ddot{q}_2^2} \right) \end{aligned}$$
(40)

From Eq. (29), the generalized compulsion function is

$$\begin{aligned}&{Z_{f1}} = \frac{{\mathrm{{d}}S}}{{\mathrm{{d}}t}} - {{{\varvec{F}}}} \cdot \mathop {{{\varvec{r}}}}\limits ^{\left( 3 \right) } - \lambda {f^{\left( 3 \right) }} + \cdots \nonumber \\&= M\left( {{{\ddot{q}}_1}\mathop {{q_1}}\limits ^{\left( 3 \right) } + {{\ddot{q}}_2}\mathop {{q_2}}\limits ^{\left( 3 \right) } } \right) - {Q_1}\mathop {{q_1}}\limits ^{\left( 3 \right) } - {Q_2}\mathop {{q_2}}\limits ^{\left( 3 \right) } - \lambda \left( {\mathop {{q_1}}\limits ^{\left( 3 \right) } - t\mathop {{q_2}}\limits ^{\left( 3 \right) } } \right) + \cdots \end{aligned}$$
(41)

By calculating the Gaussian variation of Eq. (41) and setting it equal to zero, we get

$$\begin{aligned} {\delta _{G1}}{Z_{f1}} = \left( {M{{\ddot{q}}_1} - {Q_1} - \lambda } \right) {\delta _{G1}}\mathop {{q_1}}\limits ^{\left( 3 \right) } + \left( {M{{\ddot{q}}_2} - {Q_2} + \lambda t} \right) {\delta _{G1}}\mathop {{q_2}}\limits ^{\left( 3 \right) } = 0 \end{aligned}$$
(42)

From Eq. (42), using Lagrange multiplier method, we can get

$$\begin{aligned} M{\ddot{q}_1} - \frac{{M{{\dot{q}}_1}t}}{{1 + {t^2}}} - \lambda = 0,\quad M{\ddot{q}_2} + \frac{{M{{\dot{q}}_1}}}{{1 + {t^2}}} + \lambda t = 0 \end{aligned}$$
(43)

The motion of the system can be solved by combining Eqs. (43) and (39).

Now let’s verify the correctness of the results. The kinetic energy of the system is

$$\begin{aligned} T = \frac{1}{2}M\left( {\dot{q}_1^2 + \dot{q}_2^2} \right) \end{aligned}$$
(44)

Utilizing the Routh equations of higher-order nonholonomic mechanics, namely35

$$\begin{aligned} \frac{\mathrm{{d}}}{{\mathrm{{d}}t}}\frac{{\partial T}}{{\partial {{\dot{q}}_s}}} - \frac{{\partial T}}{{\partial {q_s}}} = {Q_s} + {\lambda _\beta }\frac{{\partial f_\beta ^{\left( {m + 2} \right) }}}{{\partial \mathop {{q_s}}\limits ^{\left( {m + 2} \right) } }} \end{aligned}$$
(45)

Substituting Eqs. (44), (38), and (39) into Eq. (45), we obtain

$$\begin{aligned} M{\ddot{q}_1} = \frac{{M{{\dot{q}}_1}t}}{{1 + {t^2}}} + \lambda ,\quad M{\ddot{q}_2} = - \frac{{M{{\dot{q}}_1}}}{{1 + {t^2}}} - \lambda t \end{aligned}$$
(46)

By comparing Eqs. (43) and (46), it can be seen that they are consistent.

Conclusions

Gauss principle is one of the universal differential variational principles in analytical mechanics1. The classical Gauss principle is limited to comparing real motion in acceleration space with all possible motions that conform to the constraints. In this paper, the concept of the \(m - \textrm{th}\) order derivative space of acceleration was proposed, the arbitrary-order Gauss principle was established. The arbitrary-order generalized compulsion function was constructed, and it was proved that for real motion, the variation of this function is equal to zero. The main innovations are listed below:

  1. (1)

    We proposed the concept of the space spanned by the \(m - \textrm{th}\) order derivative of acceleration, and based on this, we established the arbitrary-order Gauss principle. When \(m=0\), this result reduces to the classical Gauss principle.

  2. (2)

    We constructed the generalized compulsion function, and proved that, for a mechanical system with two-sided ideal constraints, the real motion makes the \(m - \textrm{th}\) Gaussian variation of the generalized compulsion function equal to zero in the \(m - \textrm{th}\) order derivative space of acceleration at every instant, compared with all possible motions allowed by the constraint.

  3. (3)

    We deduced the arbitrary-order Gauss principle in generalized coordinates, and its Appell, Lagrange and Nielsen forms, and derived the arbitrary-order Appell equations, Lagrange equations and Nielsen equations from the principle.

  4. (4)

    We applied the obtained principle to the nonholonomic system, constructed the generalized compulsion function of the system, and expressed the arbitrary-order Gauss principle of the nonholonomic system as the variation of this function being equal to zero.

The arbitrary-order Gauss principle can be applied to the dynamic modeling and control of multi-body systems, robots, spacecraft, etc. with high-order nonholonomic constraints, as well as to the nonholonomic motion planning and the approximate calculation of nonlinear systems. Therefore, its research is of great significance. The arbitrary-order Gauss principle obtained in this paper is not only an extension of the classical Gauss principle, but also a stationary value principle in the arbitrary-order case, which provides a new idea for dynamics modeling and calculation of higher order nonholonomic systems. However, the physical interpretation of the generalized compulsion function defined by formula (5) still requires further exploration. Furthermore, it is an interesting question to investigate how to construct the arbitrary-order Gauss least compulsion principle that contains higher-order derivatives or higher-order constraints.