# When can I substitute transformations into the Hamiltonian?

1. Mar 28, 2015

### Coffee_

1. If I know that $H(q_i,p_i,t)$ is a valid Hamiltonian for which the hamilton equations hold. Now we are given that $Q_j(q_i,p_i)$ and $P_j(q_i,p_i)$ are canonical transformations. This means that there is a function $K(Q_j,P_j)$, the new hamiltonian, for which the Hamilton equations hold in the new variables.

QUESTION : What is this new function $K$? Can I just substitute the transformations into the old $H$ to find $K$? If not, when is this allowed?

Reason for confusion: My notes from class tell me this is allowed. However any source on the net I find says that in general canonical transformations do not preserve the Hamiltonian and thus $H$ and $K$ are not always equal.

2. Mar 29, 2015

### MisterX

If P and Q depend only p and q, and the there is no additional time dependence in the coordinate transformation, then
$$K(Q, P) = H(q(Q,P), p(Q, P))$$

Otherwise it can take forms such as
$$K(Q, P) = H(q(Q,P), p(Q, P)) + \frac{\partial F_1(q(Q, P), Q, t)}{\partial t}$$
Where for this type of transformation
$$p = \frac{\partial F_1}{\partial q}$$
$$P = -\frac{\partial F_1}{\partial Q}$$
So in this case if $F_1$ has no time dependence then $K$is just $H$at the corresponding coordinates.

3. Mar 29, 2015

### Coffee_

Thanks for the answer. This is exactly what I have thought up myself by now. One more question since you seem to know the subject if you don't mind?

I'm a bit confused on the 4 ''types'' of generating functions and how their forms are found. For example for $F(q,Q,p)$ the form makes sense because it's just $F=F(q,Q,p)$, but how does one knows to add the $-QP$ when dealing with the $F(q,P,t)$ type? It seems to work out alright but I seem to not grasp how one can make these 4 distinctions so clear and so strict? What if I take $F=F(q,P,t)$ as the generating function without the $-QP$ part?