# Intuition for Hamilton-Jacobi equation derived from least action

I am trying to understand the Hamilton-Jacobi equation without the framework of the canonical transformations. Even on the case of a 1D free particle I'm getting stuck.

The system starts at fixed coordinate $q_0$ at time $t_0$. Hamilton's Principal Function $S(q,t)$ is defined as the action, integrated along the path that satisfies the equations of motion (Hamilton's equations) and takes the system from $q_0$ at time $t_0$ to $q$ at time $t$. In my understanding, as $q$ and $t$ vary the initial velocity has to adjust so that the system lands on $q$ at time $t$.

Writing out the action integral and comparing the various path integrals as I perturb $q$ and $t$ I can show that this function $S(q,t)$ satisfies: $$\frac{\partial S}{\partial t}(q,t) = - H(q,p,t),\\ \frac{\partial S}{\partial q}(q,t) = p,$$ where $H$ is the Hamiltonian and $p$ is the momentum of the system when it's reached $q$ at time $t$ (i.e. $p$ is a function of $q$ and $t$).

Therefore, the Hamilton-Jacobi equation for $S$ is $$\frac{\partial S}{\partial t} + H(q,\frac{\partial S}{\partial q},t) = 0.$$

For a 1D free particle the Hamiltonian is $H(q,p,t)=p^2/2m$ and the HJ equation is $$\frac{\partial S}{\partial t} + \frac{1}{2m} \left(\frac{\partial S}{\partial q}\right)^2=0.$$

The solution of the PDE is $$S(q,t) = \pm \sqrt{2mE} q - Et + C,$$ for some constants $E$ and $C$. Aaand I'm already confused: $$H(q,t) = -\partial S / \partial t = E = \mathrm{constant},$$ the same constant for any $q$ and $t$. But this can't be right. If the particle ends up at $q=1$ at $t=1$ it should have a lower energy than if it ends up at $q=100$ at $t=1$, since it must be traveling faster in the latter case.

For this situation we know the right answer: assuming $q_0=0$ and $t_0=0$, the speed of the particle is $q/t$ (constant along its trajectory) and the Lagrangian integrated along the path to $q,t$ is $S(q,t) = \frac{1}{2} m \frac{q^2}{t}$.

1. How do I make sense of this seeming contradiction about the constant energy as a function of $q$ and $t$?

2. Also, at the end of the day how do we get the solution for the motion of the particle from the HJ equation (i.e. something like $q = \pm \sqrt{\frac{2E}{m}} t$)? I've seen reference to taking a partial derivative of $S$ with respect to $E$, but that's a mystery to me as well.

1. An important point is to not conflate Hamilton's principal function $$S(q,E,t)~=~\pm\sqrt{2m E} q - Et$$ and the on-shell action $$S(q_f,t_f;q_i,t_i) ~=~ \frac{m}{2} \cdot \frac{(q_f-q_i)^2}{t_f-t_i}.$$ They answer different questions, because different variables are kept constant.

Note that from the perspective of the HJ eq. (which is a PDE in $S$), the energy $E$ is an integration constant, which is reinterpreted as a new momentum $P$ and a constant of motion. The value of $E$ depends on the trajectory.

2. As for OP's last question, note that Hamilton's principal function $S(q,E,t)$ is defined as a type 2 CT with the new momentum $$P~=~E$$ equal to the energy. Since the Kamiltonian $K\equiv 0$ is identically zero, the new position $$Q~=~\frac{\partial S }{\partial P}~=~\pm\sqrt{\frac{m}{2P}}q -t$$ is a constant of motion. This leads to $$\dot{q}~=~\pm\sqrt{\frac{2P}{m}}.$$

Many of OP's questions are covered in this Phys.SE post and the Lemma of my Phys.SE answer here.

• Thanks for the links but I would like to understand this on the terms I laid out in my question, in particular without reference to canonical transformations. My first two equations come from the same reasoning as you use in your lemma (though I don't need to impose the restriction you make in Fig. 2 that the variation in $q_f$ is dependent on the variation in $t_f$; your Eq. 16).I don't see that I'm conflating things: forget about what I am calling these functions -- just taking all quantities as I define them seems to lead to a contradiction. – Alex Aug 3 '18 at 20:10
• I updated the answer. – Qmechanic Aug 4 '18 at 14:37
• Thanks. Can you clarify your point #1? The $S(q,E,t)$ solves the HJ equation when $E$ is a constant (const $E$ comes in when using separation of variables). But I notice that the thing you call the on-shell action, $S=(1/2)m q^2/t$, also solves the HJ eqn, and gives what seems to me to be the "correct" solution: the action as a function of the end point $q$ at time $t$. Is the issue in how to integrate the HJ PDE because the two $S$'s don't obey the same initial conditions? What is the interpretation of the $S=\pm\sqrt{2mE}q - Et$ solution? Can you explain without canonical transformations? – Alex Aug 6 '18 at 18:36
• I updated the answer. – Qmechanic Aug 6 '18 at 21:19
• Thanks. I think the key to my confusion is realizing that the solution to the HJ PDE is not unique. I.e. the "on-shell" action as a function of the end point $S(q,t)$ (for a fixed starting point) solves the HJ eqn but a given solution $S'(q,t)$ to the HJ eqn doesn't have to be this $S(q,t)$ function. If you write the integration constant in $S'(q,t)$ in terms of $q$ and $t$ and plug back into $S'$ you do always get $S(q,t)$. I can show this by using $S'$ as a generating function but I'd still like to know if HJ theory can be developed without generating functions/canonical transformations. – Alex Aug 8 '18 at 22:25