Canonical Transformations

\(\require{cancel}\) \(\require{boldsymbol}\)

Consider the following, unusual Lagrangian:

\[\begin{eqnarray} \mathscr{L}=\sqrt{q^2+\dot q^2}-\frac{1}{2} q^2. \tag{1} \end{eqnarray}\]

We are going to try to solve the equations of motion for this Lagrangian. This is going to be a long-winded answer. We will argue that moving to the Hamiltonian picture makes our life much easier. Let us first build the bridge between the Lagrangian and Hamiltonian represetations, which is done via the Legendre transforms. We will discuss that the problem can be further simplified by shuffling the coordinates, which will take as to tour through canonical transformations and Poisson brackets. Let’ get started with some variational calculus.

Lagrangian representation

A functional can be considered as an operation that takes in a function and returns a number. The most familiar functional is integration with fixed limits. It takes in \(f\) and returns \(\mathscr{S}=\int_a^bf(t) dt\), which is just a number. In a typical mechanics problem, the functional \(\mathscr{S}\) will be of the form: \[\begin{eqnarray} \mathscr{S}=\int^{t_1}_{t_0} \mathscr{L}(q,\dot q) dt, \tag{2} \end{eqnarray}\] where \(\mathscr{L}\) is the Lagrangian, and \(q=q(t)\) is the generalized coordinate with \(\dot q=\frac{dq}{dt}\). Let’s assume that we have a function \(q(t)\) that gives the minimum value for \(\mathscr{S}\). If we fiddle \(q\) around the optimal function by a small amount \(\alpha \eta(t)\), i.e., \(q(t)\rightarrow q(t)+\alpha \eta(t)\), where \(\eta(t)\) is an arbitrary function and \(\alpha\) is a small number, then the change in \(\mathscr{S}\) should be \(0\). This is analogous to requiring that the derivative of a function \(f\) should vanish at a local extremum , that is: \(\frac{df(t)}{dt}\vert_{t=t^*}=0\). Rigorously speaking [1], we can define the following functional \[\begin{eqnarray} \mathscr{S}(\alpha)=\int^{t_1}_{t_0} \mathscr{L}(q+\alpha \eta,\dot q+\alpha \dot\eta) dt, \tag{3} \end{eqnarray}\] and require that \[\begin{eqnarray} \frac{d}{d\alpha} \mathscr{S}(\alpha)\bigg \vert_{\alpha=0}=0. \tag{4} \end{eqnarray}\] Consider a problem where the end points are specified. This implies that we are not free to wiggle \(q\) at the end points \(t_0\) and \(t_1\), i.e., \[\begin{eqnarray} \eta(t_0)=\eta(t_1)=0. \tag{5} \end{eqnarray}\] The variation is illustrated in Fig. 1.

Hover on the plot to interact with it. The orange curve $q(t)$, which is unknown at the moment,  gives the minimum value for the functional $\mathscr{S}$. The green curve represents  the new curve with random deformations around $q(t)$. The variation $\eta(t)$ must vanish at the end points since the values of  $q$ are fixed at these points.

Figure 1: Hover on the plot to interact with it. The orange curve \(q(t)\), which is unknown at the moment, gives the minimum value for the functional \(\mathscr{S}\). The green curve represents the new curve with random deformations around \(q(t)\). The variation \(\eta(t)\) must vanish at the end points since the values of \(q\) are fixed at these points.

Keeping the boundary conditions in Eq. (5) in mind, let us calculate Eq. (4): \[\begin{eqnarray} \frac{d}{d\alpha} \mathscr{S}(\alpha)\bigg \vert_{\alpha=0}&=&\int^{t_1}_{t_0} \frac{d}{d\alpha}\mathscr{L}(q+\alpha \eta,\dot q+\alpha \dot\eta(t))\bigg \vert_{\alpha=0} dt=\int^{t_1}_{t_0}\left[\frac{\partial}{\partial q}\mathscr{L}(q,\dot q) \eta +\frac{\partial}{\partial \dot q}\mathscr{L}(q,\dot q) \frac{d\eta}{dt}\right]dt\nonumber\\ &=&\int^{t_1}_{t_0}\left[\frac{\partial}{\partial q}\mathscr{L}(q,\dot q) \eta +\frac{d}{dt}\left(\frac{\partial}{\partial \dot q}\mathscr{L}(q,\dot q)\eta\right)- \frac{d}{dt}\left(\frac{\partial}{\partial \dot q}\mathscr{L}(q,\dot q)\right)\eta\right]dt\nonumber\\ &=&\int^{t_1}_{t_0}\left[\frac{\partial\mathscr{L}(q,\dot q)}{\partial q} -\frac{d}{dt}\left(\frac{\partial\mathscr{L}(q,\dot q)}{\partial \dot q}\right)\right]\eta dt +\cancel{\frac{\partial\mathscr{L}(q,\dot q)}{\partial \dot q}\eta\bigg \vert_{t_0}^{t_1}}\nonumber\\ &=&\int^{t_1}_{t_0}\left[\frac{\partial\mathscr{L}(q,\dot q)}{\partial q} -\frac{d}{dt}\left(\frac{\partial\mathscr{L}(q,\dot q)}{\partial \dot q}\right)\right]\eta dt, \tag{6} \end{eqnarray}\] where the boundary terms vanish due to the constraints in Eq. (5). Since \(\eta\) is an arbitrary function, in order to set this equation to \(0\), we require the following:

\[\begin{eqnarray} \frac{\partial\mathscr{L}}{\partial q} -\frac{d}{dt}\left(\frac{\partial\mathscr{L}}{\partial \dot q}\right)=0, \tag{7} \end{eqnarray}\] which is known as the Euler-Lagrange equation.

Gauge invariance

Since the action in Eq. (2) is defined as an integral with fixed end points, adding a total derivative to the integrand, i.e., the Lagrangian, will only add a constant to the action. Since the equations of motion are derived by variation, constants added to the action will not change the result. To quantify this, let us consider the transformed Lagrangian:

\[\begin{eqnarray} \tilde{\mathscr{L}}=\mathscr{L}+\frac{d}{dt}\left[ \Lambda (q,t)\right]=\mathscr{L}+\frac{ \partial \Lambda (q,t)}{\partial q}\dot{q}+\frac{\partial \Lambda (q,t)}{\partial t} \tag{8} \end{eqnarray}\] for any differentiable function \(\Lambda (q,t)\). Now let’s take \(\mathscr{L}=\tilde{\mathscr{L}}-\frac{d}{dt}\left[ \Lambda (q,t)\right]\) and insert that into Eq. (7) to get

\[\begin{eqnarray} \frac{d}{dt}\left( \frac{\partial\tilde{\mathscr{L}}}{\partial \dot{q}}\right) -\frac{ \partial\tilde{\mathscr{L}}}{\partial q} &=&\frac{d}{dt}\left( \frac{\partial \mathscr{L}}{ \partial \dot{q}}\right) -\frac{\partial \mathscr{L}}{\partial q}+\frac{ \partial ^{2}\Lambda (q,t)}{\partial t\partial q}-\frac{ \partial ^{2}\Lambda (q,t)}{\partial t\partial q}=\frac{d}{dt} \left( \frac{\partial \mathscr{L}}{\partial \dot{q}}\right) -\frac{\partial \mathscr{L}}{\partial q} =0, \tag{9} \end{eqnarray}\] which shows that although \(\tilde{\mathscr{L}}\) and \(\mathscr{L}\) are totall different functions, they satisfy the same differential equation yielding the same equation of motion.

Hamiltonian representation

We first define the conjugate momenta \(p\) as \[\begin{eqnarray} p\equiv\frac{\partial\mathscr{L}}{\partial \dot q}, \tag{10} \end{eqnarray}\] and the Legendre transform as \[\begin{eqnarray} \mathscr{H}(q,p)=p \dot q -\mathscr{L}(q,\dot q) \tag{11}, \end{eqnarray}\] which will enable us to move from the independent variables \(\{q,\dot q\}\) to \(\{q,p\}\). We can now compute the differential of this new quantity \(\mathscr{H}\) by expanding out the right hand side as \[\begin{eqnarray} d \mathscr{H}(q,p) &=&dp \, \dot q+p\,\frac{\partial\dot q}{\partial p } dp +p\,\frac{\partial\dot q}{\partial q } dq -\frac{\partial \mathscr{L}}{\partial q} dq-\frac{\partial \mathscr{L}}{\partial \dot q} \frac{\partial\dot q}{\partial p } dp -\frac{\partial \mathscr{L}}{\partial \dot q} \frac{\partial\dot q}{\partial q } dq\nonumber\\ &=& dp \left[\dot q+ \frac{\partial\dot q}{\partial p }\cancel{\left( p -\frac{\partial \mathscr{L}}{\partial \dot q}\right)}\right]+ dq \left[-\frac{\partial \mathscr{L}}{\partial q} -\frac{\partial\dot q}{\partial q }\cancel{\left(\frac{\partial \mathscr{L}}{\partial \dot q} -p \right)}\right], \tag{12} \end{eqnarray}\] where the terms in the parenthesis are zero due to the definition in Eq. (10) . Therefore we get: \[\begin{eqnarray} d\mathscr{H}(q,p)&=& dp \, \dot q - dq \frac{\partial \mathscr{L}}{\partial q}=dp \, \dot q - dq \frac{d}{dt}\left(\frac{\partial\mathscr{L}}{\partial \dot q}\right)=dp \, \dot q -dq \, \dot p \tag{13}. \end{eqnarray}\] We can also write the \(d\mathscr{H}(q,p)\) in terms of its functional arguments: \[\begin{eqnarray} d\mathscr{H}(q,p)&=& dq \frac{\partial \mathscr{H}}{\partial q}+dp \frac{\partial \mathscr{H}}{\partial p} \tag{14}. \end{eqnarray}\] Matching the coefficients of the differentials in Eqs. (13) and (14), we arrive at the Hamitonian equations of motions:

\[\begin{eqnarray} \dot q= \frac{\partial \mathscr{H}}{\partial p} , \,\text{and}\, \dot p=-\frac{\partial \mathscr{H}}{\partial q} \tag{15}, \end{eqnarray}\] and this is how one moves from the Lagrangian equations to Hamiltonian equations via the Legendre transform.

Poisson brackets

The Poisson brackets are discussed in the advanced classical mechanics classes, which ironically comes later in the cirriculum after quantum physics classes. When the commutator relations in quantum mechanics is discussed, they are motivated as an extension of the Poisson brackets as a link between classical mechanics and quantum mechanics. I will reproduce the derivations from [2] with slightly different notation.

We will take two continuous functions, \(F\) and \(G\), which are functions of the generalized coordinates \((p_i, q_i)\) and possible the time \(t\), and the define the Poisson bracket operation on them as follows:

\[\begin{eqnarray} \{F,G\}_{qp} \equiv \{F,G\}= \left(\frac{\partial F}{\partial q_i} \frac{\partial G} {\partial p_i} - \frac{\partial F} {\partial p_i }\frac{\partial G} {\partial q_i} \right) \tag{16}, \end{eqnarray}\] where the sum over the repeating index is implied, and we dropped the undescore \(qp\) from the bracket for simplicity. Let us introduce another continuous function \(M\) to write a few key features of the bracket.

  1. Poisson bracket is antisymmetric: \[\begin{eqnarray} \{F,G\} \equiv - \{G, F\}\implies \{F, F\} =0. \tag{17}\\ \end{eqnarray}\]

  2. Poisson bracket is linear: \[\begin{eqnarray} \{G, F + M \}= \{G, F\}+\{G, M \}. \tag{18} \end{eqnarray}\]

  3. Poisson bracket follows the Leibniz rules of derivatives: \[\begin{eqnarray} \{G, F M \} &\equiv \{G, F\}M + F \{G, M \} \tag{19}. \end{eqnarray}\]

  4. Poisson bracket satisfies the Jacobi identity: \[\begin{eqnarray} \{F, \{G, M \}\}+ \{G, \{M,F\}\}+ \{M \{F,G\}\}=0. \tag{20} \end{eqnarray}\]

We can try something interesting and take \(F=q_k\) and \(G=q_l\) and see what the Poisson bracket returns: \[\begin{eqnarray} \{q_k,q_l\}= \frac{\partial q_k}{\partial q_i} \frac{\partial q_l} {\partial p_i} - \frac{\partial q_l} {\partial p_i }\frac{\partial q_k} {\partial q_i} =0\tag{21}. \end{eqnarray}\] We can also try \(F=p_k\) and \(G=p_l\): \[\begin{eqnarray} \{p_k,p_l\}= \frac{\partial p_k}{\partial q_i} \frac{\partial p_l} {\partial p_i} - \frac{\partial p_l} {\partial p_i }\frac{\partial p_k} {\partial q_i} =0\tag{22}. \end{eqnarray}\] Let us finally try the cross term \(F=q_k\) and \(G=p_l\): \[\begin{eqnarray} \{q_k,p_l\}= \frac{\partial q_k}{\partial q_i} \frac{\partial p_l} {\partial p_i} - \frac{\partial p_l} {\partial p_i }\frac{\partial q_k} {\partial q_i} =\delta_{ki}\delta_{li}=\delta_{kl} \tag{23}. \end{eqnarray}\] Since they are based on the canonical variables themselves, these brackets are called the fundamental Poisson brackets. The only nontrivial bracket is the one in Eq. (23), and it is nonzero when the selected momenta is the conjugate variable of the selected coordinate, i.e., \[\begin{eqnarray} \{q_k, p_k\}_{pq} = 1.\tag{24} \end{eqnarray}\] The reader with sharp eyes will notice that this is similar to the commutation relation between \(x\) and \(p\) in quantum mechanics.

Invariance

Let us consider a change of variables from \((q,p)\) to a new set \(\left(Q(q,p, t),P(q,p, t)\right)\). We can rewrite Eq. (16) as:

\[\begin{eqnarray} \{F,G\}_{qp} &=& \frac{\partial F}{ \partial q_i} \frac{\partial G} {\partial p_i} - \frac{\partial F} {\partial p_i} \frac{\partial G} {\partial q_i} = \left( \frac{\partial F}{ \partial Q_j }\frac{\partial Q_j }{\partial q_i} + \frac{\partial F} {\partial P_j }\frac{\partial P_j}{ \partial q_i} \right) \frac{\partial G}{ \partial p_i }- \left( \frac{\partial F} {\partial Q_j} \frac{\partial Q_j}{ \partial p_i} + \frac{\partial F}{ \partial P_j }\frac{\partial P_j} {\partial p_i} \right) \frac{\partial G}{ \partial q_i}\nonumber\\ &=& \frac{\partial F}{ \partial Q_j} \left( \frac{\partial Q_j }{\partial q_i}\frac{\partial G}{ \partial p_i } -\frac{\partial Q_j}{ \partial p_i} \frac{\partial G}{ \partial q_i} \right) + \frac{\partial F}{ \partial P_j} \left( \frac{\partial P_j}{ \partial q_i} \frac{\partial G}{ \partial p_i } - \frac{\partial P_j} {\partial p_i}\frac{\partial G}{ \partial q_i} \right)\nonumber\\ &=& \frac{\partial F}{ \partial Q_j} \{ Q_j,G\}_{qp} + \frac{\partial F}{ \partial P_j} \{ P_j,G\}_{qp} \tag{25} \end{eqnarray}\]

Let’s take \(G = Q_k\), which will remove one of the terms since \(\{Q_j, Q_k;\}_{qp} = 0\). It will also collapse the implied summation of \(j\) since \(\{P_j,Q_k \}_{qp} = -\delta_{jk}\) to yield:

\[\begin{eqnarray} \{F,Q_k\}_{qp} = -\frac{\partial F}{ \partial P_k} \tag{26} \end{eqnarray}\]

If we set \(G = P_k\), we get

\[\begin{eqnarray} \{F,P_k\}_{qp} = \frac{\partial F}{ \partial Q_k} \tag{27}. \end{eqnarray}\]

We take the results from Eqs. (26) and (27), relabel \(F\) as \(G\), \(k\) as \(j\) and insert them in to the last line of Eq. (25) to show:

\[\begin{eqnarray} \{F,G\}_{qp} = \frac{\partial F} {\partial Q_j} \frac{\partial G}{ \partial P_j} - \frac{\partial F} {\partial P_j} \frac{\partial G} {\partial Q_j} = \{F,G\}_{QP} \tag{28}. \end{eqnarray}\]

This is pretty neat since we can drop the subscripts \((q,p)\) and \((Q,P)\). This tells us that the Poisson bracket is invariant under canonical transformation of canonical variables, or equivalently, the transformations that leave the bracket unchanged are canonical.

Transformation

The first advantage of the Hamiltonian representation is that it is first order in derivatives compared to the Lagrangian case, which is second order. Furthermore, the Hamiltonian can be transformed to further simplify the process to solve the equations of motion. Just like any other transformation, we will move from the original coordinates, \((q,p)\), to a new set \(\left(Q(q,p, t),P(q,p, t)\right)\) so that the equations become easier to solve in the new space. We solve them there and inverse transform back to the original variables. We will limit the transformations to the canonical ones, which preserve the canonical form of Hamilton’s equations of motion given in Eq. (15). As we move from \((q,p)\) to \((Q,P)\), \(\mathscr{H}\) moves to \(\mathcal{H}\), and \(\mathscr{L}\) moves to \(\mathcal{L}\). We require \[\begin{eqnarray} \dot{Q} = \frac{\partial\mathcal{H}(Q,P, t)}{ \partial P}, \,\text{and}\, \dot{P} = -\frac{\partial\mathcal{H}(Q,P, t) }{\partial Q} \tag{29}. \end{eqnarray}\]
The least action principle in Eq. (4) for the original Lagrangian, \(\mathscr{L}\) can be expressed as:

\[\begin{eqnarray} \delta S = \delta \int^{t_2}_{t_1} \mathscr{L}(q, \dot{q}, t)dt = \delta \int^{t_2}_{t_1} [p \dot{q} - \mathscr{H}(q,p, t)] dt = 0 \tag{30}. \end{eqnarray}\]
For the new Lagrangian, \(\mathcal{L}\), the least action requirement reads: \[\begin{eqnarray} \delta S = \delta \int^{t_2}_{t_1} \mathcal{L}(Q, \dot{Q} , t)dt = \delta \int^{t_2}_{t_1} \left[ P \dot{Q} - \mathcal{H}(Q,P, t) \right] dt = 0 \tag{31} \end{eqnarray}\]
But we showed earlier \(\mathscr{L}\) and \(\mathcal{L}\) must be related by the total time derivative of a gauge function \(F\) such that \[\begin{eqnarray} \frac{dF}{ dt} = \mathcal{L} - \mathscr{L} \tag{32} \end{eqnarray}\]

The generating function \(F\) can be a function of the old and new canonical variables \(p\), \(q\), \(P\), \(Q\) and \(t\) which results in the following relation: \[\begin{eqnarray} p \dot{q} - \mathscr{H}(q,p, t) = \left[ P \dot{Q} - \mathcal{H}(Q,P, t) \right] + \frac{dF}{dt}. \tag{33} \end{eqnarray}\]

Let us look at various types of generating functions: \(F_1(q, Q, t)\), \(F_2(q,P, t)\), \(F_3(p, Q, t)\), and \(F_4(p, P, t)\) [2].

\(F = F_1(q, Q,t)\):

The total time derivative of \(F = F_1(q, Q,t)\) reads \[\begin{eqnarray} \frac{dF(q, Q,t)}{ dt} = \frac{\partial F_1(q, Q,t)}{ \partial q} \dot{q} + \frac{\partial F_1(q, Q,t)}{ \partial Q} \dot{Q} + \frac{\partial F_1(q, Q,t) }{\partial t} \tag{34}. \end{eqnarray}\]
Inserting this into Eq. (33) gives \[\begin{eqnarray} \left[ p - \frac{\partial F_1(q, Q,t)}{ \partial q} \right] \dot{q} - \mathscr{H}(q,p, t) = \left[ P + \frac{\partial F_1(q, Q,t)}{ \partial Q} \right] \dot{Q} - \mathcal{H}(Q,P, t) + \frac{\partial F_1(q, Q,t) }{\partial t} \tag{35}. \end{eqnarray}\]

If we choose \(F_1\) as follows: \[\begin{eqnarray} p = \frac{\partial F_1(q, Q,t)}{ \partial q} \qquad P = -\frac{\partial F_1(q, Q,t)}{ \partial Q} \tag{36}, \end{eqnarray}\]
we can cancel Legendre terms to get a simple transformation: \[\begin{eqnarray} \mathcal{H}(Q,P, t) = \mathscr{H}(q,p, t) + \frac{\partial F_1(q, Q,t)}{ \partial t} \tag{37}. \end{eqnarray}\]

\(F = F_2(q,P,t) - Q P\):

The total time derivative of \(F = F_2(q,P,t)-Q P\) reads \[\begin{eqnarray} \frac{dF}{ dt} = \frac{\partial F_2(q,P,t)}{ \partial q} \dot{q} + \frac{\partial F_2(q,P,t)}{ \partial P} \dot{P} - P \dot{Q} - \dot{P} Q + \frac{\partial F_2(q,P,t)}{ \partial t} \tag{38} \end{eqnarray}\]
Inserting this into Eq. (33) gives \[\begin{eqnarray} \left( p - \frac{\partial F_2(q,P,t)}{ \partial q} \right) \dot{q} - \mathscr{H}(q,p, t) = P \dot{Q} - P \dot{Q} + \left[ \frac{\partial F_2(q,P,t)}{ \partial P} - Q \right] \dot{P} - \mathcal{H}(Q,P, t) + \frac{\partial F_2(q,P,t)}{ \partial t } \tag{39}. \end{eqnarray}\]
If we choose \(F_2\) as follows: \[\begin{eqnarray} p = \frac{\partial F_2(q,P,t)}{ \partial q} \qquad Q = \frac{\partial F_2(q,P,t) }{\partial P} \tag{40}, \end{eqnarray}\]
we simply get: \[\begin{eqnarray} \mathcal{H}(Q,P, t) = \mathscr{H}(q,p, t) + \frac{\partial F_2(q,P,t)}{ \partial t} \tag{41} \end{eqnarray}\]

\(F = F_3(p, Q,t) + q p\):

The total time derivative of \(F = F_3(p, Q,t) + q p\) reads \[\begin{eqnarray} \frac{dF }{dt} = \frac{\partial F_3(p, Q,t)}{ \partial p} \dot{p} + \frac{\partial F_3(p, Q,t)}{ \partial Q} \dot{Q} + \dot{q} p + q \dot{p} + \frac{\partial F_3(p, Q,t)}{ \partial t} \tag{42} \end{eqnarray}\]
Inserting this into Eq. (33) gives \[\begin{eqnarray} - \left[ q+ \frac{\partial F_3(p, Q,t)}{ \partial p} \right] \dot{p} - \mathscr{H}(q,p, t) = \left[ P+ \frac{\partial F_3(p, Q,t)}{ \partial Q} \right] \dot{Q} - \mathcal{H}(Q,P, t) + \frac{\partial F_3(p, Q,t)}{ \partial t} \tag{43} \end{eqnarray}\]
If we choose \(F_3\) as follows: \[\begin{eqnarray} q = -\frac{\partial F_3(p, Q,t)}{ \partial p} \qquad P = -\frac{\partial F_3(p, Q,t)}{ \partial Q} \tag{44}, \end{eqnarray}\]
we end with the required transformation \[\begin{eqnarray} \mathcal{H}(Q,P, t) = \mathscr{H}(q,p, t) + \frac{\partial F_3(p, Q,t)}{ \partial t} . \tag{45} \end{eqnarray}\]

\(F = F_4(p, P,t) + q p - Q P\):

The total time derivative of \(F = F_4(p, P,t) + q p - Q P\) reads \[\begin{eqnarray} \frac{dF }{dt} = \frac{\partial F_4(p, P,t)}{ \partial p} \dot{p} + \frac{\partial F_4(p, P,t) }{\partial P} \dot{p} + \dot{q} p + q \dot{p} - \dot{Q} P - Q \dot{P} + \frac{\partial F_4(p, P,t)}{ \partial t}\tag{46} \end{eqnarray}\]
Inserting this into Eq. (33) gives \[\begin{eqnarray} - \left[ q+ \frac{\partial F_4(p, P,t)}{ \partial p} \right] \dot{p} - \mathscr{H}(q,p, t) = \left[ \frac{\partial F_4(p, P,t)}{ \partial P } - Q \right] \dot{P} - \mathcal{H}(Q,P, t) + \frac{\partial F_4(p, P,t) }{\partial t} \tag{47} \end{eqnarray}\]
If we choose \(F_4\) as follows: \[\begin{eqnarray} q = -\frac{\partial F_4(p, P,t)}{ \partial p} \qquad Q = \frac{\partial F_4(p, P,t)}{ \partial P} \tag{48}, \end{eqnarray}\]
we get the required transformation \[\begin{eqnarray} \mathcal{H}(Q,P, t) = \mathscr{H}(q,p, t) + \frac{\partial F_4(p, P,t)}{ \partial t} \tag{49}. \end{eqnarray}\]
The four generating functions we looked at are related by Legendre transformations. The properties of the generating functions are summarized in Table 1[2].
Table 1: Canonical transformation generating functions
Generating functionGenerating function derivativesTrivial special examples
\(F = F_1(q, Q, t)\)\(p_i = \frac{\partial F_1}{ \partial q_i } \quad P_i = -\frac{\partial F_1}{ \partial Q_i}\)\(F_1 = q_iQ_i \quad Q_i = p_i \quad P_i = -q_i\)
\(F = F_2(q,P, t) - Q P\)\(p_i = \frac{\partial F_2}{ \partial q_i} \quad Q_i = \frac{\partial F_2}{ \partial P_i}\)\(F_2 = q_iP_i \quad Q_i = q_i \quad P_i = p_i\)
\(F = F_3(p, Q,t) + q p\)\(q_i = -\frac{\partial F_3}{ \partial p_i} \quad P_i = -\frac{\partial F_3}{ \partial Q_i}\)\(F_3 = p_iQ_i \quad Q_i = -q_i \quad P_i = -p_i\)
\(F = F_4(p,P,t) + q p - Q P\)\(q_i = -\frac{\partial F_4}{ \partial p_i } \quad Q_i = \frac{\partial F_4}{ \partial P_i}\)\(F_4 = p_iP_i \quad Q_i = p_i \quad P_i = -q_i\)

The equation of motion

Let’s go back to the original problem with the Lagrangian in Eq. (1): We first define the conjugate momenta \(p\) as \[\begin{eqnarray} p\equiv\frac{\partial\mathscr{L}}{\partial \dot q}=\frac{\dot q}{\sqrt{\dot q^2+q^2}} \implies \dot q \frac{pq}{\sqrt{1-p^2}}. \tag{50} \end{eqnarray}\] Insert this back in Eq. (1) and rewrite it slightly: \[\begin{eqnarray} \mathscr{L}=\sqrt{q^2+\frac{\dot p^2}{1-p^2}}-\frac{1}{2} q^2=\frac{q}{\sqrt{1-p^2}}-\frac{1}{2} q^2 \tag{51}. \end{eqnarray}\]

The corresponding Hamiltonian becomes: \[\begin{eqnarray} \mathscr{H}(q,p)=p \dot q -\mathscr{L}(q,\dot q)=-q\sqrt{1-p^2}+\frac{1}{2} q^2 \tag{52}, \end{eqnarray}\]

Let’s assume that we can come up with a transformation \(q \to Q\) such that the new Hamiltonian, \(\mathcal{H}\), becomes that of a harmonic oscillator:

\[\begin{eqnarray} \mathcal{H}(Q,p)=\frac{\alpha}{2}Q^2+\frac{\beta}{2}p^2+\gamma \tag{53}, \end{eqnarray}\] where \(\alpha\), \(\beta\), and \(\gamma\) are to be calculated. We want to preserve the canonical form of the Hamiltonian equations and require: \[\begin{eqnarray} \frac{\partial \mathcal{H}}{\partial Q}=-\dot p = \frac{\partial \mathscr{H}}{\partial q} \tag{54}, \end{eqnarray}\] which implies \[\begin{eqnarray} Q=-\frac{\sqrt{1-p^2}+q }{\alpha} \tag{55}. \end{eqnarray}\] Putting this back in Eq. (53), we get \[\begin{eqnarray} \mathcal{H}=\frac{\alpha}{2}\left(-\frac{\sqrt{1-p^2}+q }{\alpha}\right)^2+\frac{\beta}{2}p^2+\gamma =\frac{1}{2\alpha}\left(1-p^2+q^2-2q\sqrt{1-p^2}\right)+\frac{\beta}{2}p^2+\gamma \tag{56}. \end{eqnarray}\] If we set \(\alpha=\beta=1\), and \(\gamma=-\frac{1}{2}\), we get: \[\begin{eqnarray} \mathcal{H}(Q,p)=\frac{1}{2}Q^2+\frac{1}{2}p^2-\frac{1}{2} \tag{57}. \end{eqnarray}\] The equations to solve are: \[\begin{eqnarray} \ddot Q+Q=0,\quad \text{and}\quad \ddot p+p=0 \tag{58}. \end{eqnarray}\] The solution are simlly the harmonic functions: \[\begin{eqnarray} Q(t)=Q_0\cos t +\dot Q_0 \sin t,\quad \text{and } p(t)=p_0\cos t +\dot p_0 \sin t \tag{59}, \end{eqnarray}\] where \(Q_0\), \(\dot Q_0\), \(p_0\), and \(\dot p_0\) are the initial conditions. Reverting back to the original parameters we get: \[\begin{eqnarray} q(t)=\left(q_0-\sqrt{1-p_0^2} \right)\cos t +\left(\dot q_0+\frac{\dot p_0 p_0}{\sqrt{1-p_0^2}} \right) \sin t +\sqrt{1-\left(p_0\cos t +\dot p_0 \sin t\right)^2} \tag{60}, \end{eqnarray}\] and that is the solution we have been looking for.

[1]
L. D. Elsgolc, Calculus of variations. Dover Publications, 2007.
[2]
“Canonical Transformations in Hamiltonian Mechanics.” University of Rochester, 2021.

Related