# Hamiltonian Formalism – Writing $\dot{q}$ in Terms of $p$ in Hamiltonian Formulation

constrained-dynamicshamiltonian-formalismlagrangian-formalism

In the Hamiltonian formulation, we make a Legendre transformation of the Lagrangian and it should be written in terms of the coordinates $q$ and momentum $p$. Can we always write $dq/dt$ in terms of $p$? Is there any case in which we obtain for example a transcendental equation and cannot do it?

Adding to Lubos Motl's correct answer, it should be stressed that one may not always invert the relation $p_i=f_i(q,\dot{q},t)$ to isolate $\dot{q}^j$, not even in principle, because of constraints. Such cases are known as singular Legendre transformations, and they are the starting point of the topic of constrained dynamics.

Example. Consider e.g. the Lagrangian

$$\tag{1} L~=~ y\dot{x} - \frac{y^2}{2m}$$

with two dynamical variables $x$ and $y$. (This Lagrangian (1) is in fact the so-called Hamiltonian Lagrangian for a non-relativistic 1D free particle if we identify the variable $y$ with the particle's momentum $p_x$, cf. the Faddeev-Jackiw method, but let's imagine we don't know that.)

Now let's go through the Legendre transformation via the Dirac-Bergmann method. The momenta are

$$\tag{2} p_x~:=~\frac{\partial L}{\partial \dot{x}}~=~y,$$

and

$$\tag{3} p_y~:=~\frac{\partial L}{\partial \dot{y}}~=~0.$$

Obviously, we cannot invert eqs. (2) and (3) to find $\dot{x}$ in terms of $x,y,p_x,p_y$ and $t$. Eqs. (2) and (3) are primary constraints,

$$\tag{4} p_x-y~\approx~ 0\quad\text{and} \quad p_y~\approx~ 0.$$

The Hamiltonian is

$$\tag{5} H~=~p_x \dot{x} +p_y \dot{y} - L ~\approx~ \frac{p^2_x}{2m},$$

where the $\approx$ symbol means equality modulo constraints (4). Indeed, it is just a non-relativistic 1D free particle, where we have used the constraints (4) to eliminate any physics in the $y$-direction. (It is easy to check that there are no secondary constraints if we use $\frac{p^2_x}{2m}$ as the Hamiltonian.)