# I Canonical transformations and generating functions

Tags:
1. Oct 26, 2016

### Frank Castle

I've been reading about canonical transformations in Hamiltonian mechanics and I'm a bit confused about the following:

The author considers a canonical transformation $$q\quad\rightarrow\quad Q\quad ,\quad p\quad\rightarrow\quad P$$ generated by some function $G$. He then considers the case in which $G$ is a function of the (independent) variables $(p,Q)$ and notes that the integrands of the corresponding actions should differ by at most a total time derivative of $G$, such that $$p\dot{q}-H(q,p)=P\dot{Q}-\mathcal{H}(Q,P)+\frac{dG(q,Q)}{dt}\qquad (1)$$ Noting that $\frac{dG(q,Q)}{dt}=\frac{\partial G}{\partial q}\dot{q}+\frac{\partial G}{\partial Q}\dot{Q}+\frac{\partial G}{\partial t}$, he re-expresses $(1)$ as $$\left(p-\frac{\partial G}{\partial q}\right)\dot{q}-\left(P+\frac{\partial G}{\partial Q}\right)\dot{Q}=H(q,p)-\mathcal{H}(Q,P)+\frac{dG(q,Q)}{dt}\qquad (2)$$ and then immediately states that it follows that the remaining variables $(p,P)$ are now expressed by $$p=\frac{\partial G}{\partial q}\quad ,\quad P=-\frac{\partial G}{\partial Q}$$ and that the new Hamiltonian is given by $$\mathcal{H}(Q,P)=H(q,p)+\frac{dG(q,Q)}{dt}.$$

I get that this has something to do with the fact that $q$ and $Q$ are independent variables, but it is not immediately obvious to me why the above relations follow (i.e. why the coefficients on the left hand side vanish)?!

Is it simply due to the fact that the only way the time derivatives of $p$ and $Q$ can be related in general is if their coefficients are identically zero (since $\dot{q}$ and $\dot{Q}$ can vary independently of one another, but equation $(2)$ is an identity and so the only what that both sides can be equal for all values of $\dot{q}$ and $\dot{Q}$ is if their corresponding coefficients are identically zero)?

2. Oct 26, 2016

### dextercioby

Yes.

3. Oct 26, 2016

### Frank Castle

Ah ok, cool. Thanks.

@dextercioby As an aside, is it correct to say that, at a given instant in time, $t$, the function $q(t)$ and its derivative $\dot{q}(t)$ are independent of one another (since one would need to know the value of $q$ at two different times, either side of $t$, in order to determine the value of $\dot{q}$ at $t$, entirely from the knowledge of $q$)?!

Last edited: Oct 26, 2016
4. Oct 27, 2016

### vanhees71

Well (2), and consequently the equation for the Hamiltonian are wrong. More generally you have an explicitly time-dependent generator, $G$, and then (1) leads to
$$p \cdot{q}-H=P \dot{Q}-H'+\frac{\mathrm{d}}{\mathrm{d} t} G=P \dot{Q}-H'+\dot{Q} \partial_Q G+ \dot{q} \partial_q G + \partial_t G,$$
where the latter partial time derivative means the derivative due to the explicit time dependence. Now writing this as a total differential and ordering you get
$$(p-\partial_q G) \mathrm{d} q - (P+\partial_Q G) \mathrm{d} Q + (H'-H -\partial_t G) \mathrm{d} t=0.$$
Now taking $q$, $Q$, and $t$ as the independent variables as "natural" for this choice of the generator, this implies that
$$p=\partial_q G, \quad P=-\partial_Q G, \quad H'=H+\partial_t G.$$

5. Oct 27, 2016

### Frank Castle

Whoops, yes I had meant to write (2) with a partial derivative (I copied and pasted and forgot to change the LaTex).

Is the point that since $q$, $Q$ and $t$ are independent, their respective differentials $dq$, $dQ$ and $dt$ will be mutually independent and so the only way they can be related by the equation $$(p-\partial_q G) \mathrm{d} q - (P+\partial_Q G) \mathrm{d} Q + (H'-H -\partial_t G) \mathrm{d} t=0$$ is if their coefficients are identically zero?!

Is it also correct to say that $q$ and $\dot{q}$, evaluated at a given instant in time, $\tau$ are mutually independent, since one would require the knowledge of the values of $q$ at an earlier (or later) time as well as at time $\tau$ in order to determine the value of $\dot{q}$ at $\tau$ solely from $q$?!

6. Oct 27, 2016

### vanhees71

Yes, in the Lagrange formalism $q$ and $\dot{q}$ are independent variables. Only when inserting a trajectory $q=q(t)$ you get $\dot{q}=\mathrm{d} q/\mathrm{d} t$. This is often leading to confusion, and that's why it is so important to distinguish the meaning between $\partial_t$ and $\mathrm{d}/\mathrm{d} t$.

In the Hamiltonian formalism you trade the $\dot{q}$ by the canonical momenta $p$. The Lagrange formalism and the Hamilton formalism are connected by a Legendre transformation.

7. Oct 27, 2016

### Frank Castle

In the Lagrange formalism though isn't the point that one considers points, $(q,\dot{q})$ in the tangent bundle over some manifold, where $q$ and $\dot{q}$ are points in the base manifold and the tangent space over $q$ respectively. As such they can (locally) be varied independently of one another (one can choose a tangent vector, $\dot{q}$ and then a point $q$, or vice verse - the choice of one does not affect the choice of the other). It is only when one chooses to evaluate them along a trajectory in the tangent bundle, such that $(q,\dot{q})=\left(q(t),\dot{q}(t)\right)$ and further stipulates that the trajectory be the tangent lift of some trajectory in the base manifold, such that $\dot{q}(t)=\frac{dq(t)}{dt}$ (such that it corresponds to a physical trajectory), that the two variables become connected?!

I think what has confused me in this case is that the author has already considered $q$ and $Q$ as functions of $t$ and then taken their time derivatives, $\dot{q}=\frac{dq}{dt}$ and $\dot{Q}=\frac{dQ}{dt}$. In this case it doesn't seem immediately obvious, in the form that is written in the text, $$\left(p-\frac{\partial G}{\partial q}\right)\dot{q}-\left(P+\frac{\partial G}{\partial Q}\right)\dot{Q}=H(q,p)-\mathcal{H}(Q,P)+\frac{\partial G(q,Q)}{\partial t}\qquad$$ that the coefficients of $\frac{dq}{dt}$ and $\frac{dQ}{dt}$ must vanish identically?! I get that they are independent of one another and hence their derivatives should not (in general) be related, but what the right hand side of the equation is a function of $q$ and $Q$ and so couldn't the left hand side be related to the right in some non-trivial way (since $q$ and $Q$ and $\dot{q}$ and $\dot{Q}$ are related)?!

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted