# Hamilton-Jacobi Equation & Canonical Transformation

I am attempting to solve the Hamilton-Jacobi Equation in the case of a simple harmonic oscillator, to recover the associated generating function and the generated canonical transformation.

Consider the Hamiltonian: $$\mathcal H=\frac{1}{2}\omega^2(p^2+mx^2)$$ where $$\omega^2=k/m$$.

Applying the Hamilton-Jacobi Equation: $$\mathcal H\Big(x,\frac{\partial S}{\partial x},t\Big)+\frac{\partial S}{\partial t}=0$$ and substituing our Hamiltonian: $$\frac{1}{2}mx^2+\frac{1}{2}\omega^2\Big(\frac{\partial S}{\partial x}\Big)^2=-\frac{\partial S}{\partial t}$$ However due to time independence of our Hamiltonian (and thus conservation of energy $$E$$), we know that: $$S=f(x)-Et$$ and therefore: $$\frac{1}{2}mx^2+\frac{1}{2}\omega^2\Big(f'(x)\Big)^2=E$$ Rearranging: $$f'(x)=\frac{1}{\omega}\sqrt{2E-mx^2}$$ and then integrating, we find: $$f(x)=\frac{1}{\omega}\int{\sqrt{2E-mx^2}dx}=\frac{\sqrt{2E}}{\omega}\int{\sqrt{1-\frac{mx^2}{2E}}dx}=\frac{E}{\omega}\sqrt{\frac{2}{m}}\Bigg[\arccos\Bigg(\sqrt{\frac{m}{2E}}x\Bigg)-x\sqrt{1-\frac{mx^2}{2E}}\sqrt\frac{m}{2E}\Bigg]$$ and thus our type-II generating function S is given by: $$S(x,P,t)=\frac{E}{\omega}\sqrt{\frac{2}{m}}\Bigg[\arccos\Bigg(\sqrt{\frac{m}{2E}}x\Bigg)-x\sqrt{1-\frac{mx^2}{2E}}\sqrt\frac{m}{2E}\Bigg]-Et$$ Note that within the Hamilton-Jacobi formalism, the new canonical coordinates satisfy $$\dot P=\dot Q=0$$, which is where I'm stuck, how do I know what $$P$$ and $$Q$$ are? Or is it just an arbitrary choice that must satisfy the conditions of a type-II generating function:

$$\left\{ \begin{array}{c} p=\frac{\partial S}{\partial x} \\ Q=\frac{\partial S}{\partial P} \\ K=H+\frac{\partial S}{\partial t} \\ \end{array} \right.$$ and then that's it? So all I need to do is choose $$P$$ such that it contains no explicit time-dependence correct?

I tried setting $$P=\arccos\Big(x\sqrt{\frac{m}{2E}}\Big)$$, so now my generating function is given by: $$S(x,P,t)=\frac{E}{\omega}\sqrt{\frac{2}{m}}\Bigg[P-x\sqrt\frac{m}{2E}P\Bigg]-Et$$ and then I recovered $$Q=\frac{1}{2\sqrt{k}}-4m\sqrt{k}E x^2$$ but I just don't see how this canonical transformation produces the good old simple harmonic motion written in the normal cooridnates. Is my reasoning correct, and if yes, then how does this canonical transformation recover the simple harmonic motion in the original coordinates?

1. In Hamiltoni-Jacobi (HJ) theory the new momenta $$P_j$$ are identified with the integration constants $$\alpha_j$$ (excluding a trivial additive integration constant). Hence Hamilton's principal function $$S(q,P,t) \equiv S(q,\alpha,t)$$.
2. The new position is $$Q^j=\frac{\partial S}{\partial P_j}$$ because $$S(q,P,t) \equiv F_2(q,P,t)$$ is the generating function of a type-2 Canonical transformation (CT) $$(q,p)\to (Q,P)$$.
3. For the SHO, the new momentum $$P=E$$ is the energy. ($$E$$ is strictly speaking a separation constant rather than an integration constant.)
• I'm a bit confused about the integration constants $\alpha$, I looked this up at MIT OCW Classical Mechanics III, but I am honestly a bit lost, would it be possible that you show some working out? Sep 30, 2020 at 12:26