Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Hamiltonian mechanics
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Formulation of classical mechanics using momenta}} [[File:WilliamRowanHamilton.jpeg|thumb|Sir William Rowan Hamilton]] {{Classical mechanics|cTopic=Formulations}} In [[physics]], '''Hamiltonian mechanics''' is a reformulation of [[Lagrangian mechanics]] that emerged in 1833. Introduced by [[Sir William Rowan Hamilton]],<ref>{{cite book |author=Hamilton, William Rowan, Sir |url=http://worldcat.org/oclc/68159539 |title=On a general method of expressing the paths of light, & of the planets, by the coefficients of a characteristic function. |date=1833 |publisher=Printed by P.D. Hardy |oclc=68159539}}</ref> Hamiltonian mechanics replaces (generalized) velocities <math>\dot q^i</math> used in Lagrangian mechanics with (generalized) ''momenta''. Both theories provide interpretations of [[classical mechanics]] and describe the same physical phenomena. Hamiltonian mechanics has a close relationship with geometry (notably, [[symplectic geometry]] and [[Poisson structure]]s) and serves as a [[Hamilton–Jacobi equation|link]] between classical and [[quantum mechanics]]. == Overview == === Phase space coordinates (''p'', ''q'') and Hamiltonian ''H'' === Let <math>(M, \mathcal L)</math> be a [[Lagrangian mechanics|mechanical system]] with [[configuration space (physics)|configuration space]] <math>M</math> and smooth [[Lagrangian_mechanics#Lagrangian|Lagrangian]] <math> \mathcal L.</math> Select a standard coordinate system <math>(\boldsymbol{q},\boldsymbol{\dot q})</math> on <math>M.</math> The quantities <math>\textstyle p_i(\boldsymbol{q},\boldsymbol{\dot q},t) ~\stackrel{\text{def}}{=}~ {\partial \mathcal L}/{\partial \dot q^i}</math> are called ''momenta''. (Also ''generalized momenta'', ''conjugate momenta'', and ''canonical momenta''). For a time instant <math>t,</math> the [[Legendre transformation#Legendre transformation on manifolds|Legendre transformation]] of <math>\mathcal{L}</math> is defined as the map <math>(\boldsymbol{q}, \boldsymbol{\dot q}) \to \left(\boldsymbol{p},\boldsymbol{q}\right) </math> which is assumed to have a smooth inverse <math>(\boldsymbol{p},\boldsymbol{q}) \to (\boldsymbol{q},\boldsymbol{\dot q}).</math> For a system with <math>n</math> degrees of freedom, the Lagrangian mechanics defines the ''energy function'' <math display="block">E_{\mathcal L}(\boldsymbol{q},\boldsymbol{\dot q},t)\, \stackrel{\text{def}}{=}\, \sum^n_{i=1} \dot q^i \frac{\partial \mathcal L}{\partial \dot q^i} - \mathcal L.</math> The Legendre transform of <math>\mathcal{L}</math> turns <math>E_{\mathcal L}</math> into a function <math> \mathcal H(\boldsymbol{p},\boldsymbol{q},t)</math> known as the {{em|Hamiltonian}}. The Hamiltonian satisfies <math display="block"> \mathcal H\left(\frac{\partial \mathcal L}{\partial \boldsymbol{\dot q}},\boldsymbol{q},t\right) = E_{\mathcal L}(\boldsymbol{q},\boldsymbol{\dot q},t) </math> which implies that <math display="block"> \mathcal H(\boldsymbol{p},\boldsymbol{q},t) = \sum^n_{i=1} p_i\dot q^i - \mathcal L(\boldsymbol{q},\boldsymbol{\dot q},t), </math> where the velocities <math>\boldsymbol{\dot q} = (\dot q^1,\ldots, \dot q^n)</math> are found from the (<math>n</math>-dimensional) equation <math>\textstyle \boldsymbol{p} = {\partial \mathcal L}/{\partial \boldsymbol{\dot q}}</math> which, by assumption, is uniquely solvable for {{tmath|1= \boldsymbol{\dot q} }}. The (<math>2n</math>-dimensional) pair <math>(\boldsymbol{p},\boldsymbol{q})</math> is called ''phase space coordinates''. (Also ''canonical coordinates''). === From Euler–Lagrange equation to Hamilton's equations === In phase space coordinates {{tmath|1= (\boldsymbol{p},\boldsymbol{q}) }}, the (<math>n</math>-dimensional) [[Euler–Lagrange equation]] <math display="block">\frac{\partial \mathcal L}{\partial \boldsymbol{q}} - \frac{d}{dt}\frac{\partial \mathcal L}{\partial \dot\boldsymbol{q}} = 0</math> becomes ''Hamilton's equations'' in <math>2n</math> dimensions {{Equation box 1 |indent =: |equation = <math> \frac{\mathrm{d}\boldsymbol{q}}{\mathrm{d}t} = \frac{\partial \mathcal H}{\partial \boldsymbol{p}},\quad \frac{\mathrm{d}\boldsymbol{p}}{\mathrm{d}t} = -\frac{\partial \mathcal H}{\partial \boldsymbol{q}}. </math> |cellpadding= 5 |border |border colour = #0073CF |background colour=rgba(0,0,0,0)}} {{Proof| The Hamiltonian <math>\mathcal{H}(\boldsymbol{p},\boldsymbol{q})</math> is the [[Legendre transform]] of the Lagrangian <math>\mathcal{L}(\boldsymbol{q},\dot\boldsymbol{q})</math>, thus one has <math display="block">\mathcal{L}(\boldsymbol{q},\dot\boldsymbol{q}) + \mathcal{H}(\boldsymbol{p},\boldsymbol{q}) = \boldsymbol{p}\dot\boldsymbol{q}</math> and thus <math display="block">\begin{align} \frac{\partial \mathcal{H}}{\partial \boldsymbol{p}} &= \dot\boldsymbol{q} \\ \frac{\partial \mathcal{L}}{\partial \boldsymbol{q}} &= -\frac{\partial \mathcal{H}}{\partial \boldsymbol{q}}, \end{align}</math> Besides, since <math>\boldsymbol{p} = \partial \mathcal{L}/\partial \dot\boldsymbol{q} </math>, the Euler–Lagrange equations yield <math> \dot{\boldsymbol{p}} = \frac{\mathrm{d}\boldsymbol{p}}{\mathrm{d}t} = \frac{\partial\mathcal{L}}{\partial\boldsymbol{q}} = -\frac{\partial\mathcal{H}}{\partial\boldsymbol{q}}. </math> }} === From stationary action principle to Hamilton's equations === Let <math> \mathcal P(a,b,\boldsymbol x_a,\boldsymbol x_b)</math> be the set of smooth paths <math>\boldsymbol q: [a,b] \to M</math> for which <math>\boldsymbol q(a) = \boldsymbol x_a</math> and <math>\boldsymbol q(b) = \boldsymbol x_{b}. </math> The [[action (physics)|action functional]] <math> \mathcal S : \mathcal P(a,b,\boldsymbol x_a,\boldsymbol x_b) \to \Reals</math> is defined via <math display="block"> \mathcal S[\boldsymbol q] = \int_a^b \mathcal L(t,\boldsymbol q(t),\dot{\boldsymbol q}(t))\, dt = \int_a^b \left(\sum^n_{i=1} p_i\dot q^i - \mathcal H(\boldsymbol{p},\boldsymbol{q},t) \right)\, dt,</math> where {{tmath|1= \boldsymbol{q} = \boldsymbol{q}(t) }}, and <math>\boldsymbol{p} = \partial \mathcal L/\partial \boldsymbol{\dot q}</math> (see above). A path <math>\boldsymbol q \in \mathcal P(a,b,\boldsymbol x_a,\boldsymbol x_b)</math> is a [[Lagrangian mechanics|stationary point]] of <math> \mathcal S</math> (and hence is an equation of motion) if and only if the path <math>(\boldsymbol{p}(t),\boldsymbol{q}(t))</math> in phase space coordinates obeys the Hamilton equations. === Basic physical interpretation === A simple interpretation of Hamiltonian mechanics comes from its application on a one-dimensional system consisting of one nonrelativistic particle of mass {{mvar|m}}. The value <math>H(p,q)</math> of the Hamiltonian is the total energy of the system, in this case the sum of [[kinetic energy|kinetic]] and [[potential energy]], traditionally denoted {{mvar|T}} and {{mvar|V}}, respectively. Here {{mvar|p}} is the momentum {{mvar|mv}} and {{mvar|q}} is the space coordinate. Then <math display="block">\mathcal{H} = T + V, \qquad T = \frac{p^2}{2m} , \qquad V = V(q) </math> {{mvar|T}} is a function of {{mvar|p}} alone, while {{mvar|V}} is a function of {{mvar|q}} alone (i.e., {{mvar|T}} and {{mvar|V}} are [[scleronomic]]). In this example, the time derivative of {{mvar|q}} is the velocity, and so the first Hamilton equation means that the particle's velocity equals the derivative of its kinetic energy with respect to its momentum. The time derivative of the momentum {{mvar|p}} equals the ''Newtonian force'', and so the second Hamilton equation means that the force equals the negative [[gradient]] of potential energy. == Example == {{Main|Spherical pendulum}} A spherical pendulum consists of a [[mass]] ''m'' moving without [[friction]] on the surface of a [[sphere]]. The only [[force]]s acting on the mass are the [[Reaction (physics)|reaction]] from the sphere and [[gravity]]. [[Spherical coordinates]] are used to describe the position of the mass in terms of {{math|(''r'', ''θ'', ''φ'')}}, where {{math|''r''}} is fixed, {{math|1=''r'' = ''ℓ''}}.[[File:Spherical_pendulum_Lagrangian_mechanics.svg|thumb|300x300px|[[Spherical pendulum]]: angles and velocities.]] The Lagrangian for this system is<ref>{{harvnb|Landau|Lifshitz|1976|pp=33–34}}</ref> <math display="block">L = \frac{1}{2} m\ell^2\left( \dot{\theta}^2+\sin^2\theta\ \dot{\varphi}^2 \right) + mg\ell\cos\theta.</math> Thus the Hamiltonian is <math display="block">H = P_\theta\dot \theta + P_\varphi\dot \varphi - L</math> where <math display="block">P_\theta = \frac{\partial L}{\partial \dot \theta} = m\ell^2\dot \theta</math> and <math display="block">P_\varphi=\frac{\partial L}{\partial \dot \varphi} = m\ell^2\sin^2 \!\theta \, \dot \varphi .</math> In terms of coordinates and momenta, the Hamiltonian reads <math display="block">H = \underbrace{\left[\frac{1}{2}m\ell^2\dot\theta^2 + \frac{1}{2} m\ell^2\sin^2\!\theta \,\dot \varphi^2\right]}_{T} + \underbrace{ \Big[-mg\ell\cos\theta\Big]}_{V} = \frac{P_\theta^2}{2m\ell^2} + \frac{P_\varphi^2}{2m\ell^2\sin^2\theta} - mg\ell\cos\theta .</math> Hamilton's equations give the time evolution of coordinates and conjugate momenta in four first-order differential equations, <math display="block">\begin{align} \dot {\theta}&={P_\theta \over m\ell^2}\\[6pt] \dot {\varphi}&={P_\varphi \over m\ell^2\sin^2\theta}\\[6pt] \dot {P_\theta}&={P_\varphi^2\over m\ell^2\sin^3\theta}\cos\theta-mg\ell\sin\theta \\[6pt] \dot {P_\varphi}&=0. \end{align}</math> Momentum {{tmath|1= P_\varphi }}, which corresponds to the vertical component of [[angular momentum]] {{tmath|1= L_z = \ell\sin\theta \times m\ell\sin\theta\,\dot\varphi }}, is a constant of motion. That is a consequence of the rotational symmetry of the system around the vertical axis. Being absent from the Hamiltonian, [[azimuth]] <math>\varphi</math> is a [[cyclic coordinate]], which implies conservation of its conjugate momentum. == Deriving Hamilton's equations == Hamilton's equations can be derived by a calculation with the [[Lagrangian mechanics|Lagrangian]] {{tmath|1= \mathcal L }}, generalized positions {{mvar|q<sup>i</sup>}}, and generalized velocities {{math|{{overset|lh=0.3|⋅|''q''}}<sup>''i''</sup>}}, where {{tmath|1= i = 1,\ldots,n }}.<ref>This derivation is along the lines as given in {{Harvnb|Arnol'd|1989|pp=65–66}}</ref> Here we work [[On shell and off shell|off-shell]], meaning {{tmath|1= q^i }}, {{tmath|1= \dot{q}^i }}, {{tmath|1= t }} are independent coordinates in phase space, not constrained to follow any equations of motion (in particular, <math>\dot{q}^i</math> is not a derivative of {{tmath|1= q^i }}). The [[total differential]] of the Lagrangian is: <math display="block">\mathrm{d} \mathcal{L} = \sum_i \left ( \frac{\partial \mathcal{L}}{\partial q^i} \mathrm{d} q^i + \frac{\partial \mathcal{L}}{\partial \dot{q}^i} \, \mathrm{d} \dot{q}^i \right ) + \frac{\partial \mathcal{L}}{\partial t} \, \mathrm{d}t \ .</math> The generalized momentum coordinates were defined as {{tmath|1= p_i = \partial \mathcal{L}/\partial \dot{q}^i }}, so we may rewrite the equation as: <math display="block"> \begin{align} \mathrm{d} \mathcal{L} =& \sum_i \left( \frac{\partial \mathcal{L}}{\partial q^i} \, \mathrm{d} q^i + p_i \mathrm{d} \dot{q}^i \right) + \frac{\partial \mathcal{L}}{\partial t}\mathrm{d}t \\ =& \sum_i \left( \frac{\partial \mathcal{L}}{\partial q^i} \, \mathrm{d}q^i + \mathrm{d}( p_i \dot{q}^i) - \dot{q}^i \, \mathrm{d} p_i \right) + \frac{\partial \mathcal{L}}{\partial t} \, \mathrm{d}t\,. \end{align} </math> After rearranging, one obtains: <math display="block">\mathrm{d}\! \left ( \sum_i p_i \dot{q}^i - \mathcal{L} \right ) = \sum_i \left( - \frac{\partial \mathcal{L}}{\partial q^i} \, \mathrm{d} q^i + \dot{q}^i \mathrm{d}p_i \right) - \frac{\partial \mathcal{L}}{\partial t} \, \mathrm{d}t\ .</math> The term in parentheses on the left-hand side is just the Hamiltonian <math display="inline">\mathcal H = \sum p_i \dot{q}^i - \mathcal L</math> defined previously, therefore: <math display="block">\mathrm{d} \mathcal{H} = \sum_i \left( - \frac{\partial \mathcal{L}}{\partial q^i} \, \mathrm{d} q^i + \dot{q}^i \, \mathrm{d} p_i \right) - \frac{\partial \mathcal{L}}{\partial t} \, \mathrm{d}t\ .</math> One may also calculate the total differential of the Hamiltonian <math>\mathcal H</math> with respect to coordinates {{tmath|1= q^i }}, {{tmath|1= p_i }}, {{tmath|1= t }} instead of {{tmath|1= q^i }}, {{tmath|1= \dot{q}^i }}, {{tmath|1= t }}, yielding: <math display="block">\mathrm{d} \mathcal{H} =\sum_i \left( \frac{\partial \mathcal{H}}{\partial q^i} \mathrm{d} q^i + \frac{\partial \mathcal{H}}{\partial p_i} \mathrm{d} p_i \right) + \frac{\partial \mathcal{H}}{\partial t} \, \mathrm{d}t\ .</math> One may now equate these two expressions for {{tmath|1= d\mathcal H }}, one in terms of {{tmath|1= \mathcal L }}, the other in terms of {{tmath|1= \mathcal H }}: <math display="block">\sum_i \left( - \frac{\partial \mathcal{L}}{\partial q^i} \mathrm{d} q^i + \dot{q}^i \mathrm{d} p_i \right) - \frac{\partial \mathcal{L}}{\partial t} \, \mathrm{d}t \ =\ \sum_i \left( \frac{\partial \mathcal{H}}{\partial q^i} \mathrm{d} q^i + \frac{\partial \mathcal{H}}{\partial p_i} \mathrm{d} p_i \right) + \frac{\partial \mathcal{H}}{\partial t} \, \mathrm{d}t\ .</math> Since these calculations are off-shell, one can equate the respective coefficients of {{tmath|1= \mathrm{d}q^i }}, {{tmath|1= \mathrm{d}p_i}}, {{tmath|1= \mathrm{d}t }} on the two sides: <math display="block">\frac{\partial \mathcal{H}}{\partial q^i} = - \frac{\partial \mathcal{L}}{\partial q^i} \quad, \quad \frac{\partial \mathcal{H}}{\partial p_i} = \dot{q}^i \quad, \quad \frac{\partial \mathcal{H}}{\partial t } = - {\partial \mathcal{L} \over \partial t}\ . </math> On-shell, one substitutes parametric functions <math>q^i=q^i(t)</math> which define a trajectory in phase space with velocities {{tmath|1= \dot q^i = \tfrac{d}{dt}q^i(t) }}, obeying [[Euler–Lagrange equation|Lagrange's equations]]: <math display="block">\frac{\mathrm{d}}{\mathrm{d}t} \frac{\partial \mathcal{L}}{\partial \dot{q}^i} - \frac{\partial \mathcal{L}}{\partial q^i} = 0\ . </math> Rearranging and writing in terms of the on-shell <math>p_i = p_i(t) </math> gives: <math display="block">\frac{\partial \mathcal{L}}{\partial q^i} = \dot{p}_i\ . </math> Thus Lagrange's equations are equivalent to Hamilton's equations: <math display="block">\frac{\partial \mathcal{H}}{\partial q^i} =- \dot{p}_i \quad , \quad \frac{\partial \mathcal{H}}{\partial p_i} = \dot{q}^i \quad , \quad \frac{\partial \mathcal{H}}{\partial t} = - \frac{\partial \mathcal{L}}{\partial t}\, .</math> In the case of time-independent <math>\mathcal H</math> and {{tmath|1= \mathcal L }}, i.e. {{tmath|1= \partial\mathcal H/\partial t = -\partial\mathcal L/\partial t = 0 }}, Hamilton's equations consist of {{math|2''n''}} first-order [[differential equation]]s, while Lagrange's equations consist of {{mvar|n}} second-order equations. Hamilton's equations usually do not reduce the difficulty of finding explicit solutions, but important theoretical results can be derived from them, because coordinates and momenta are independent variables with nearly symmetric roles. Hamilton's equations have another advantage over Lagrange's equations: if a system has a symmetry, so that some coordinate <math>q_i </math> does not occur in the Hamiltonian (i.e. a ''cyclic coordinate''), the corresponding momentum coordinate <math>p_i </math> is conserved along each trajectory, and that coordinate can be reduced to a constant in the other equations of the set. This effectively reduces the problem from {{mvar|n}} coordinates to {{math|(''n'' − 1)}} coordinates: this is the basis of [[symplectic reduction]] in geometry. In the Lagrangian framework, the conservation of momentum also follows immediately, however all the generalized velocities <math>\dot q_i </math> still occur in the Lagrangian, and a system of equations in {{mvar|n}} coordinates still has to be solved.<ref name=Goldstein>{{harvnb|Goldstein|Poole|Safko|2002|pp=347–349}}</ref> The Lagrangian and Hamiltonian approaches provide the groundwork for deeper results in classical mechanics, and suggest analogous formulations in [[quantum mechanics]]: the [[path integral formulation]] and the [[Schrödinger equation]]. == Properties of the Hamiltonian == * The value of the Hamiltonian <math> \mathcal H</math> is the total energy of the system if and only if the energy function <math>E_ \mathcal L</math> has the same property. (See definition of {{tmath|1= \mathcal H }}).{{clarify|reason=Same as what? |date=January 2024}} * <math>\frac{d \mathcal H}{dt} = \frac{\partial \mathcal H}{\partial t}</math> when {{tmath|1= \mathbf p(t) }}, {{tmath|1= \mathbf q(t) }} form a solution of Hamilton's equations.{{pb}} Indeed, <math display="inline">\frac{d \mathcal H}{dt} = \frac{\partial \mathcal H}{\partial \boldsymbol{p}}\cdot \dot\boldsymbol{p} + \frac{\partial \mathcal H}{\partial \boldsymbol{q}}\cdot \dot\boldsymbol{q} + \frac{\partial \mathcal H}{\partial t},</math> and everything but the final term cancels out. * <math> \mathcal{H}</math> does not change under ''point transformations'', i.e. smooth changes <math>\boldsymbol{q} \leftrightarrow \boldsymbol{q'}</math> of space coordinates. (Follows from the invariance of the energy function <math>E_{\mathcal{L}}</math> under point transformations. The invariance of <math>E_{\mathcal L}</math> can be established directly). * <math>\frac{\partial \mathcal H}{\partial t} = -\frac{\partial \mathcal L}{\partial t}.</math> (See ''{{slink|#Deriving Hamilton's equations}}''). * {{tmath|1= -\frac{\partial \mathcal H}{\partial q^i} = \dot p_i = \frac{\partial \mathcal L}{\partial q^i} }}. (Compare Hamilton's and Euler-Lagrange equations or see ''{{slink|#Deriving Hamilton's equations}}''). * <math>\frac{\partial \mathcal H}{\partial q^i} = 0</math> if and only if {{tmath|1= \frac{\partial \mathcal L}{\partial q^i}=0 }}.{{pb}}A coordinate for which the last equation holds is called ''cyclic'' (or ''ignorable''). Every cyclic coordinate <math>q^i</math> reduces the number of degrees of freedom by {{tmath|1= 1 }}, causes the corresponding momentum <math>p_i</math> to be conserved, and makes Hamilton's equations [[Routhian mechanics|easier]] to solve. == Hamiltonian as the total system energy == In its application to a given system, the Hamiltonian is often taken to be <math display="block">\mathcal{H} = T + V</math> where <math>T</math> is the kinetic energy and <math>V</math> is the potential energy. Using this relation can be simpler than first calculating the Lagrangian, and then deriving the Hamiltonian from the Lagrangian. However, the relation is not true for all systems. The relation holds true for nonrelativistic systems when all of the following conditions are satisfied<ref name="Malham2016">{{harvnb|Malham|2016|pp=49-50}}</ref><ref name="Landau1976">{{harvnb|Landau|Lifshitz|1976|p=14}}</ref> <math display="block"> \frac{\partial V(\boldsymbol{q},\boldsymbol{\dot{q}},t)}{\partial \dot{q}_i} = 0 \;,\quad \forall i </math> <math display="block"> \frac{\partial T(\boldsymbol{q},\boldsymbol{\dot{q}},t)}{\partial t} = 0 </math> <math display="block"> T(\boldsymbol{q},\boldsymbol{\dot{q}}) = \sum^n_{i=1} \sum^n_{j=1} \biggl( c_{ij}(\boldsymbol{q}) \dot{q}_i \dot{q}_j \biggr) </math> where <math>t</math> is time, <math>n</math> is the number of degrees of freedom of the system, and each <math>c_{ij}(\boldsymbol{q})</math> is an arbitrary scalar function of <math>\boldsymbol{q}</math>. In words, this means that the relation <math>\mathcal{H} = T + V</math> holds true if <math>T</math> does not contain time as an explicit variable (it is [[scleronomic]]), <math>V</math> does not contain generalised velocity as an explicit variable, and each term of <math>T</math> is quadratic in generalised velocity. === Proof === Preliminary to this proof, it is important to address an ambiguity in the related mathematical notation. While a change of variables can be used to equate <math>\mathcal{L}(\boldsymbol{p},\boldsymbol{q},t) = \mathcal{L}(\boldsymbol{q},\boldsymbol{\dot{q}},t)</math>, it is important to note that <math>\frac{\partial\mathcal{L}(\boldsymbol{q},\boldsymbol{\dot{q}},t)}{\partial\dot{q}_i} \neq \frac{\partial\mathcal{L}(\boldsymbol{p},\boldsymbol{q},t)}{\partial\dot{q}_i}</math>. In this case, the right hand side always evaluates to 0. To perform a change of variables inside of a partial derivative, the [[Chain rule#Multivariable_case|multivariable chain rule]] should be used. Hence, to avoid ambiguity, the function arguments of any term inside of a partial derivative should be stated. Additionally, this proof uses the notation <math>f(a,b,c)=f(a,b)</math> to imply that <math>\frac{\partial f(a,b,c)}{\partial c}=0</math>. {{Proof| Starting from definitions of the Hamiltonian, generalized momenta, and Lagrangian for an <math>n</math> degrees of freedom system <math display="block"> \mathcal{H} = \sum^n_{i=1} \biggl( p_i\dot{q}_i \biggr) - \mathcal{L}(\boldsymbol{q},\boldsymbol{\dot{q}},t) </math> <math display="block"> p_i(\boldsymbol{q},\boldsymbol{\dot{q}},t) = \frac{\partial\mathcal{L}(\boldsymbol{q},\boldsymbol{\dot{q}},t)}{\partial\dot{q}_i} </math> <math display="block"> \mathcal{L}(\boldsymbol{q},\boldsymbol{\dot{q}},t) = T(\boldsymbol{q},\boldsymbol{\dot{q}},t) - V(\boldsymbol{q},\boldsymbol{\dot{q}},t) </math> Substituting the generalized momenta into the Hamiltonian gives <math display="block"> \mathcal{H} = \sum^n_{i=1} \left( \frac{\partial\mathcal{L}(\boldsymbol{q},\boldsymbol{\dot{q}},t)}{\partial\dot{q}_i}\dot{q}_i \right) - \mathcal{L}(\boldsymbol{q},\boldsymbol{\dot{q}},t) </math> Substituting the Lagrangian into the result gives <math display="block">\begin{align} \mathcal{H} &= \sum^n_{i=1} \left( \frac{\partial\left( T(\boldsymbol{q},\boldsymbol{\dot{q}},t) - V(\boldsymbol{q},\boldsymbol{\dot{q}},t) \right)}{\partial\dot{q}_i}\dot{q}_i \right) - \left( T(\boldsymbol{q},\boldsymbol{\dot{q}},t) - V(\boldsymbol{q},\boldsymbol{\dot{q}},t) \right) \\ &= \sum^n_{i=1} \left( \frac{\partial T(\boldsymbol{q},\boldsymbol{\dot{q}},t)}{\partial\dot{q}_i}\dot{q}_i - \frac{\partial V(\boldsymbol{q},\boldsymbol{\dot{q}},t)}{\partial\dot{q}_i}\dot{q}_i \right) - T(\boldsymbol{q},\boldsymbol{\dot{q}},t) + V(\boldsymbol{q},\boldsymbol{\dot{q}},t) \end{align}</math> Now assume that <math display="block"> \frac{\partial V(\boldsymbol{q},\boldsymbol{\dot{q}},t)}{\partial \dot{q}_i} = 0 \;,\quad \forall i </math> and also assume that <math display="block"> \frac{\partial T(\boldsymbol{q},\boldsymbol{\dot{q}},t)}{\partial t} = 0 </math> Applying these assumptions results in <math display="block">\begin{align} \mathcal{H} &= \sum^n_{i=1} \left( \frac{\partial T(\boldsymbol{q},\boldsymbol{\dot{q}})}{\partial\dot{q}_i}\dot{q}_i - \frac{\partial V(\boldsymbol{q},t)}{\partial\dot{q}_i}\dot{q}_i \right) - T(\boldsymbol{q},\boldsymbol{\dot{q}}) + V(\boldsymbol{q},t) \\ &= \sum^n_{i=1} \left( \frac{\partial T(\boldsymbol{q},\boldsymbol{\dot{q}})}{\partial\dot{q}_i}\dot{q}_i \right) - T(\boldsymbol{q},\boldsymbol{\dot{q}}) + V(\boldsymbol{q},t) \end{align}</math> Next assume that T is of the form <math display="block"> T(\boldsymbol{q},\boldsymbol{\dot{q}}) = \sum^n_{i=1} \sum^n_{j=1} \biggl( c_{ij}(\boldsymbol{q}) \dot{q}_i \dot{q}_j \biggr) </math> where each <math>c_{ij}(\boldsymbol{q})</math> is an arbitrary scalar function of <math>\boldsymbol{q}</math>. Differentiating this with respect to <math>\dot{q}_l</math>, <math>l \in [1,n]</math>, gives <math display="block">\begin{align} \frac{\partial T(\boldsymbol{q},\boldsymbol{\dot{q}})}{\partial\dot{q}_l} &= \sum^n_{i=1} \sum^n_{j=1} \biggl( \frac{\partial\left[ c_{ij}(\boldsymbol{q})\dot{q}_i\dot{q}_j \right]}{\partial \dot{q}_l} \biggr) \\ &= \sum^n_{i=1} \sum^n_{j=1} \biggl( c_{ij}(\boldsymbol{q}) \frac{\partial\left[ \dot{q}_i\dot{q}_j \right]}{\partial \dot{q}_l} \biggr) \end{align}</math> Splitting the summation, evaluating the partial derivative, and rejoining the summation gives <math display="block">\begin{align} \frac{\partial T(\boldsymbol{q},\boldsymbol{\dot{q}})}{\partial\dot{q}_l} &= \sum^n_{i \neq l} \sum^n_{j \neq l} \biggl( c_{ij}(\boldsymbol{q}) \frac{\partial\left[ \dot{q}_i\dot{q}_j \right]}{\partial \dot{q}_l} \biggr) + \sum^n_{i \neq l} \biggl( c_{il}(\boldsymbol{q}) \frac{\partial\left[ \dot{q}_i\dot{q}_l \right]}{\partial \dot{q}_l} \biggr) + \sum^n_{j \neq l} \biggl( c_{lj}(\boldsymbol{q}) \frac{\partial\left[ \dot{q}_l\dot{q}_j \right]}{\partial \dot{q}_l} \biggr) + c_{ll}(\boldsymbol{q}) \frac{\partial\left[ \dot{q}_l^2 \right]}{\partial \dot{q}_l} \\ &= \sum^n_{i \neq l} \sum^n_{j \neq l} \biggl( 0 \biggr) + \sum^n_{i \neq l} \biggl( c_{il}(\boldsymbol{q}) \dot{q}_i \biggr) + \sum^n_{j \neq l} \biggl( c_{lj}(\boldsymbol{q}) \dot{q}_j \biggr) + 2 c_{ll}(\boldsymbol{q}) \dot{q}_l \\ &= \sum^n_{i=1} \biggl( c_{il}(\boldsymbol{q}) \dot{q}_i \biggr) + \sum^n_{j=1} \biggl( c_{lj}(\boldsymbol{q}) \dot{q}_j \biggr) \end{align}</math> Summing (this multiplied by <math>\dot{q}_l</math>) over <math>l</math> results in <math display="block">\begin{align} \sum^n_{l=1} \left( \frac{\partial T(\boldsymbol{q},\boldsymbol{\dot{q}})}{\partial\dot{q}_l}\dot{q}_l \right) &= \sum^n_{l=1} \left( \left( \sum^n_{i=1} \biggl( c_{il}(\boldsymbol{q}) \dot{q}_i \biggr) + \sum^n_{j=1} \biggl( c_{lj}(\boldsymbol{q}) \dot{q}_j \biggr) \right) \dot{q}_l \right) \\ &= \sum^n_{l=1} \sum^n_{i=1} \biggl( c_{il}(\boldsymbol{q}) \dot{q}_i \dot{q}_l \biggr) + \sum^n_{l=1} \sum^n_{j=1} \biggl( c_{lj}(\boldsymbol{q}) \dot{q}_j \dot{q}_l \biggr) \\ &= \sum^n_{i=1} \sum^n_{l=1} \biggl( c_{il}(\boldsymbol{q}) \dot{q}_i \dot{q}_l \biggr) + \sum^n_{l=1} \sum^n_{j=1} \biggl( c_{lj}(\boldsymbol{q}) \dot{q}_l \dot{q}_j \biggr) \\ &= T(\boldsymbol{q},\boldsymbol{\dot{q}}) + T(\boldsymbol{q},\boldsymbol{\dot{q}}) \\ &= 2 T(\boldsymbol{q},\boldsymbol{\dot{q}}) \end{align}</math> This simplification is a result of [[Homogeneous_function#Euler's_theorem|Euler's homogeneous function theorem]]. Hence, the Hamiltonian becomes <math display="block">\begin{align} \mathcal{H} &= \sum^n_{i=1} \left( \frac{\partial T(\boldsymbol{q},\boldsymbol{\dot{q}})}{\partial\dot{q}_i}\dot{q}_i \right) - T(\boldsymbol{q},\boldsymbol{\dot{q}}) + V(\boldsymbol{q},t) \\ &= 2 T(\boldsymbol{q},\boldsymbol{\dot{q}}) - T(\boldsymbol{q},\boldsymbol{\dot{q}}) + V(\boldsymbol{q},t) \\ &= T(\boldsymbol{q},\boldsymbol{\dot{q}}) + V(\boldsymbol{q},t) \end{align}</math> }} === Application to systems of point masses === For a system of point masses, the requirement for <math>T</math> to be quadratic in generalised velocity is always satisfied for the case where <math>T(\boldsymbol{q},\boldsymbol{\dot{q}},t)=T(\boldsymbol{q},\boldsymbol{\dot{q}})</math>, which is a requirement for <math>\mathcal{H} = T + V</math> anyway. {{Proof| Consider the kinetic energy for a system of N point masses. If it is assumed that <math>T(\boldsymbol{q},\boldsymbol{\dot{q}},t)=T(\boldsymbol{q},\boldsymbol{\dot{q}})</math>, then it can be shown that <math>\dot{\mathbf{r}}_k(\boldsymbol{q},\boldsymbol{\dot{q}},t)=\dot{\mathbf{r}}_k(\boldsymbol{q},\boldsymbol{\dot{q}})</math> (See ''{{slink|Scleronomous#Application}}''). Therefore, the kinetic energy is <math display="block"> T(\boldsymbol{q},\boldsymbol{\dot{q}}) = \frac{1}{2} \sum_{k=1}^N \biggl( m_k \dot{\mathbf{r}}_k(\boldsymbol{q},\boldsymbol{\dot{q}}) \cdot \dot{\mathbf{r}}_k(\boldsymbol{q},\boldsymbol{\dot{q}}) \biggr) </math> The chain rule for many variables can be used to expand the velocity <math display="block">\begin{align} \dot{\mathbf{r}}_k(\boldsymbol{q},\boldsymbol{\dot{q}}) &= \frac{d\mathbf{r}_k(\boldsymbol{q})}{dt} \\ &= \sum^n_{i=1} \left( \frac{\partial \mathbf{r}_k(\boldsymbol{q})}{\partial q_i}\dot{q}_i \right) \end{align}</math> Resulting in <math display="block">\begin{align} T(\boldsymbol{q},\boldsymbol{\dot{q}}) &= \frac{1}{2} \sum_{k=1}^N \left( m_k \left( \sum^n_{i=1} \left( \frac{\partial \mathbf{r}_k(\boldsymbol{q})}{\partial q_i}\dot{q}_i \right) \cdot \sum^n_{j=1} \left( \frac{\partial \mathbf{r}_k(\boldsymbol{q})}{\partial q_j}\dot{q}_j \right) \right) \right) \\ &= \sum_{k=1}^N \sum^n_{i=1} \sum^n_{j=1} \left( \frac{1}{2} m_k \frac{\partial \mathbf{r}_k(\boldsymbol{q})}{\partial q_i} \cdot \frac{\partial \mathbf{r}_k(\boldsymbol{q})}{\partial q_j} \dot{q}_i \dot{q}_j \right) \\ &= \sum^n_{i=1} \sum^n_{j=1} \left( \sum_{k=1}^N \left( \frac{1}{2} m_k \frac{\partial \mathbf{r}_k(\boldsymbol{q})}{\partial q_i} \cdot \frac{\partial \mathbf{r}_k(\boldsymbol{q})}{\partial q_j} \right) \dot{q}_i \dot{q}_j \right) \\ &= \sum^n_{i=1} \sum^n_{j=1} \biggl( c_{ij}(\boldsymbol{q}) \dot{q}_i \dot{q}_j \biggr) \end{align}</math> This is of the required form. }} === Conservation of energy === If the conditions for <math>\mathcal{H} = T + V</math> are satisfied, then conservation of the Hamiltonian implies conservation of energy. This requires the additional condition that <math>V</math> does not contain time as an explicit variable. <math display="block"> \frac{\partial V(\boldsymbol{q},\boldsymbol{\dot{q}},t)}{\partial t} = 0 </math> In summary, the requirements for <math>\mathcal{H} = T + V = \text{constant of time}</math> to be satisfied for a nonrelativistic system are<ref name="Malham2016"/><ref name="Landau1976"/> # <math>V=V(\boldsymbol{q})</math> # <math>T=T(\boldsymbol{q},\boldsymbol{\dot{q}})</math> # <math>T</math> is a homogeneous quadratic function in <math>\boldsymbol{\dot{q}}</math> Regarding extensions to the Euler-Lagrange formulation which use dissipation functions (See ''{{slink|Lagrangian_mechanics#Extensions_to_include_non-conservative_forces}}''), e.g. the [[Rayleigh dissipation function]], energy is not conserved when a dissipation function has effect. It is possible to explain the link between this and the former requirements by relating the extended and conventional Euler-Lagrange equations: grouping the extended terms into the potential function produces a velocity dependent potential. Hence, the requirements are not satisfied when a dissipation function has effect. == Hamiltonian of a charged particle in an electromagnetic field == A sufficient illustration of Hamiltonian mechanics is given by the Hamiltonian of a charged particle in an [[electromagnetic field]]. In [[Cartesian coordinates]] the [[Lagrangian mechanics#Electromagnetism|Lagrangian]] of a non-relativistic classical particle in an electromagnetic field is (in [[SI Units]]): <math display="block"> \mathcal{L} = \sum_i \tfrac{1}{2} m \dot{x}_i^2 + \sum_i q \dot{x}_i A_i - q \varphi ,</math> where {{mvar|q}} is the [[electric charge]] of the particle, {{mvar|φ}} is the [[electric potential|electric scalar potential]], and the {{mvar|A<sub>i</sub>}} are the components of the [[magnetic vector potential]] that may all explicitly depend on <math>x_i</math> and {{tmath|1= t }}. This Lagrangian, combined with [[Euler–Lagrange equation]], produces the [[Lorentz force]] law <math display="block">m \ddot{\mathbf{x}} = q \mathbf{E} + q \dot{\mathbf{x}} \times \mathbf{B} \, , </math> and is called [[minimal coupling]]. The [[canonical momenta]] are given by: <math display="block"> p_i = \frac{\partial \mathcal{L}}{ \partial \dot{x}_i} = m \dot{x}_i + q A_i .</math> The Hamiltonian, as the [[Legendre transformation]] of the Lagrangian, is therefore: <math display="block"> \mathcal{H} = \sum_i \dot{x}_i p_i - \mathcal{L} = \sum_i \frac{ \left(p_i - q A_i\right)^2 }{2m} + q \varphi .</math> This equation is used frequently in [[quantum mechanics]]. Under [[gauge transformation]]: <math display="block">\mathbf{A} \rightarrow \mathbf{A}+\nabla f \,, \quad \varphi \rightarrow \varphi-\dot f \,, </math> where {{math|''f''('''r''', ''t'')}} is any scalar function of space and time. The aforementioned Lagrangian, the canonical momenta, and the Hamiltonian transform like: <math display="block">L \rightarrow L'= L+q\frac{df}{dt} \,, \quad \mathbf{p} \rightarrow \mathbf{p'} = \mathbf{p}+q\nabla f \,, \quad H \rightarrow H' = H-q\frac{\partial f}{\partial t} \,, </math> which still produces the same Hamilton's equation: <math display="block"> \begin{align} \left.\frac{\partial H'}{\partial{x_i}}\right|_{p'_i}&=\left.\frac{\partial}{\partial{x_i}}\right|_{p'_i}(\dot x_ip'_i-L')=-\left.\frac{\partial L'}{\partial{x_i}}\right|_{p'_i} \\ &=-\left.\frac{\partial L}{\partial{x_i}}\right|_{p'_i}-q\left.\frac{\partial}{\partial{x_i}}\right|_{p'_i}\frac{df}{dt} \\ &= -\frac{d}{dt}\left(\left.\frac{\partial L}{\partial{\dot x_i}}\right|_{p'_i}+q\left.\frac{\partial f}{\partial{x_i}}\right|_{p'_i}\right)\\ &=-\dot p'_i \end{align} </math> In quantum mechanics, the [[wave function]] will also undergo a [[Topological group|local]] [[U(1)]] group transformation<ref>{{cite journal |last1=Zinn-Justin |first1=Jean |last2=Guida |first2=Riccardo |date=2008-12-04 |title=Gauge invariance |journal=Scholarpedia |language=en |volume=3 |issue=12 |pages=8287 |doi=10.4249/scholarpedia.8287 |bibcode=2008SchpJ...3.8287Z |issn=1941-6016 |doi-access=free}}</ref> during the Gauge Transformation, which implies that all physical results must be invariant under local U(1) transformations. === Relativistic charged particle in an electromagnetic field === The [[Relativistic Lagrangian mechanics|relativistic Lagrangian]] for a particle ([[Invariant mass|rest mass]] <math>m</math> and [[Electric charge|charge]] {{tmath|1= q }}) is given by: <math display="block">\mathcal{L}(t) = - m c^2 \sqrt {1 - \frac{{\dot{\mathbf{x}}(t)}^2}{c^2}} + q \dot{\mathbf{x}}(t) \cdot \mathbf{A} \left(\mathbf{x}(t),t\right) - q \varphi \left(\mathbf{x}(t),t\right) </math> Thus the particle's canonical momentum is <math display="block">\mathbf{p}(t) = \frac{\partial \mathcal{L}}{\partial \dot{\mathbf{x}}} = \frac{m \dot{\mathbf{x}}}{\sqrt {1 - \frac{{\dot{\mathbf{x}}}^2}{c^2}}} + q \mathbf{A} </math> that is, the sum of the kinetic momentum and the potential momentum. Solving for the velocity, we get <math display="block">\dot{\mathbf{x}}(t) = \frac{\mathbf{p} - q \mathbf{A} }{\sqrt {m^2 + \frac{1}{c^2}{\left( \mathbf{p} - q \mathbf{A} \right) }^2}} </math> So the Hamiltonian is <math display="block">\mathcal{H}(t) = \dot{\mathbf{x}} \cdot \mathbf{p} - \mathcal{L} = c \sqrt {m^2 c^2 + {\left( \mathbf{p} - q \mathbf{A} \right) }^2} + q \varphi </math> This results in the force equation (equivalent to the [[Euler–Lagrange equation]]) <math display="block">\dot{\mathbf{p}} = - \frac{\partial \mathcal{H}}{\partial \mathbf{x}} = q \dot{\mathbf{x}}\cdot(\boldsymbol{\nabla} \mathbf{A}) - q \boldsymbol{\nabla} \varphi = q \boldsymbol{\nabla}(\dot{\mathbf{x}} \cdot\mathbf{A}) - q \boldsymbol{\nabla} \varphi </math> from which one can derive <math display="block">\begin{align} \frac\mathrm{d}{\mathrm{d} t}\left(\frac{m \dot{\mathbf{x}}} {\sqrt {1 - \frac{\dot{\mathbf{x}}^2}{c^2}}}\right) &=\frac\mathrm{d}{\mathrm{d} t}(\mathbf{p} - q \mathbf{A})=\dot\mathbf{p}-q\frac{\partial \mathbf{A}}{\partial t}-q(\dot\mathbf{x}\cdot\nabla)\mathbf{A} \\ &=q \boldsymbol{\nabla}(\dot{\mathbf{x}} \cdot\mathbf{A}) - q \boldsymbol{\nabla} \varphi -q\frac{\partial \mathbf{A}}{\partial t}-q(\dot\mathbf{x}\cdot\nabla)\mathbf{A} \\ &= q \mathbf{E} + q \dot{\mathbf{x}} \times \mathbf{B} \end{align} </math> The above derivation makes use of the [[Vector calculus identities#Dot product rule|vector calculus identity]]: <math display="block"> \tfrac{1}{2} \nabla \left( \mathbf{A} \cdot \mathbf{A} \right) = \mathbf{A} \cdot \mathbf{J}_\mathbf{A} = \mathbf{A} \cdot (\nabla \mathbf{A}) = (\mathbf{A} \cdot \nabla) \mathbf{A} + \mathbf{A} \times (\nabla \times \mathbf{A}) .</math> An equivalent expression for the Hamiltonian as function of the relativistic (kinetic) momentum, {{tmath|1= \mathbf{P} = \gamma m \dot{\mathbf{x} }(t) = \mathbf{p} - q \mathbf{A} }}, is <math display="block">\mathcal{H}(t) = \dot{\mathbf{x}}(t) \cdot \mathbf{P}(t) +\frac{mc^2}{\gamma} + q \varphi (\mathbf{x}(t),t)=\gamma mc^2+ q \varphi (\mathbf{x}(t),t)=E+V</math> This has the advantage that kinetic momentum <math>\mathbf{P}</math> can be measured experimentally whereas canonical momentum <math>\mathbf{p}</math> cannot. Notice that the Hamiltonian ([[total energy]]) can be viewed as the sum of the [[kinetic energy#Relativistic kinetic energy of rigid bodies|relativistic energy (kinetic+rest)]], {{tmath|1= E = \gamma m c^2 }}, plus the [[potential energy]], {{tmath|1= V = q \varphi }}. == From symplectic geometry to Hamilton's equations == === Geometry of Hamiltonian systems === The Hamiltonian can induce a [[symplectic structure]] on a [[smooth manifold|smooth even-dimensional manifold]] {{math|''M''<sup>2''n''</sup>}} in several equivalent ways, the best known being the following:{{sfn |Arnol'd |Kozlov | Neĩshtadt |1988 |loc=§3. Hamiltonian mechanics}} As a [[closed differential form|closed]] [[nondegenerate form|nondegenerate]] [[symplectic form|symplectic]] [[2-form]] ''ω''. According to [[Darboux's theorem]], in a small neighbourhood around any point on {{mvar|M}} there exist suitable local coordinates <math>p_1, \cdots, p_n, \ q_1, \cdots, q_n</math> (''[[canonical coordinates|canonical]]'' or ''symplectic'' coordinates) in which the [[symplectic form]] becomes: <math display="block">\omega = \sum_{i=1}^n dp_i \wedge dq_i \, .</math> The form <math>\omega</math> induces a [[natural isomorphism]] of the [[tangent space]] with the [[cotangent space]]: {{tmath|1= T_xM \cong T^*_xM }}. This is done by mapping a vector <math>\xi \in T_x M</math> to the 1-form {{tmath|1= \omega_\xi \in T^*_xM }}, where <math>\omega_\xi (\eta) = \omega(\eta, \xi)</math> for all {{tmath|1= \eta \in T_x M }}. Due to the [[bilinear form|bilinearity]] and non-degeneracy of {{tmath|1= \omega }}, and the fact that {{tmath|1= \dim T_x M = \dim T^*_x M }}, the mapping <math>\xi \to \omega_\xi</math> is indeed a [[linear isomorphism]]. This isomorphism is ''natural'' in that it does not change with change of coordinates on <math>M.</math> Repeating over all {{tmath|1= x \in M }}, we end up with an isomorphism <math>J^{-1} : \text{Vect}(M) \to \Omega^1(M)</math> between the infinite-dimensional space of smooth vector fields and that of smooth 1-forms. For every <math>f,g \in C^\infty(M,\Reals)</math> and {{tmath|1= \xi,\eta \in \text{Vect}(M) }}, <math display="block">J^{-1}(f\xi + g\eta) = fJ^{-1}(\xi) + gJ^{-1}(\eta).</math> (In algebraic terms, one would say that the <math>C^\infty(M,\Reals)</math>-modules <math> \text{Vect}(M) </math> and <math>\Omega^1(M)</math> are isomorphic). If {{tmath|1= H \in C^\infty(M \times \R_t, \R) }}, then, for every fixed {{tmath|1= t \in \R_t }}, {{tmath|1= dH \in \Omega^1(M) }}, and {{tmath|1= J(dH) \in \text{Vect}(M) }}. <math>J(dH)</math> is known as a [[Hamiltonian vector field]]. The respective differential equation on <math>M</math> <math display="block">\dot{x} = J(dH)(x)</math> is called {{em|Hamilton's equation}}. Here <math>x=x(t)</math> and <math>J(dH)(x) \in T_xM</math> is the (time-dependent) value of the vector field <math>J(dH)</math> at {{tmath|1= x \in M }}. A Hamiltonian system may be understood as a [[fiber bundle]] {{mvar|E}} over [[time]] {{mvar|R}}, with the [[Level set|fiber]] {{mvar|E<sub>t</sub>}} being the position space at time {{math|''t'' ∈ ''R''}}. The Lagrangian is thus a function on the [[jet bundle]] {{mvar|J}} over {{mvar|E}}; taking the fiberwise [[Legendre transform]] of the Lagrangian produces a function on the dual bundle over time whose fiber at {{mvar|t}} is the [[cotangent space]] {{math|''T''<sup>∗</sup>''E<sub>t</sub>''}}, which comes equipped with a natural [[symplectic form]], and this latter function is the Hamiltonian. The correspondence between Lagrangian and Hamiltonian mechanics is achieved with the [[tautological one-form]]. Any [[smooth function|smooth]] real-valued function {{mathcal|H}} on a [[symplectic manifold]] can be used to define a [[Hamiltonian vector field|Hamiltonian system]]. The function {{mathcal|H}} is known as "the Hamiltonian" or "the energy function." The symplectic manifold is then called the [[phase space]]. The Hamiltonian induces a special [[Symplectic vector field|vector field]] on the symplectic manifold, known as the [[Hamiltonian vector field]]. The Hamiltonian vector field induces a [[Hamiltonian flow]] on the manifold. This is a one-parameter family of transformations of the manifold (the parameter of the curves is commonly called "the time"); in other words, an [[Homotopy#Isotopy|isotopy]] of [[symplectomorphism]]s, starting with the identity. By [[Liouville's theorem (Hamiltonian)|Liouville's theorem]], each symplectomorphism preserves the [[volume form]] on the [[phase space]]. The collection of symplectomorphisms induced by the Hamiltonian flow is commonly called "the Hamiltonian mechanics" of the Hamiltonian system. The symplectic structure induces a [[Poisson bracket]]. The Poisson bracket gives the space of functions on the manifold the structure of a [[Lie algebra]]. If {{mvar|F}} and {{mvar|G}} are smooth functions on {{mvar|M}} then the smooth function {{math|''ω''(''J''(''dF''), ''J''(''dG''))}} is properly defined; it is called a ''Poisson bracket'' of functions {{mvar|F}} and {{mvar|G}} and is denoted {{math|{{mset|''F'', ''G''}}}}. The Poisson bracket has the following properties: # bilinearity # antisymmetry # [[Product rule|Leibniz rule]]: <math>\{F_1 \cdot F_2, G\} = F_1\{F_2, G\} + F_2\{F_1, G\}</math> # [[Jacobi identity]]: <math>\{\{H,F\}, G\} + \{\{F, G\}, H\} + \{\{G, H\}, F\} \equiv 0</math> # non-degeneracy: if the point {{mvar|x}} on {{mvar|M}} is not critical for {{mvar|F}} then a smooth function {{mvar|G}} exists such that {{tmath|1= \{F, G\}(x) \neq 0 }}. Given a function {{mvar|f}} <math display="block">\frac{\mathrm{d}}{\mathrm{d}t} f = \frac{\partial }{\partial t} f + \left\{f,\mathcal{H}\right\},</math> if there is a [[probability distribution]] {{mvar|ρ}}, then (since the phase space velocity <math>(\dot{p}_i, \dot{q}_i)</math> has zero divergence and probability is conserved) its convective derivative can be shown to be zero and so <math display="block">\frac{\partial}{\partial t} \rho = - \left\{\rho ,\mathcal{H}\right\}</math> This is called [[Liouville's theorem (Hamiltonian)|Liouville's theorem]]. Every [[smooth function]] {{mvar|G}} over the [[symplectic manifold]] generates a one-parameter family of [[symplectomorphism]]s and if {{math|1={''G'', ''H''} = 0}}, then {{mvar|G}} is conserved and the symplectomorphisms are [[symmetry transformation]]s. A Hamiltonian may have multiple conserved quantities {{math|''G''<sub>''i''</sub>}}. If the symplectic manifold has dimension {{math|2''n''}} and there are {{mvar|n}} functionally independent conserved quantities {{mvar|G<sub>i</sub>}} which are in involution (i.e., {{math|1={{mset|''G''<sub>''i''</sub>, ''G''<sub>''j''</sub>}} = 0}}), then the Hamiltonian is [[Liouville integrability|Liouville integrable]]. The [[Liouville–Arnold theorem]] says that, locally, any Liouville integrable Hamiltonian can be transformed via a symplectomorphism into a new Hamiltonian with the conserved quantities {{mvar|G<sub>i</sub>}} as coordinates; the new coordinates are called ''action–angle coordinates''. The transformed Hamiltonian depends only on the {{math|''G''<sub>''i''</sub>}}, and hence the equations of motion have the simple form <math display="block"> \dot{G}_i = 0 \quad , \quad \dot{\varphi}_i = F_i(G)</math> for some function {{mvar|F}}.<ref>{{harvnb|Arnol'd|Kozlov|Neĩshtadt|1988}}</ref> There is an entire field focusing on small deviations from integrable systems governed by the [[KAM theorem]]. The integrability of Hamiltonian vector fields is an open question. In general, Hamiltonian systems are [[chaos theory|chaotic]]; concepts of measure, completeness, integrability and stability are poorly defined. === Riemannian manifolds === <!-- This section is linked from [[Geodesic]] --> An important special case consists of those Hamiltonians that are [[quadratic form]]s, that is, Hamiltonians that can be written as <math display="block">\mathcal{H}(q,p) = \tfrac{1}{2} \langle p, p\rangle_q</math> where {{math|⟨ , ⟩<sub>''q''</sub>}} is a smoothly varying [[inner product]] on the [[fibre bundle|fibers]] {{math|''T''{{su|b=''q''|p=∗}}''Q''}}, the [[cotangent space]] to the point {{mvar|q}} in the [[Configuration space (physics)|configuration space]], sometimes called a cometric. This Hamiltonian consists entirely of the kinetic term. If one considers a [[Riemannian manifold]] or a [[pseudo-Riemannian manifold]], the [[metric tensor|Riemannian metric]] induces a linear isomorphism between the tangent and cotangent bundles. (See ''[[Musical isomorphism]]''). Using this isomorphism, one can define a cometric. (In coordinates, the matrix defining the cometric is the inverse of the matrix defining the metric.) The solutions to the [[Hamilton–Jacobi equation]]s for this Hamiltonian are then the same as the [[geodesic]]s on the manifold. In particular, the [[Hamiltonian flow]] in this case is the same thing as the [[geodesic flow]]. The existence of such solutions, and the completeness of the set of solutions, are discussed in detail in the article on [[geodesic]]s. See also ''[[Geodesics as Hamiltonian flows]]''. === Sub-Riemannian manifolds === When the cometric is degenerate, then it is not invertible. In this case, one does not have a Riemannian manifold, as one does not have a metric. However, the Hamiltonian still exists. In the case where the cometric is degenerate at every point {{mvar|q}} of the configuration space manifold {{mvar|Q}}, so that the [[Rank (linear algebra)|rank]] of the cometric is less than the dimension of the manifold {{mvar|Q}}, one has a [[sub-Riemannian manifold]]. The Hamiltonian in this case is known as a '''sub-Riemannian Hamiltonian'''. Every such Hamiltonian uniquely determines the cometric, and vice versa. This implies that every [[sub-Riemannian manifold]] is uniquely determined by its sub-Riemannian Hamiltonian, and that the converse is true: every sub-Riemannian manifold has a unique sub-Riemannian Hamiltonian. The existence of sub-Riemannian geodesics is given by the [[Chow–Rashevskii theorem]]. The continuous, real-valued [[Heisenberg group]] provides a simple example of a sub-Riemannian manifold. For the Heisenberg group, the Hamiltonian is given by <math display="block">\mathcal{H}\left(x,y,z,p_x,p_y,p_z\right) = \tfrac{1}{2}\left( p_x^2 + p_y^2 \right).</math> {{mvar|p<sub>z</sub>}} is not involved in the Hamiltonian. === Poisson algebras === Hamiltonian systems can be generalized in various ways. Instead of simply looking at the [[associative algebra|algebra]] of [[smooth function]]s over a [[symplectic manifold]], Hamiltonian mechanics can be formulated on general [[commutative]] [[unital algebra|unital]] [[real number|real]] [[Poisson algebra]]s. A [[state (functional analysis)|state]] is a [[continuity (topology)|continuous]] [[linear functional]] on the Poisson algebra (equipped with some suitable [[topological space|topology]]) such that for any element {{mvar|A}} of the algebra, {{math|''A''<sup>2</sup>}} maps to a nonnegative real number. A further generalization is given by [[Nambu dynamics]]. === Generalization to quantum mechanics through Poisson bracket === Hamilton's equations above work well for [[classical mechanics]], but not for [[quantum mechanics]], since the differential equations discussed assume that one can specify the exact position and momentum of the particle simultaneously at any point in time. However, the equations can be further generalized to then be extended to apply to quantum mechanics as well as to classical mechanics, through the deformation of the [[Poisson algebra]] over {{mvar|p}} and {{mvar|q}} to the algebra of [[Moyal bracket]]s. Specifically, the more general form of the Hamilton's equation reads <math display="block">\frac{\mathrm{d}f}{\mathrm{d}t} = \left\{f, \mathcal{H}\right\} + \frac{\partial f}{\partial t} ,</math> where {{mvar|f}} is some function of {{mvar|p}} and {{mvar|q}}, and {{mathcal|H}} is the Hamiltonian. To find out the rules for evaluating a [[Poisson bracket]] without resorting to differential equations, see ''[[Lie algebra]]''; a Poisson bracket is the name for the Lie bracket in a [[Poisson algebra]]. These Poisson brackets can then be extended to [[Moyal bracket]]s comporting to an inequivalent Lie algebra, as proven by [[Hilbrand J. Groenewold]], and thereby describe quantum mechanical diffusion in phase space (See ''[[Phase space formulation]]'' and ''[[Wigner–Weyl transform]]''). This more algebraic approach not only permits ultimately extending [[probability distribution]]s in [[phase space]] to [[Wigner quasi-probability distribution]]s, but, at the mere Poisson bracket classical setting, also provides more power in helping analyze the relevant [[conserved quantity|conserved quantities]] in a system. == See also == {{div col|colwidth=20em}} * [[Canonical transformation]] * [[Classical field theory]] * [[Hamiltonian field theory]] * [[Hamilton's optico-mechanical analogy]] * [[Covariant Hamiltonian field theory]] * [[Classical mechanics]] * [[Dynamical systems theory]] * [[Hamiltonian system]] * [[Hamilton–Jacobi equation]] * [[Hamilton–Jacobi–Einstein equation]] * [[Lagrangian mechanics]] * [[Maxwell's equations]] * [[Hamiltonian (quantum mechanics)]] * [[Method of quantum characteristics|Quantum Hamilton's equations]] * [[Quantum field theory]] * [[Hamiltonian optics]] * [[De Donder–Weyl theory]] * [[Geometric mechanics]] * [[Routhian mechanics]] * [[Nambu mechanics]] * [[Hamiltonian fluid mechanics]] * [[Hamiltonian vector field]] {{div col end}} == References == {{reflist}} == Further reading == {{refbegin}} * {{cite book|last1=Landau|first1=Lev Davidovich|author1-link=Lev Landau|url=https://www.worldcat.org/oclc/2591126| title=Mechanics| first2=Evgenii Mikhailovich|last2=Lifshitz|author2-link=Evgeny Lifshitz|others=Sykes, J. B. (John Bradbury), Bell, J. S.| series=[[Course of Theoretical Physics]]|volume=1|isbn=0-08-021022-8| edition=3rd|year=1976| location=Oxford| oclc=2591126}} * {{cite book| author-link1=Ralph Abraham (mathematician) | first1=R. | last1=Abraham | author-link2=Jerrold E. Marsden | first2=J.E. | last2=Marsden |url=https://www.worldcat.org/oclc/3516353|title=Foundations of mechanics|date=1978| publisher=Benjamin/Cummings Pub. Co|isbn=0-8053-0102-X|edition=2d ed., rev., enl., and reset|location=Reading, Mass.| oclc=3516353}} * {{cite book | author-link1=Vladimir Arnold | first1=V. I. | last1=Arnol'd | first2=V. V. | last2=Kozlov | first3= A. I. | last3=Neĩshtadt |url=https://www.worldcat.org/oclc/16404140| chapter=Mathematical aspects of classical and celestial mechanics | title=Encyclopaedia of Mathematical Sciences, Dynamical Systems III | volume=3 |date=1988|publisher=Springer-Verlag| others=Anosov, D. V.|isbn=0-387-17002-2|location=Berlin|oclc=16404140}} * {{cite book| author-link=Vladimir Arnold | first=V. I. | last=Arnol'd |url=https://www.worldcat.org/oclc/18681352| title=Mathematical methods of classical mechanics|date=1989|publisher=Springer-Verlag|isbn=0-387-96890-3|edition=2nd| location=New York| oclc=18681352}} * {{cite book|last1=Goldstein |first1=Herbert |author-link1=Herbert Goldstein |author2-link=Charles P. Poole |last2=Poole | first2=Charles P. Jr. |last3=Safko |first3=John L.|title=[[Classical Mechanics (book)|Classical mechanics]] |edition=3rd|date=2002|publisher=Addison Wesley| isbn=0-201-31611-0|location=San Francisco|oclc=47056311}} * {{cite journal|last1=Vinogradov|first1=A. M.|author1-link=Alexandre Mikhailovich Vinogradov|last2=Kupershmidt|first2=B A| date=1977-08-31|title=The structure of Hamiltonian mechanics|url=http://stacks.iop.org/0036-0279/32/i=4/a=R04?key=crossref.1fa21a54a18c4512470aca76894eb631| journal=Russian Mathematical Surveys|volume=32|issue=4|pages=177–243| doi=10.1070/RM1977v032n04ABEH001642|bibcode=1977RuMaS..32..177V|s2cid=250805957 |issn=0036-0279|url-access=subscription}} {{refend}} == External links == {{Commons category}} * {{citation | last=Binney | first=James J. | author-link=James Binney | title=Classical Mechanics (lecture notes) | url=http://www-thphys.physics.ox.ac.uk/users/JamesBinney/cmech.pdf | publisher=[[University of Oxford]] | access-date=27 October 2010 }} <!-- dead link: url=http://www-thphys.physics.ox.ac.uk/users/JamesBinney/CMech_notes.ps --> * {{citation|last=Tong | first=David | author-link=David Tong (mathematician) | url=http://www.damtp.cam.ac.uk/user/tong/dynamics.html | title=Classical Dynamics (Cambridge lecture notes) | publisher=[[University of Cambridge]] | access-date=27 October 2010 }} * {{citation|last=Hamilton | first=William Rowan | author-link=William Rowan Hamilton| url=http://www.maths.tcd.ie/pub/HistMath/People/Hamilton/Dynamics/ | title=On a General Method in Dynamics | publisher=[[Trinity College Dublin]] }} * {{citation|last1=Malham |first1=Simon J.A. |title=An introduction to Lagrangian and Hamiltonian mechanics (lecture notes) |date=2016 |url=https://www.macs.hw.ac.uk/~simonm/mechanics.pdf}} * {{citation|last1=Morin |first1=David |title=Introduction to Classical Mechanics (Additional material: The Hamiltonian method) |date=2008 |url=https://scholar.harvard.edu/files/david-morin/files/cmchap15.pdf}} {{Industrial and applied mathematics}} {{Branches of physics}} {{Authority control}} [[Category:Hamiltonian mechanics| ]] [[Category:Classical mechanics]] [[Category:Dynamical systems]] [[Category:Mathematical physics]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Authority control
(
edit
)
Template:Branches of physics
(
edit
)
Template:Citation
(
edit
)
Template:Cite book
(
edit
)
Template:Cite journal
(
edit
)
Template:Clarify
(
edit
)
Template:Classical mechanics
(
edit
)
Template:Commons category
(
edit
)
Template:Div col
(
edit
)
Template:Div col end
(
edit
)
Template:Em
(
edit
)
Template:Equation box 1
(
edit
)
Template:Harvnb
(
edit
)
Template:Industrial and applied mathematics
(
edit
)
Template:Main
(
edit
)
Template:Math
(
edit
)
Template:Mathcal
(
edit
)
Template:Mvar
(
edit
)
Template:Navbox
(
edit
)
Template:Pb
(
edit
)
Template:Proof
(
edit
)
Template:Refbegin
(
edit
)
Template:Refend
(
edit
)
Template:Reflist
(
edit
)
Template:Sfn
(
edit
)
Template:Short description
(
edit
)
Template:Sister project
(
edit
)
Template:Slink
(
edit
)
Template:Tmath
(
edit
)