# Can all canonical transformations be generated using a generating function?

In Classical Mechanics, a gauge transformation is of the form $$$$L \to L' = L + \frac{dF(q,t)}{dt} \, .$$$$ Any transformation of this kind leaves the Euler-Lagrange equation invariant since the additional term $$\frac{dF(q,t)}{dt}$$ here simply drops out.

In contrast, the Euler-Lagrange equation is, in general, only covariant under point transformations $$q \to Q=Q(q,t)$$. Concretely, the Euler-Lagrange equation reads in the original coordinates $$$$\frac{\partial \mathcal{L}(q,\dot q,t)}{\partial q}= \frac{d}{dt}\left(\frac{\partial \mathcal{L}(q,\dot q,t)}{\partial \dot{q}}\right)$$$$ and in terms of the new coordinates $$$$\frac{\partial \mathcal{L}'(Q,\dot Q,t)}{\partial Q}= \frac{d}{dt}\left(\frac{\partial \mathcal{L}'(Q,\dot Q,t)}{\partial \dot{Q}}\right)$$$$ But, in general, we have $$\mathcal{L}'(Q,\dot Q,t) \neq \mathcal{L}(Q,\dot Q,t) \, .$$ Therefore, under a general coordinate transformations the Euler-Lagrange equation keeps its form but is not invariant.

Now, in the Hamiltonian formalism we consider phase space transformations and usually focus on canonical transformations. The defining condition of canonical transformation is Hamilton's equations keep their form, i.e. is covariant.

However, in a second step, canonical transformations are usually discussed using so-called generating functions. These show up if we derive Hamilton's equations using the least-action principle for the Hamiltonian Lagrangian $$L_H = p \dot q- H \,.$$ The main argument is that if we want to end up with the same equation if we switch coordinates, we have the condition $$L_H - L_H' = \frac{dF}{dt}$$ $$\therefore \quad p \dot q- H - (P \dot Q- K) = \frac{dF}{dt} \, ,$$ where $$K= H(q(Q,P),p(Q,P)$$ is the Hamiltonian in terms of the new coordinates $$Q,P$$. In words, this means that a transformation $$q,p \to Q,P$$ which leads to at most a change in the Lagrangian Hamiltonian which can be written as a total derivative, yields same Hamilton equations.

However, as far as I understand it, this is a extremely strict condition which only includes transformation that leave Hamilton's equation invariant. But, as argued above, a general canonical transformation is only required to leave the form of Hamilton's equations unchanged.

Therefore my question: Can all canonical transformations be generated using a generating function?

Following my reasoning above, it seems that since for general canonical transformations we only require the covariance of Hamilton's equations, these are not included in the generating function analysis which is based on the condition that Hamilton's equations are invariant.

• ah yes, thanks. My problem was that point transformations do not lead to a shift of the Lagrangian $L \to L' + \frac{dF(q,t)}{dt}$ but instead are of the form $L \to L'$. Hence, I was confused about what the generating function is supposed to be for point transformations. But I now learned that the corresponding (type 1) generating function is indeed $F=0$. However we can Legendre transform this generating function into a nonzero type 2 generating function. – jak Feb 24 at 9:10