## Variables… and Varying Constants

An important motivation for this blog is to reflect upon well-known topics in theoretical physics, searching for alternatives to the trodden paths, offering speculations, techniques, and anything that can give a new perspective without inventing hidden dimensions or invisible universes, but sticking instead to methods that, so I think, have some leftover juice to squash.

In analytical mechanics textbooks you’ll find the Lagrange-multipliers technique for solving constrained dynamical systems. There’s also Hamilton’s formulation of mechanics, as well as Poisson brackets. You may remember a limitation of both methods, Hamilton and Poisson, when dealing with constraints. After thinking intermittently but stubbornly over this question I’ve come up with a way of overcoming that limitation. I show it here and submit it to anybody who cares to make observations, objections, expansions; or hopefully, tell me they’ve found it useful. My ultimate goal is its application in the quantum formalism, but if anybody finds any benefit (or limitation that has escaped me) for systems of mechanical rollers, that’s welcome too.

Orthodoxy says: There is no method of Lagrange multipliers in Hamilton’s formulation of mechanics. I will prove that there is such a method, besides the one proposed by Dirac in the 60’s. But before that I’ll have to turn the question around a couple of times to see that our ancestors perhaps gave up too soon. I’ll briefly explain what are the methods of Lagrange, Hamilton and Poisson.

## Lagrange’s Method

Generalised coordinates: $q_{1},\cdots,q_{n}$. It is the set of parameters (functions of time $q_{i}\left(t\right)$) that specify a configuration (position) of the system.

Action:

$S=\int dtL\left(q,\dot{q}\right)\qquad\textrm{(A)}$

Lagrange’s formulation of mechanics tells us that the action is stationary (doesn’t change at $1\textsuperscript{st}$ order in the variation parameters) under infinitesimal transformations (small arbitrary changes in coordinates and velocities). If one varies (A) under small arbitrary changes $q\mapsto q+\delta q$, $q\mapsto\dot{q}+\delta\dot{q}$, that are also time-independent and vanish at the limits of integration, one finds,

$\frac{d}{dt}\frac{\partial L'}{\partial\dot{q}}-\frac{\partial L'}{\partial q}=0\qquad\textrm{(EL)}$

named Euler-Lagrange equations, and equivalent to Newton’s. $L$ is called Lagrange’s function or Lagrangian, and for all we care it’s just the kinetic minus the potential energy.

## Hamilton’s Method

Hamilton’s method is based on a change of variables plus the introduction of $H$, called the system’s Hamiltonian, that starts life as an auxiliary function and ends up claiming center stage in physics:

$q,\dot{q}\longmapsto q,p_{q}\qquad\textrm{(h.i)}$

$p_{q}=\frac{\partial L}{\partial\dot{q}}\qquad\textrm{(h.ii)}$

$H=\sum_{q}p_{q}\dot{q}-L\qquad\textrm{(h.iii)}$

It must be understood that $\dot{q}=\dot{q}\left(q,p\right)$ and therefore $L=L\left(q,\dot{q}\left(q,p\right)\right)$. But making these substitutions in order to prove Hamilton’s eqs. is the wrong way. The easy proof can be found, e. g., on Wikipedia and is based on differentials:

$dH=\sum_{q}\left(\frac{\partial H}{\partial q}dq+\frac{\partial H}{\partial p_{q}}dp_{q}\right)$

$dL=\sum_{q}\left(\frac{\partial L}{\partial q}dq+\frac{\partial L}{\partial\dot{q}}d\dot{q}\right)=$

$=\sum_{q}\frac{\partial L}{\partial q}dq+\sum_{q}p_{q}d\dot{q}=\sum_{q}\frac{\partial L}{\partial q}dq+d\left(\sum_{q}p_{q}\dot{q}\right)-\sum_{q}\dot{q}dp_{q}\Rightarrow$

$d\left(\sum_{q}p_{q}\dot{q}-L\right)=dH=\sum_{q}\dot{q}dp_{q}-\sum_{q}\frac{\partial L}{\partial q}dq\Rightarrow$

$\sum_{q}\left(\frac{\partial H}{\partial q}dq+\frac{\partial H}{\partial p_{q}}dp_{q}\right)=\sum_{q}\left(\dot{q}dp_{q}-\frac{\partial L}{\partial q}dq\right)$

Hamilton’s equations are thus,

$\frac{\partial H}{\partial q}=-\dot{p}_{q}\qquad\textrm{(H.i)}$

$\frac{\partial H}{\partial p_{q}}=\dot{q}\qquad\textrm{(H.ii)}$

## Poisson’s Bracket

Poisson’s bracket is a refined technique used to express the same with equations that make manifest the symmetry between positions and momenta in mechanics. They have a very profound geometric meaning, which is beautiful, with corollaries such as: For every motion with a certain $\left(q,p\right)$ there is a “dual” one with the corresponding $\left(Q,P\right)$, and $Q=p$; $P=-q$. But unfortunately we have to ignore these mathematical-physics delicatessen.

$\left\{ A,B\right\} _{P}=\sum_{q}\left(\frac{\partial A}{\partial q}\frac{\partial B}{\partial p_{q}}-\frac{\partial B}{\partial q}\frac{\partial A}{\partial p_{q}}\right)$

Using (H.i) and (H.ii):

$\dot{A}=\sum_{q}\left(\frac{\partial A}{\partial q}\dot{q}+\frac{\partial A}{\partial p_{q}}\dot{p}_{q}\right)+\frac{\partial A}{\partial t}=$

$=\sum_{q}\left(\frac{\partial A}{\partial q}\frac{\partial H}{\partial p_{q}}-\frac{\partial A}{\partial p_{q}}\frac{\partial H}{\partial q}\right)+\frac{\partial A}{\partial t}=\left\{ A,H\right\} _{P}+\frac{\partial A}{\partial t}$

So differentiating a dynamical function (that doesn’t depend explicitly on time) with respect to time is equivalent to “bracketing” it with the Hamiltonian.

## Constraints

Constraints are mechanical limitations, conditions that make the coordinates mutually dependent.  In the more general instance, they are expressed by means of equations, or perhaps inequalities. There are many kinds, with resounding names like holonomic, schleronomic, rheonomic… I’m interested in those that can be written as:

Constraint equations: $Q\left(q,\dot{q}\right)=0$, however they are named.

### Method of Lagrange multipliers

Constraint equation:

$Q=0$

New Lagrangian:

$L\mapsto L'=L+\lambda Q$

Euler-Lagrange equations for the system with constraints:

$\frac{d}{dt}\frac{\partial L'}{\partial\dot{q}}-\frac{\partial L'}{\partial q}=0\qquad\textrm{(i)}$

$\frac{d}{dt}\frac{\partial L'}{\partial\dot{\lambda}}-\frac{\partial L'}{\partial\lambda}=0\qquad\textrm{(ii)}$

As $\partial L'/\partial\dot{\lambda}=0$ y $\partial L'/\partial\lambda=Q$, this gives,

$\frac{d}{dt}\frac{\partial L}{\partial\dot{q}}-\frac{\partial L}{\partial q}=-\lambda\left(\frac{d}{dt}\frac{\partial Q}{\partial\dot{q}}-\frac{\partial Q}{\partial q}\right)\qquad\textrm{(L.i)}$

$Q=0\qquad\textrm{(L.ii)}$

What occurs on the right multiplying $\lambda$ in eqs. (L.i) are the forces of constraint. The component $\left(d/dt\right)\left(\partial Q/\partial\dot{q}_{a}\right)-\partial Q/\partial q_{a}$ is the component of the force of constraint along the direction corresponding to generalised coordinate $q_{a}$; and eq. (L.ii) is precisely the constraint equation. A more pedestrian method of solving the problem (alternative to the previous one) is to use the constraint equations in order to reduce the number of variables, and then make the change of variables reducing the dimension of the problem:

$r_{b}=r_{b}\left(q_{1},\cdots q_{n}\right)$

and with the new variables $r_{1},\cdots,r_{m}$, with $m, set up the variational problem and obtain the reduced equations directly:

$\frac{d}{dt}\frac{\partial L_{R}}{\partial\dot{r}}-\frac{\partial L_{R}}{\partial r}=0\qquad\textrm{(iii)}$

where $L_{R}$ is $L_{R}\left(r\left(q,\dot{q}\right),\dot{r}\left(q,\dot{q}\right)\right)=L\left(q,\dot{q}\right)$.

But the advantage of the method of Lagrange multipliers is that it allows us to obtain the forces of constraint. This can be useful in engineering, where forces of constraint are of interest, because materials do not satisfy an equation of constraint indefinitely, but, on the contrary, they suffer from mechanical fatigue and plastic deformations, so they slowly change their condition. Presumably also they are of interest in quantum mechanics as, provided they have been produced dynamically, the corresponding systems will undergo quantum fluctuations around the condition of constraint.

## Problems with constraints

When one has constraints, classical treatises go, one cannot use Hamilton’s method. Let’s see why. Describing a constraint forces us to expand

the configuration space by including a “variable” $\lambda$, and the reason for the quotation marks is because it’s really a constant.

You have to be a magician if you’re going to describe correctly a system with less degrees of freedom by introducing more degrees of freedom. Although a constant is no typical degree of freedom, considering it as such only to the effect of applying infinitesimal variations to it, allows us to deduce the equation of constraint as another Euler-Lagrange equation. It is equation (ii), recovering condition $Q=0$. The problem with Hamilton is that we need to introduce an associated canonical momentum $p_{\lambda}$ for fictitious coordinate $\lambda$ which, being zero by definition, does not allow for infinitesimal variations. (Dirac solved this by introducing condition $p_{\lambda}=0$ as a constraint and proceeding to repeatedly use Poisson’s bracket, adding successive Lagrange multipliers while crossing your fingers so that, at a low order of iteration, Poisson-bracketing each constraint with the expanded Hamiltonian gives zero identically!) Methodologically speaking this is next to praying. What we wish is to have a way of introducing this momentum variable only to find later that it vanishes as a consequence of the evolution equations. Let’s see how is this possible.

## First Idea (Fail):

$L\mapsto L'=L+\lambda\dot{\lambda}+\lambda Q$

The idea is adding a total time derivative of an otherwise arbitrary function of our “dynamical variable” $\lambda$. If we do that,

the evolution equations are unchanged:

$\frac{d}{dt}\frac{\partial L'}{\partial\dot{q}}-\frac{\partial L'}{\partial q}=\frac{d}{dt}\frac{\partial}{\partial\dot{q}}\left(L+\lambda\dot{\lambda}+\lambda Q\right)-\frac{\partial}{\partial q}\left(L+\lambda\dot{\lambda}+\lambda Q\right)=$

$=\frac{d}{dt}\frac{\partial L}{\partial\dot{q}}-\frac{\partial L}{\partial q}+\lambda\left(\frac{d}{dt}\frac{\partial Q}{\partial\dot{q}}-\frac{\partial Q}{\partial q}\right)=0$

$\frac{d}{dt}\frac{\partial L'}{\partial\dot{\lambda}}-\frac{\partial L'}{\partial\lambda}=\frac{d}{dt}\frac{\partial}{\partial\dot{\lambda}}\left(\lambda\dot{\lambda}+\lambda Q\right)-\frac{\partial}{\partial \lambda}\left(\lambda\dot{\lambda}+\lambda Q\right)=\dot{\lambda}-\dot{\lambda}-Q=-Q=0$

which reduces to,

$\frac{d}{dt}\frac{\partial L}{\partial\dot{q}}-\frac{\partial L}{\partial q}=$

$=-\lambda\left(\frac{d}{dt}\frac{\partial Q}{\partial\dot{q}}-\frac{\partial Q}{\partial q}\right)\qquad\textrm{(ELC.i)}$

$Q=0\qquad\textrm{(ELC.ii)}$

So far, so good. Constraint force happens on the RHS “connected” to the problem via the constant $\lambda$. The variational equation for $\lambda$ is no other than the constraint equation. The problem is that, if we want to translate this to Hamiltonian language, we have defined a canonical momentum $p_{\lambda}$ being,

$p_{\lambda}=\frac{\partial L'}{\partial\dot{\lambda}}=\lambda$

This does not vanish identically, though there is no doubt that it cannot be considered as a variable analytically independent from $\lambda$. In fact, the problem arises even before, when we try to express the velocities as functions of the momenta. Remember $H\left(q,p_{q}\right)$ only makes sense when we can express the velocities in terms of both coordinates and momenta. As $\dot{\lambda}$ has disappeared in the relation that defines the associated canonical momentum, it is not possible to solve. That’s why sometimes you find the observation, without much explanation, (see, e. g., Wikipedia) that it is not possible to use a relation that is linear in $\dot{\lambda}$ for these auxiliary parameters. Why? That’s why.

In order to present my method, it is convenient to recall what a variational derivative is. There is practically no book (not at least the best known) in field theory that uses this more general definition of variational derivative. Although physicists in general are blissfully ignorant of this more general definition, I’m sure mathematicians who are well versed in variational calculus are familiar with it. If a Lagrangian depends on an arbitrarily high order of derivatives; $L=L\left(q,\dot{q},\ddot{q},\cdots\right)$ the variational derivative is:

$\frac{\delta L}{\delta q}=\frac{\partial L}{\partial q}-\frac{d}{dt}\frac{\partial L}{\partial\dot{q}}+\frac{d^{2}}{dt^{2}}\frac{\partial L}{\partial\ddot{q}}-\cdots=\sum_{n=0}^{\infty}\left(-1\right)^{n}\frac{d^{n}}{dt^{n}}\frac{\partial L}{\partial q^{\left(n\right)}}$

The Euler-Lagrange equations for this case generalise to,

$\frac{\delta L}{\delta q}=0\qquad\textrm{(G.EL})$

which looks simple, but is actually infinitely more complicated, and will be important only to order 2.

In our case of interest there are several:

### Glitches

1) In a generic system, with both constraints and potential being velocity-dependent, it may be difficult, if not impossible, to express the $\dot{q}$‘s as functions of the $p_{q}$‘s

2) $f$ cannot be linear in $\dot{\lambda}$, otherwise $\partial/\partial\dot{\lambda}$ will kill $\dot{\lambda}$ and we won’t be able to express $\dot{\lambda}$ as a function of $p_{\lambda}$

3) Should $f$ be independent of $\dot{p}_{\lambda}$?

Glitch 1) we just have to live with and hope for the best; glitch 2) is solved by observing it and writing a $2\textsuperscript{nd}$-order $f$; and glitch 3) is too pessimistic or only apparent: In fact, I have included it only to prepare the reader who might be surprised by a dependence on $\dot{p}_{\lambda}$; which, in reality, is not only consistent, but necessary: It is the equations of motion that should not depend on $\ddot{\lambda}$ (o $\dot{p}_{\lambda}$); as we will see, the Hamiltonian can depend on $\dot{p}_{\lambda}$ and everything goes through. Actually, it must depend on $\dot{p}_{\lambda}$ for the term in $\dot{p}_{\lambda}$ to disappear from the Hamilton equations.

But the real glitch is:

4) The canonical momentum $p_{\lambda}$ is no longer a linear function of the velocities, but it depends on the accelerations! How does that work if $p_{\lambda}=\partial L/\partial\dot{\lambda}$?

The solution of this is shown next.

## The idea corrected

These are the steps:

1) Generalise Lagrange’s method by including a total time derivative with the appropriate function $f\left(\lambda\right)$. This function of $\lambda$ must depend at least on a $2\textsuperscript{nd}$-order derivative by the time:

$L\mapsto L''=L+\frac{d}{dt}f\left(\lambda,\dot{\lambda}\right)+\lambda Q$

2) Generalise the definition of the variational derivative by $\lambda$ to a dependence in higher orders of time derivation. Order 2 will suffice:

$\frac{\delta L''}{\delta\lambda}=\frac{\partial L''}{\partial\lambda}-\frac{d}{dt}\frac{\partial L''}{\partial\dot{\lambda}}+\frac{d^{2}}{dt^{2}}\frac{\partial L''}{\partial\ddot{\lambda}}$

3) Generalise the definition of the canonical momentum associated to coordinate $\lambda$ in a way that completely parallels the extension we have practised on the variational derivative. If,

$\frac{d}{dt}f\left(\lambda,\dot{\lambda}\right)=\frac{\partial f}{\partial\lambda}\dot{\lambda}+\frac{\partial f}{\partial\dot{\lambda}}\ddot{\lambda}$

then,

$p_{\lambda}=\frac{\partial L''}{\partial\dot{\lambda}}-\frac{d}{dt}\frac{\partial L''}{\partial\ddot{\lambda}}=$

$=\frac{\partial f}{\partial\lambda}+\frac{\partial^{2}f}{\partial\lambda\partial\dot{\lambda}}\dot{\lambda}+\ddot{\lambda}\frac{\partial^{2}f}{\partial\dot{\lambda}^{2}}-\left(\dot{\lambda}\frac{\partial^{2}f}{\partial\lambda\partial\dot{\lambda}}+\ddot{\lambda}\frac{\partial^{2}f}{\partial\dot{\lambda}^{2}}\right)=\frac{\partial f}{\partial\lambda}$

Checking that the system so extended satisfies exactly the same Euler-Lagrange equations is easy: as we have only added a total derivative, equations (ELC.i) and (ELC.ii) are the same. The interesting part is prove that the Hamilton formalism goes through:

$dL''=\sum_{q}\left(\frac{\partial L''}{\partial q}dq+\frac{\partial L''}{\partial\dot{q}}d\dot{q}\right)+\frac{\partial L''}{\partial\lambda}d\lambda+\frac{\partial L''}{\partial\dot{\lambda}}d\dot{\lambda}+\frac{\partial L''}{\partial\ddot{\lambda}}d\ddot{\lambda}+\frac{\partial L''}{\partial t}dt$

$dH''=\sum_{q}\left(\frac{\partial H''}{\partial q}dq+\frac{\partial H''}{\partial p_{q}}dp_{q}\right)+\frac{\partial H''}{\partial\lambda}d\lambda+\frac{\partial H''}{\partial p_{\lambda}}dp_{\lambda}+\frac{\partial H''}{\partial t}dt$

$p_{\lambda}=\frac{\partial L''}{\partial\dot{\lambda}}-\frac{d}{dt}\frac{\partial L''}{\partial\ddot{\lambda}}$

Euler-Lagrange:

$\frac{\partial L''}{\partial q}=\frac{d}{dt}\frac{\partial L''}{\partial\dot{q}}=\dot{p}_{q}$

$\frac{\partial L''}{\partial\lambda}=\frac{d}{dt}\frac{\partial L''}{\partial\dot{\lambda}}-\frac{d^{2}}{dt^{2}}\frac{\partial L''}{\partial\ddot{\lambda}}=\dot{p}_{\lambda}$

Suppose there is no explicit time dependence (only to simplify):

$\frac{\partial L''}{\partial t}=\frac{\partial H''}{\partial t}=0$

The proof that goes next is somewhat tedious; if you are bored, go directly to the example next in order to convince yourself that everything really works. The proof completely parallels the deduction I gave of the Hamilton eqs. from the Euler-Lagrange ones. From,

$dL''=\sum_{q}\left(\frac{\partial L''}{\partial q}dq+p_{q}d\dot{q}\right)+\frac{\partial L''}{\partial\lambda}d\lambda+\frac{\partial L''}{\partial\dot{\lambda}}d\dot{\lambda}+\frac{\partial L''}{\partial\ddot{\lambda}}d\ddot{\lambda}$

it’s not hard to prove,

$dH''=\sum_{q}\dot{q}dp_{q}+\dot{\lambda}dp_{\lambda}-\sum_{q}\frac{\partial L''}{\partial q}dq-\frac{\partial L''}{\partial\lambda}d\lambda-\frac{d}{dt}\left(\frac{\partial L''}{\partial\ddot{\lambda}}d\dot{\lambda}\right)$

Equating this to,

$dH''=\sum_{q}\left(\frac{\partial H''}{\partial q}dq+\frac{\partial H''}{\partial p_{q}}dp_{q}\right)+\frac{\partial H''}{\partial\lambda}d\lambda+\frac{\partial H''}{\partial p_{\lambda}}dp_{\lambda}$

we obtain,

$\sum_{q}\left(\dot{q}dp_{q}-\dot{p}_{q}dq\right)+\dot{\lambda}dp_{\lambda}-\dot{p}_{\lambda}d\lambda-\frac{d}{dt}\left(\frac{\partial L''}{\partial\ddot{\lambda}}d\dot{\lambda}\right)=$

$=\sum_{q}\left(\frac{\partial H''}{\partial q}dq+\frac{\partial H''}{\partial p_{q}}dp_{q}\right)+\frac{\partial H''}{\partial\lambda}d\lambda+\frac{\partial H''}{\partial p_{\lambda}}dp_{\lambda}$

That is, Hamilton’s eqs. are satisfied:

$\frac{\partial H''}{\partial q}=-\dot{p}_{q}\qquad\textrm{(HE.i)}$

$\frac{\partial H''}{\partial p_{q}}=\dot{q}\qquad\textrm{(HE.ii)}$

$\frac{\partial H''}{\partial\lambda}=-\dot{p}_{\lambda}\qquad\textrm{(HE.iii)}$

$\frac{\partial H}{\partial p_{\lambda}}=\dot{\lambda}\qquad\textrm{(HE.iv)}$

$\frac{\partial L''}{\partial\ddot{\lambda}}=0\qquad\textrm{(HE.v)}$

The most important part by far on the previous equations is that the canonical momentum $p_{\lambda}$ is not identically zero, neither it is a simple function of $\lambda$ coordinates. Its vanishing is deduced later, as a consequence of the evolution equations, so that it is an independent variable and the system can be endowed with a Hamiltonian structure.

## Example

$L=\frac{1}{2}m_{1}\dot{q_{1}}^{2}+\frac{1}{2}m_{1}\dot{q_{1}}^{2}-V\left(q_{1},q_{2}\right)$

$Q\left(q_{1},q_{2}\right)=0$

The Hamiltonian is,

$H''=p_{q_{1}}\dot{q}_{1}+p_{q_{2}}\dot{q}_{2}+p_{\lambda}\dot{\lambda}-L''=$

$=p_{q_{1}}\frac{p_{q_{1}}}{m_{1}}+p_{q_{2}}\frac{p_{q_{2}}}{m_{2}}+p_{\lambda}^{2}-\frac{p_{q_{1}}^{2}}{2m_{1}}-\frac{p_{q_{2}}^{2}}{2m_{2}}-p_{\lambda}^{2}-\lambda\dot{p}_{\lambda}-\lambda Q+V=$

$=\frac{p_{q_{1}}^{2}}{2m_{1}}+\frac{p_{q_{2}}^{2}}{2m_{2}}-\lambda\dot{p}_{\lambda}-\lambda Q+V$

The $1\textsuperscript{st}$ pair of Hamilton eqs. for the $q$‘s is of the form ($\partial_{q}H''=-\lambda\partial_{\dot{q}}Q+\partial_{q}V$):

$-\lambda\frac{\partial Q}{\partial\dot{q_{i}}}+\frac{\partial V}{\partial q_{i}}=-\dot{p}_{q_{i}},\: i=1,2$

coinciding with,

$\frac{d}{dt}\frac{\partial L}{\partial\dot{q}_{i}}-\frac{\partial L}{\partial q_{i}}+\lambda\left(\frac{d}{dt}\frac{\partial Q}{\partial\dot{q}_{i}}-\frac{\partial Q}{\partial q_{i}}\right)=0\Rightarrow\dot{p}_{q_{i}}+\frac{\partial V}{\partial q_{i}}-\lambda\frac{\partial Q}{\partial q_{i}}=0$

And the $2\textsuperscript{nd}$ ($\partial_{p_{q}}H''=p_{q}/m$):

$\frac{p_{q_{i}}}{m_{i}}=\dot{q}_{i},\: i=1,2$

Those for $\lambda$, next. $1\textsuperscript{st}$ ($\partial_{\lambda}H''=-\dot{p}_{\lambda}-Q$):

$-\dot{p}_{\lambda}-Q=-\dot{p}_{\lambda}$

$2\textsuperscript{nd}$($\partial_{p_{\lambda}}H''=0$):

$0=\dot{\lambda}$

Regrouping all Hamilton eqs. for the constrained system, we have,

$\dot{p}_{q_{i}}=\lambda\frac{\partial Q}{\partial q_{i}}-\frac{\partial V}{\partial q_{i}},\: i=1,2\qquad\textrm{(E.i)}$

$\frac{p_{q_{i}}}{m_{i}}=\dot{q}_{i},\: i=1,2\qquad\textrm{(E.ii)}$

$Q=0\qquad\textrm{(E.iii)}$

$\dot{\lambda}=0\qquad\textrm{(E.iv)}$

## What About the Poisson Brackets?

Does all of this work for Poisson brackets? Yes, it does. Let’s see how. Remember that, from the beginning, the equations to be recovered are (E.i)-(E.iv). We omit now the bothersome index $i$ in $q_{i}$ (both $q$‘s satisfy analogous equations):

$\dot{q}=\left\{ q,H''\right\} _{P}=\left\{ q,\frac{p_{q}^{2}}{2m}\right\} _{P}=2\frac{1}{2m}\left\{ q,p_{q}\right\} _{P}p_{q}=\frac{p_{q}}{m}$

$\dot{p}_{\lambda}=\left\{ p_{\lambda},H''\right\} _{P}=\left\{ p_{\lambda},-\lambda\dot{p}_{\lambda}\right\} _{P}-\left\{ p_{\lambda},\lambda Q\right\} _{P}=\dot{p}_{\lambda}+Q\Rightarrow Q=0$

$\dot{\lambda}=\left\{ \lambda,H''\right\} _{P}=\left\{ \lambda,-\lambda\dot{p}_{\lambda}\right\} _{P}+\left\{ \lambda,-\lambda Q\right\} _{P}=-\lambda\left\{ \lambda,\dot{p}_{\lambda}\right\} _{P}=0$

$\left\{ \lambda,\dot{p}_{\lambda}\right\} _{P}$ is zero because:

$\left\{ \lambda,p_{\lambda}\right\} _{P}=1\Rightarrow\left\{ \lambda,\dot{p}_{\lambda}\right\} _{P}+\left\{ \dot{\lambda},p_{\lambda}\right\} _{P}=\left\{ \lambda,\dot{p}_{\lambda}\right\} _{P}=0$

The last equation is,

$\dot{p}_{q}=\left\{ p_{q},H''\right\} _{P}=\left\{ p_{q},\frac{p_{q}^{2}}{2m}\right\} _{P}+\left\{ p_{q},-\lambda Q\right\} _{P}+\left\{ p_{q},V\left(q\right)\right\} _{P}=$

$=-\lambda\left\{ p_{q},Q\right\} _{P}+\left\{ p_{q},V\left(q\right)\right\} _{P}=\lambda\frac{\partial Q}{\partial q}-\frac{\partial V}{\partial q}$

Consequently:

$m_{i}\dot{q}_{i}=p_{q_{i}}$

$\dot{p}_{q_{i}}=\lambda\frac{\partial Q}{\partial q_{i}}-\frac{\partial V}{\partial q_{i}}$

$Q=0$

$\dot{\lambda}=0$

Conclusion: Hamilton’s method for systems with constraints can be used. The price to pay is generalising the variational derivative with respect to the Lagrange multiplier to higher orders of time derivation and extending in close analogy the definition of the associated canonical momentum.