Talk:Hamilton–Jacobi equation

Possible mistake in the derivation of the formula $$\frac{\partial S}{\partial q^i} = \left.\frac{\partial {\cal L}}{\partial \dot q^i}\right|_{\mathbf{\dot q} = \mathbf{v}}$$
In step 1 of the proof of this formula it is stated that « If $$\xi$$'s starting point $$\mathbf{q}_0$$ is fixed, then, by the same logic that was used to derive the Euler–Lagrange equations, $$\delta \xi(t_0) = 0$$. » But i do not think this holds, the path $$\xi$$ has fixed start and end points, but if the perturbation $$\delta\xi$$ is assumed arbitrary as in the text then we have in general $$ \delta{\cal S}_{\delta \xi}[\xi,t;t_0] = \frac{\partial {\cal L}(\mathbf{q},\mathbf{\dot q})}{\partial \mathbf{\dot q}}\delta \xi(t)- \frac{\partial {\cal L}(\mathbf{q_0},\mathbf{\dot q_0})}{\partial \mathbf{\dot q_0}}\delta \xi(t_0). $$ and the second term does not necessarily vanish, as we may have $$\delta \xi(t_0)\neq 0$$ -and $$ \frac{\partial {\cal L}(\mathbf{q_0},\mathbf{\dot q_0})}{\partial \mathbf{\dot q_0}}\neq 0$$. We must explicitly assume that $$\delta \xi(t_0)=0$$, that is that the perturbation does not alter the path's origin $$\xi(t_0)$$. This is what is done in step 2 where one works only with what is called a "compatible" variation of the path, this includes the condition $$\gamma_\epsilon(t_0)=\gamma(t_0)$$ for all $$\epsilon$$, which implies $$\delta \xi(t_0)=0$$. I think we can adapt the proof to allow moving origin, thus general perturbations, but we must also adapt the definition of "compatible" -drop the assumption at the origin.

A few remarks on the literature: fixed origin for perturbations is also assumed in Arnold's book on classical mechanics, though his proof does not use Gateaux derivatives but works only with integrals. Abraham and Marsden's Foundations give a rather fancy proof, which yields a more general result -including moving origin, if im not mistaken. Evans in his book on PDE uses the Hopf-Lax formula for a minimizer of the action, he proves that functions satisfying it, for a convex lagrangian, satisfy the HJ equation where it is differentiable -the action functional is then only Lipschitz thus only almost everywhere differentiable. Physics text that i found offer only very sketchy proofs. Plm203 (talk) 13:38, 12 November 2023 (UTC)

Two different definitions of Hamilton's principal function in this article.
In the section "Hamilton's principal function" it is defined as the action (consistent with Feynman). In that definition it is a definite integral and defined by that integral.

In the section "Action and Hamilton's functions" the principal function is defined consistent with Goldstein v3 as the indefinite integral resulting solutions to the H-J equations.

If you read Feynman's logic, the first definition is wrong. He says no one wants to write out "Hamilton's principal function" all the time, let's all it "action". Then Goldstein still gets the Hamilton's principal function name for his version.

Unless some objects I will make that change next time I come around here. Johnjbarton (talk) 02:20, 17 November 2023 (UTC)

Misleading section
In my opinion the whole section "Action and Hamilton's functions" is ambiguous and misleading. According to the definition as the value of the action functional for the extremal curve with given start point $$(\mathbf q_0, t_0)$$ and end point $$(\mathbf q, t)$$ (i.e. the classical trajectory), Hamilton's principle function is $$S(\mathbf q, t,\mathbf q_0,t_0).$$ The curve being used to evaluate $$\frac{\mathrm dS}{\mathrm dt}$$ (which was not explicitly defined or even acknowledged) is then the end point as a function of time of the extremal curve that the action functional is being evaluated on. To distinguish the endpoint curve from the coordinate dependencies of the functions I'll denote it as $$\mathbf r(t)$$. As proven in the section "Hamilton's principal function" the derivative $$\frac{\partial S}{\partial q_i}\bigg|_{\mathbf q = \mathbf r}$$ is equal to $$\frac{\partial L}{\partial \dot q_i}\bigg|_{\mathbf q = \mathbf r, \dot{\mathbf q} = \mathbf v}$$ where $$\mathbf v(t)$$ is the end velocity of the extremal curve between the points $$(\mathbf q_0, t_0)$$ and $$(\mathbf r(t), t)$$, and is not generally equal to $$\dot{\mathbf r}(t)$$ which can be arbitrarily chosen. If the arguments of each function are explicitly shown after replacing $$\frac{\partial S}{\partial q_i}$$, we get $$\frac{\mathrm dS}{\mathrm dt}\bigg|_{\mathbf r,t} = \sum_i \frac{\partial L}{\partial \dot q_i}\bigg|_{\mathbf r,\mathbf v,t} \dot r_i - H(\mathbf r, \frac{\partial L}{\partial \dot q_i}\bigg|_{\mathbf r,\mathbf v,t}, t)$$, and we can see that this is not a Legendre transform for $$L(\mathbf r(t),\dot{\mathbf r}(t),t)$$ since the momentum terms are not evaluated on $$\dot{\mathbf r}$$, and therefore the rest of this section does not follow. Its only when $$\mathbf r(t)$$ is chosen to be the extremal curve of the system with $$\mathbf r(t_0) = \mathbf q_0$$, so that $$\dot{\mathbf r}(t) = \mathbf v(t)$$, that the Legendre transform is correct and leads to $$S(\mathbf r(t),t, \mathrm q_0,t_0) = \int_{t_0}^t L(\mathbf r(t'),\dot{\mathbf r}(t'), t')\mathrm dt'$$. But in this case what has been "derived" is just the original definition of HPF.

The 2nd part of the section shows that Hamilton's characteristic function is equivalent to the abbreviated action, and is a good addition to the article, but again it is derived in a misleading/incorrect way. There is no need to introduce the Lagrangian or Hamiltonian, since the earlier proof that $$\frac{\partial S}{\partial \mathbf q}\bigg|_{\mathbf q,t,\mathbf q_0,t_0}$$ is the momentum of the system $$\mathbf p(\mathbf q,t)$$ suffices to show that when $$\frac{\partial S}{\partial\mathbf q} = \frac{\partial W}{\partial\mathbf q}$$, $$W(\mathbf q,\mathbf q_0,t_0) = \int_{\mathbf q_{tr}}\frac{\partial W}{\partial \mathbf q} \cdot \mathrm d\mathbf q = \int_{\mathbf q_{tr}} \mathbf p\cdot\mathrm d\mathbf q$$, where $$\mathbf q_{tr}$$ is the trajectory of the system.

Besides all this, the section is just ambiguous overall since it fails to denote the dependencies of any of the functions or what they are being evaluated on. I really think this section is unnecessary, and the 2nd part should be moved to the "Separation of variables" section where $$W$$ is first defined. It's kinda funny that this criticism is 10x longer than the section itself, but I'd like to make a case and be open to objection before changing anything. Erjio (talk) 07:01, 4 December 2023 (UTC)


 * @Erjio I was also thinking of changing the "Action and Hamilton's function" section, but for completely different reasons.
 * (In fact the title of section makes no sense to me: "Hamilton's function"?)
 * I think this section is an attempt to render part of chapter 10.1 in Goldstein (pg 434 in 3rd ed). Since the content preceding this is not from Goldstein, they don't relate. I agree that the important bit is the relationship and conditions on the abbreviated action to action equation.
 * My goal is to have a physics-focused section connecting action and the Hamilton-Jacobi equation with out proofs and with minimal notation, to get the key idea across.
 * AFAIK, the abbreviated action is defined as Hamilton's characteristic function and (since Feynman's time) the action is defined as Hamilton's principle function. I think these identifications should be done earlier in the article with ref to Action (physics). From the physics point of view, "Hamilton's principle function" should everywhere be replace by "action" or "action functional".
 * Concretely, my proposal:
 * Delete Action and Hamilton's function section.
 * Add Overview before the section "Hamilton's principal function"
 * Start right with the HJE as given in the first few lines of "Mathematical formulation"
 * qualitative physics of HJE: why do we care?
 * mention abbreviated action w/o proof.
 * Move "Hamilton's principal function" to a subsection of "Mathematical formulation"
 * Rename "Hamilton's principal function" to "Definition of the Action functional"
 * mention HPF name with link to history.
 * abbreviated action comes again in separation as you propose.
 * Johnjbarton (talk) 03:31, 6 December 2023 (UTC)
 * @Johnjbarton I agree especially with your point that HPF and HCF need to be identified with the actions a lot earlier, and I think the article would benefit a lot from your proposed restructure. Good on you for putting in the effort to improve it. Erjio (talk) 19:36, 8 December 2023 (UTC)
 * Thanks. I made some progress, but incomplete and more issues came up.
 * It seems weird to have an entire section on the defn of S in the math section before the HJE is discussed. I think this is just wrong. Or rather, the soln to HJE, S, has the character discussed in the section, but we don't need that character as a prelude.
 * Similarly, "Formula for the momenta" seems like a result, not an input. If we have S, then we can compute momenta.
 * Johnjbarton (talk) 18:42, 9 December 2023 (UTC)