# Writing $\dot{q}$ in terms of $p$ in the Hamiltonian formulation

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?

Yes, of course that the $p$-$v$ relationship may be transcendental so that it cannot be inverted in terms of elementary functions. That doesn't mean that the inverse function doesn't exist, however. Even functions that can't be written down in terms of elementary functions may exist.

For example, consider the Lagrangian $$L =\exp(bv^2)\cdot mv^2$$ It implies $$p = \frac{dL}{dv} = \exp(bv^2)(2mbv^3+2mv)$$ which can't be inverted in terms of elementary functions $v=v(p)$. However, the function $v=v(p)$ still exists – although these velocity-momentum relationships aren't necessarily one-to-one in all cases.

• What do you mean by "elementary function" here? – Kitchi Dec 29 '12 at 18:49
• @Kitchi I think Lubos is using the standard definition. – mmc Dec 29 '12 at 22:30

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.)

• Is constraint (4) follows from the (2) and (3), or separate? – unsym Dec 29 '12 at 17:53
• @hwlau: Eq. (4) is essentially a repetition of eqs. (2) and (3). – Qmechanic Dec 29 '12 at 17:57
• Is it just conincident, or are they always true for this type of primary constraint – unsym Dec 29 '12 at 17:59
• @hwlau: The primary constraints are always a subset of the relations $p_i=\frac{\partial L}{\partial \dot{q}^i}$. – Qmechanic Dec 29 '12 at 18:03
• @hwlau read Dirac's "Lectures on Quantum Mechanics," chapter one is presented in a clear way IMO, and covers this topic. – kηives Dec 29 '12 at 18:21

There are two different but related issues here.

First, the existence of $\dot{q} = \dot{q}(p)$ is guaranteed in the Hamiltonian formalism by virtue of the first Hamilton equation

$$\dot{q} = \frac{\partial H}{\partial p}$$

because $H=H(p,q)$, and the partial derivative will be a function of the $(p,q)$ per ordinary mathematical reasoning. Notice that your $\dot{q} = \dot{q}(p)$ is only valid for special cases such as a free particle.

Second, what you are really asking here is if one can obtain a Hamiltonian from any Lagrangian. Basically this question reduces to if the Lagrangian relation

$$p = p(q,\dot{q}) = \frac{\partial L}{\partial \dot{q}},$$

where $L=L(q,\dot{q})$, can be always inverted to obtain $\dot{q} = \dot{q}(p,q)$. The answer is negative.

If the total Lagrangian can be written as

$$L = \alpha_0 L_0 + \alpha_1 L_1 + \alpha_2 L_2$$

where $L_j$ denotes a homogeneous function of $j$ degree and the $\alpha_j$ are constants, then the Lagrangian momentum $p = p(q,\dot{q})$ can be always inverted to obtain the velocity. See Goldsteins Classical Mechanics sections 2.7 and 8.1 for details.

For instance, the Lagrangian momentum for a single charged particle in an external electromagnetic field can be inverted and you can obtain the Hamiltonian $H$ from the Lagrangian $L$.

The Lagrangian for two charged particles interacting between them is an example of the contrary. This is the reason why Wheeler and Feynman promised a Hamiltonian formulation for their many-body electrodynamics but failed to find one.