# Order of steps on Hamiltonian canonical transformations

1. Feb 3, 2014

### carllacan

Just a little doubt.

When we are performing a canonical transformation on a Hamiltonian and we have the equations of the new coordinates in terms of the old ones we have to find the Kamiltonian/new Hamiltonian using $K = H +\frac{\partial G}{\partial t}$. My question is: do we have to derive the generating function before or after substituting the old coordinates for the new ones?

For example, in a $(q, p)\rightarrow(Q, P)$ that last derivative would be $\frac{\partial G(q, p, t)}{\partial t}$ or $\frac{\partial G(q(Q, P, t), p(Q, P, t))}{\partial t} =\frac{\partial G(Q, P, t}{\partial t}$?

2. Feb 3, 2014

### TSny

The generating function is always a function of both old and new coordinates. So it would not be of the form $G(q,p,t)$ since that would be a function of only the old coordinates.

There are four possible forms: $G(q,Q,t)$, $G(q,P,t)$, $G(p,Q,t)$, and $G(p,P,t)$.

Suppose you have the form $G(q,P,t)$. Then $q$ and $P$ would be considered independent variables in $G$.

When taking the partial derivative $\frac{\partial G(q,P,t)}{\partial t}$ you would hold $q$ and $P$ constant while taking the derivative with resepct to $t$.

Afterwards you could substitute for q in terms of $Q$ and $P$ in order to express $\frac{\partial G(q,P,t)}{\partial t}$ in terms of the new coordinates.