# Hamiltonian mechanics: canonical transformations

Homework Helper
Gold Member
Say I have a canonical transformation Q(q,p), P(q,p).

In the {q,p} canonical coordinates, the Hamiltonian is

$$H(q,p,t)=p\dot{q}-L(q,\dot{q},t)$$

And the function $K(Q,P,t)=H(q(Q,P),p(Q,P),t)$ plays the role of hamiltonian for the canonical coordinates Q and P in the sense that

$$\dot{Q}=\frac{\partial K}{\partial P}, \ \ \ \ \ \ -\dot{P}=\frac{\partial K}{\partial Q}$$

My question is this: must I first express all the $\dot{q}$ in there in terms of q and p before transforming my Hamiltonian into $K(Q,P,t)=H(q(Q,P),p(Q,P),t)$, or can I just compute $\dot{q}(Q,\dot{Q},P,\dot{P})$ and substitute?

A priori, I would say that it is certainly not necessary and that the two ways are equivalent [that is, in the event that it is even possible to invert $p=\partial L /\partial \dot{q}$ !], but I have evidence that it's not and that the second way leads to equations of motion that are wrong. Last edited:

Homework Helper
Gold Member
I suppose I found the answer to my question on wiki:

Hamilton's equations are first-order differential equations, and thus easier to solve than Lagrange's equations, which are second-order. However, the steps leading to the equations of motion are more onerous than in Lagrangian mechanics - beginning with the generalized coordinates and the Lagrangian, we must calculate the Hamiltonian, express each generalized velocity in terms of the conjugate momenta, and replace the generalized velocities in the Hamiltonian with the conjugate momenta.

But then, wouldn't this suggest that some problems simply are not solvable in hamiltonian formulation? Namely, those for which

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

is not solvable for $\dot{q}$.

vanesch
Staff Emeritus
Gold Member
I

But then, wouldn't this suggest that some problems simply are not solvable in hamiltonian formulation? Namely, those for which

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

is not solvable for $\dot{q}$.

Nice question! Now, in most cases, the lagrangian is quadratic in q-dot, so the equations you write down are linear equations.

I guess that very exotic lagrangians might give a headache in inverting this system, though.

dextercioby
Homework Helper
I suppose I found the answer to my question on wiki:

Hamilton's equations are first-order differential equations, and thus easier to solve than Lagrange's equations, which are second-order. However, the steps leading to the equations of motion are more onerous than in Lagrangian mechanics - beginning with the generalized coordinates and the Lagrangian, we must calculate the Hamiltonian, express each generalized velocity in terms of the conjugate momenta, and replace the generalized velocities in the Hamiltonian with the conjugate momenta.

But then, wouldn't this suggest that some problems simply are not solvable in hamiltonian formulation? Namely, those for which

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

is not solvable for $\dot{q}$.

They are solvable. It's always possible to construct a coherent Hamiltonian formalism for a system which has basically an arbitrary lagrangian. It just takes a special techinique.

For example the Dirac field is completely solvable, even though the lagrangian (density) is not quadratic in "velocities"...