section_path: Relation to other formulations of classical physics/Hamilton–Jacobi
section_name: Hamilton–Jacobi
paragraph_text: Hamilton–Jacobi
  
  The Hamilton–Jacobi equation provides yet another formulation of classical mechanics, one which makes it mathematically analogous to wave optics. This formulation also uses Hamiltonian functions, but in a different way than the formulation described above. The paths taken by bodies or collections of bodies are deduced from a function S (q 1, q 2, …, t) {\displaystyle S(\mathbf {q} _{1},\mathbf {q} _{2},\ldots,t)} of positions q i {\displaystyle \mathbf {q} _{i}} and time t {\displaystyle t}. The Hamiltonian is incorporated into the Hamilton–Jacobi equation, a differential equation for S {\displaystyle S}. Bodies move over time in such a way that their trajectories are perpendicular to the surfaces of constant S {\displaystyle S}, analogously to how a light ray propagates in the direction perpendicular to its wavefront. This is simplest to express for the case of a single point mass, in which S {\displaystyle S} is a function S (q, t) {\displaystyle S(\mathbf {q},t)}, and the point mass moves in the direction along which S {\displaystyle S} changes most steeply. In other words, the momentum of the point mass is the gradient of S {\displaystyle S}: v = 1 m ∇ S. {\displaystyle \mathbf {v} ={\frac {1}{m}}\mathbf {\nabla } S.} The Hamilton–Jacobi equation for a point mass is − ∂ S ∂ t = H (q, ∇ S, t). {\displaystyle -{\frac {\partial S}{\partial t}}=H\left(\mathbf {q},\mathbf {\nabla } S,t\right).} The relation to Newton's laws can be seen by considering a point mass moving in a time-independent potential V (q) {\displaystyle V(\mathbf {q})}, in which case the Hamilton–Jacobi equation becomes − ∂ S ∂ t = 1 2 m (∇ S) 2 + V (q). {\displaystyle -{\frac {\partial S}{\partial t}}={\frac {1}{2m}}\left(\mathbf {\nabla } S\right)^{2}+V(\mathbf {q}).} Taking the gradient of both sides, this becomes − ∇ ∂ S ∂ t = 1 2 m ∇ (∇ S) 2 + ∇ V. {\displaystyle -\mathbf {\nabla } {\frac {\partial S}{\partial t}}={\frac {1}{2m}}\mathbf {\nabla } \left(\mathbf {\nabla } S\right)^{2}+\mathbf {\nabla } V.} Interchanging the order of the partial derivatives on the left-hand side, and using the power and chain rules on the first term on the right-hand side, − ∂ ∂ t ∇ S = 1 m (∇ S ⋅ ∇) ∇ S + ∇ V. {\displaystyle -{\frac {\partial }{\partial t}}\mathbf {\nabla } S={\frac {1}{m}}\left(\mathbf {\nabla } S\cdot \mathbf {\nabla } \right)\mathbf {\nabla } S+\mathbf {\nabla } V.} Gathering together the terms that depend upon the gradient of S {\displaystyle S}, ∇ S = − ∇ V. {\displaystyle \left\mathbf {\nabla } S=-\mathbf {\nabla } V.} This is another re-expression of Newton's second law. The expression in brackets is a total or material derivative as mentioned above, in which the first term indicates how the function being differentiated changes over time at a fixed location, and the second term captures how a moving particle will see different values of that function as it travels from place to place: = = d d t. {\displaystyle \left=\left={\frac {d}{dt}}.}