- #1
Frank Castle
- 580
- 23
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)?
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)?