0

In Lagrangian mechanics, once we define $q$ which is about the position, then we automatically get $\dot q$ such that the data $(q,\dot q)$ uniquely determines the state of the system.

But in Hamiltonian mechanics, $p$ and $q$ are somehow independent. From my understanding, even if $(A,B)$ determines the state of a system, they may not be able to serve as generalized coordinates and momenta. My question is if we want to use Hamiltonian mechanics, how do I find the 'correct' selection of $p$ and $q$?

I know we can first write down Lagrangian and then do Legendre transform. But shouldn't Hamiltonian be an independent theory? It seems in some physics theories, for example quantum mechanics, people directly write down $(p,q)$ and work on Hamiltonian system without using Lagrangian. There should be a way to know which pair is appropriate candidate for $(p,q)$.

Qmechanic
  • 201,751
Hydrogen
  • 109

6 Answers6

4

In addition to the previous nicely written answers, let me add a review, which includes both a mathematical and a physical perspective. Let us start with Lagrangian mechanics, then develop Hamiltonian mechanics independently and finally relate the two via the fiber derivative.

A Lagrangian system is a tuple $(Q,M,L)$, where:

  1. $Q$ is an $n$-dimensional smooth manifold, called the configuration space;
  2. $M=TQ$ is the tangent bundle of $Q$, a smooth $2n$-dimensional manifold, called the velocity phase space;
  3. $L:TQ \to \mathbb{R}$ is a smooth function, called the Lagrangian of the Lagrangian system $(Q,M,L)$.

Note that in order for a Lagrangian system to be uniquely specified, you have to specify both the configuration space and the Lagrangian. In physics, we usually take specific Lagrangians, but note that this is a choice! We usually consider Lagrangians of the form kinetic energy- potential energy, which mathematically can be explicitly written as follows: \begin{equation} L:TQ \to \mathbb{R}, \; \; L(v)=m\frac{1}{2} g(v,v) - V(\pi(v)), \; \; m \in \mathbb{R} \end{equation} where

  1. $\pi:TQ \to Q$ is the canonical bundle projection, in local coordinates $\pi(q^{i},\dot q^{i})=q^{i}$;
  2. $g$ is a Riemannian metric on $Q$, $\frac{m}{2} g(v,v)$ îs the so-called kinetic energy;
  3. $V:Q \to \mathbb{R}$ is a smooth function on $Q$, the so-called potential energy.

Note that if we choose $Q=\mathbb{R}^{n}$ with the canonical metric induced by the Euclidean norm, we obtain the well-known formula from physics in coordinates: \begin{equation} L(q,\dot q)=\frac{m}{2} \sum_{i=1}^{n}\limits \dot q_i ^2 - V(q). \end{equation} To be more explicit, we make the specific choice of $n=1$ and moreover:

  1. $g$ being the canonical metric induced by the Euclidean norm;
  2. $V:Q \to \mathbb{R}, \;\; V(q)=\frac{kq^2}{2}$, where $k$ is a real number.

In this case, we obtain the one-dimensional harmonic oscillator Lagrangian: \begin{equation} L_{1dho}=\frac{m}{2} \dot{q}^2 - \frac{kq^2}{2}. \end{equation} This means concretely that $(\mathbb{R},T \mathbb{R} \cong \mathbb{R}^2,L_{1dho})$ is a Lagrangian system.

We could construct further examples from physics, by choosing a specific function $V$. However, that is not our purpose right now, as we just wanted to elaborate mathematically on the Lagrangian formalism. As a summary, let us conclude that the input data of the Lagrangian formalism consists of a smooth manifold $Q$ and a smooth function $L:TQ \to \mathbb{R}$, called the Lagrangian.

Let's turn now to the Hamiltonian formalism.

A Hamiltonian system is a tuple $(X,\omega,H)$, where:

  1. $X$ is a smooth $2n$-dimensional manifold;
  2. $\omega: T_a X \times T_a X \to \mathbb{R}$ is a non-degenerate $2$-form for all $a \in X$ and $d \omega=0$, i.e. $\omega$ is closed- that is, it's a symplectic form;
  3. $H:X \to \mathbb{R}$ is a smooth function, called the Hamiltonian.

Note that the symplectic form gives rise to dynamics, as it is related to the Poisson bracket via the formula \begin{equation} \{f,g\}=\omega(X_{f},X_{g}), \; \; \text{where} \; \; X_{f},X_{g} \; \; \text{ are the Hamiltonian vector fields associated to} \;\; f,g. \end{equation}

Note, once again, that the input data of Hamiltonian mechanics is a symplectic manifold $(X,\omega)$ together with a smooth function, called the Hamiltonian $H$. Now let us recall the Darboux theorem.

Let $(X,\omega)$ be a symplectic manifold. Then every point $a \in X$ has an open neighbourhood $U \subset X$ and a chart \begin{equation} \varphi=(q^1,q^2,\dots,q^n,p_1,p_2,\dots,p_n):U \to \mathbb{R}^{2n}, \; \; \end{equation} such that in these coordinates, we have: \begin{equation} \omega|_{U}=dq^{j} \wedge dp_{j}. \end{equation} These coordinates $(q^1,\dots,q^n,p_1,\dots,p_n)$ are called canonical coordinates.

Note that the existence of canonical coordinates is a consequence of $(X,\omega)$ being a symplectic manifold! Now, we might ask the question: are these canonical coordinates related to the coordinates $(q^{i},\dot{q}^{i})$ of Lagrangian mechanics in any reasonable manner? So far, we did not make any connection, just wrote down the existence of such, which was implied by the symplectic structure!

Before we answer that question, let us give a whole class of examples known from physics, in this abstract language of symplectic geometry. To this end, we choose $X=T^{*}Q$ for some smooth manifold $Q$. We call $T^{*}Q$ the momentum phase space. In this case, the Hamiltonian becomes a function \begin{equation} H: T^{*}Q \to \mathbb{R}, \; \; H(q^{i},p_{i}) \in \mathbb{R}. \end{equation} As we can see, there's a fundamental difference between the Lagrangian and Hamiltonian, even if they are both smooth functions:

  1. The Lagrangian is a smooth function on the tangent bundle of the configuration space, i.e. on the velocity phase space;
  2. The Hamiltonian is a smooth function on the cotangent bundle of the configuration space (as a special case), i.e. on the momentum phase space.

So before turning to relating the two, let us give the concrete example of harmonic oscillator. In this case:

  1. $X=T^{*}\mathbb{R} \cong \mathbb{R}^2$;
  2. $H_{1dho}:\mathbb{R}^2 \to \mathbb{R}, \; \; H_{1dho}(q,p)=\frac{p^2}{2m} + \frac{1}{2} k q^2$, where $k,m \in \mathbb{R}$ are real numbers.
  3. $\omega_{1dho}=dq \wedge dp$

Explicitly, this means that the tuple $(T^{*}\mathbb{R} \cong \mathbb{R}^2,\omega_{1dho},H_{1dho})$ is a Hamiltonian system.

Now, as we have seen, that, at least in special case, both formalisms start from a smooth manifold $Q$, and are specified by two functions $L$,$H$ on the tangent and cotangent bundle respectively, in order to go from Lagrangian mechanics to Hamiltonian Mechanics, we would need a map \begin{equation} f:TQ \to T^{*}Q, \end{equation} with help of which, given a Lagrangian on $TQ$, we could produce a Hamiltonian on $T^{*}Q$. This is solved by the fiber derivative.

Let $(Q,M,L)$ be a Lagrangian system with Lagrangian $L:TQ \to \mathbb{R}$. The fiber derivative of $L$ is a map \begin{equation} \mathbb{F}L:TQ \to T^{*}Q, \; \; ((\mathbb{F}L)(v))(w):=\left.\frac{d}{dt}\right|_{t=0} L(v+tw). \end{equation} Clearly, $\mathbb{F}L$ is a smooth function, as $L$ is. In case $\mathbb{F}L$ is a diffeomorphism, we say that the Lagrangian $L$ is hyperregular. The function \begin{equation} E:TQ \to \mathbb{R}, \; \; E(v):=\mathbb{F}L(v)-L(v) \end{equation} is called the total energy of the Lagrangian system $(Q,M,L)$.

Now, suppose the Lagrangian $L$ takes the form introduced before, namely: \begin{equation} L(v)=\frac{m}{2} g(v,v) - V(\pi(v)), \; \; m \in \mathbb{R}. \end{equation} We have that $\mathbb{F}L(v)=m g(v,v)$, since:

  1. $\mathbb{F}V(\pi(v))$=0, because $V$ is constant on the fibers;
  2. $\left.\frac{d}{dt}\right|_{t=0} g(v+tv,v+tv)=\left. \frac{d}{dt} \right|_{t=0} (g(v,v)+g(v,tv)+g(tv, v)+g(tv, tv))=g(v,v)+g(v,v)=2g(v,v).$

Therefore, the total energy reads: \begin{equation} E=mg(v,v)- \frac{m}{2}g(v,v) + V(\pi(v))=\frac{m}{2} g(v,v)+V(\pi(v)), \end{equation} or in special case of $\mathbb{R}$, in physics notation: \begin{equation} E=\frac{mv^2}{2} +V(q), \end{equation} which is nothing else than the intuitive notion of total energy, i.e. the sum of kinetic and potential energy.

Now let us compare this abstract definition of fiber derivative, to something well-known, the Legendre transform. To this end, we consider $Q \subseteq \mathbb{R}^{n}, TQ \cong Q \times \mathbb{R}^{n}$. In this case, the fiber derivative reads: \begin{equation} ((\mathbb{F}L)(x,v))(w):=(x, D_2 L(x,v)(w)), \end{equation} where $D_2$ denotes partial derivative of $L$ with respect to the second coordinate. If we introduce coordinates $q^{i}$ on $Q$ and $(q^{i},\dot{q}^{i})$ on $TQ$ and $(q^{i},p_{i})$ on $T^{*}Q$,, this reduces to: \begin{equation} (\mathbb{F}L)(q^{i},\dot{q}^{i})=\left(q^{i},\frac{ \partial L}{\partial \dot q^{i}} \right), \end{equation} which lets us read off that $p_i=\frac{ \partial L}{\partial \dot q^{i}}$. Moreover, the thus associated $E$ is the Legendre transform of $L$.

Let us illustrate the above abstract definition of the Fiber derivative in an easier example. Consider the Lagrangian system $(\mathbb{R},\mathbb{R}^{2},L_{f})$ of a free particle, where \begin{equation} L_{f}(q,v):=\frac{mv^2}{2}. \end{equation} In this case, the fiber derivative is a map: \begin{equation} \mathbb{F} L_{f}: \mathbb{R}^2 \to \mathbb{R}^2, \;\; (\mathbb{F} L_{f}(q,v))(w)=m \langle v, w \rangle=\langle mv, w \rangle, \end{equation} so we can identify $(\mathbb{F} L_{f})(q,v) \in T^{*}_{q} \mathbb{R}$ with the momentum $p=mv$.

Now, let us go back into the more general picture. Let $(Q,M,L)$ be a Lagrangian system and choose coordinates $(q^{1},\dots,q^{n}$ on $Q$ and $(q^{1},\dots,q^{n},\dot{q}^{1},\dots,\dot{q}^{n})$ on $TQ$. We define a one-form locally, which is induced by L as: \begin{equation} \lambda_{L}:=\frac{\partial L}{\partial \dot q^{I}} dq^{i}. \end{equation} This one-form is called the Liouville form and gives rise to a two-form: \begin{equation} \omega_{L}:=- d \lambda_{L}= - \frac{\partial ^2 L}{\partial q^{j} \partial \dot{q}^{k}} dq^{j} \wedge dq^{k} - \frac{\partial^2 L}{\partial \dot{q}^{j} \dot{q}^{k}} d \dot{q}^{j} \wedge dq^{k}. \end{equation} I claim $\omega_L$ is well-defined on all of $M$ and it is closed, therefore, it is a symplectic form if and only if it is non-degenerate. We now give a proposition, which tells us when this is the case.

Let $(Q,M,L)$ be a Lagrangian system with Liouville one-form $\lambda_{L}$, which gives rise to the $2-$form $\omega_L$. Then, the following statements are equivalent:

  1. $\omega_L$ is non-degenerate;
  2. $L$ is hyperregular;
  3. $\det \left( \frac{\partial^2 L}{\partial \dot{q}^{j} \dot{q}^{k}}\right) \neq 0 $

We now conclude the relation between Lagrangian Mechanics and Hamiltonian Mechanics with the following proposition:

Let $(Q,M,L)$ be a Lagrangian system with a Lagrangian $L$ that is hyper regular. Then the tuple $\left(T^{*}Q,\omega:=(\mathbb{F}L)^{*} \omega_{L},H:=E \circ (\mathbb{F}L)^{-1} \right)$ is a Hamiltonian system.

In particular, this means that hyperregular Lagrangians $L$ on $TQ$ induce Hamiltonian systems on $T^{*}Q$. Conversely, one can show that hyperregular Hamiltonians on $T^{*}Q$ come from Lagrangians on $TQ$, which lets us conclude:

Not every Hamiltonian system has a Lagrangian formulation. A Hamiltonian system where the momentum phase space is a cotangent bundle admits a Lagrangian formulation precisely when its Hamiltonian is hyperregular. Moreover, there are Hamiltonian systems, which are not cotangent bundles.

References: Martin Schottenloher, Geometric Quantization notes

K.H. Neeb, Physics and geometry notes

Ratiu Marsden, Introduction to Mechanics and Symmetry.

EDIT: A physical remark/add-on, related to your statement that in quantum mechanics one usually starts with a Hamiltonian. This follows from the fact that physicists usually describe QFTs via Path Integrals: the Lagrangian version of the path integral exists only for a specific class of Hamiltonians - see the derivation in Weinberg for this.

EDIT: I will add a concrete physical example, where the condition is not met. Consider the Lagrangian of a relativistic free particle \begin{equation} L_{inv}=-mc \sqrt{ \frac{dx^{\alpha}}{d \tau} \frac{dx_{\alpha}}{d \tau}}=-mc \sqrt{\dot{x} ^2}, \; \; \text{where} \; \; \dot x^{\alpha}:=\frac{dx^{\alpha}}{d \tau}. \end{equation} For the existence of the square root, we must have $\dot{x}^2>0$, i.e. $\dot x$ must be timeline. The Euler Lagrange equations read: \begin{equation} \frac{\partial L_{inv}}{\partial x^{\alpha}} - \frac{d}{d \tau} \frac{\partial L_{inv}}{\partial \dot{x}^{\alpha}}=0. \end{equation} Concretely, computing it, we obtain: \begin{equation} \frac{d}{d \tau} \frac{ mc \dot{x}_{\alpha}}{\sqrt {\dot{x}^2}}=0. \end{equation} The momentum canonically conjugate to $x^{\alpha}$ reads \begin{equation} p_{\alpha}=\frac{\partial L_{inv}}{\partial \dot{x}^{\alpha}}=-mc \frac{\dot{x}_{\alpha}}{\sqrt{\dot{x}^2}}.\end{equation} It satisfies the constraint \begin{equation} p^2-mc^2=0. \end{equation} Note that the dynamics is encoded in this constraint! To see this, we could naively try to construct the Hamiltonian according to the Legendre transformation. We will see this won't work, but let's give it a try. Using the Legendre transform: \begin{equation} H=\dot{x}^{\alpha} p_{\alpha}-L_{inv}=mc \left(-\frac{\dot{x}^2}{\sqrt{\dot{x}^2}}+ \sqrt{\dot{x}^2} \right)=0, \end{equation} which means that the Hamiltonian is the constant zero function, if obtained by the Legendre transformation. The reason for this is precisely the regularity condition of $L_{inv}$. We claim that: \begin{equation} \det \left(\frac{\partial L_{inv}}{\partial \dot{x}^{\beta} \partial \dot{x}^{\alpha}}\right) \neq 0 \end{equation} is not fulfilled. One can explicitly check, using the form of $L_{inv}$ that this is not fulfilled, but I leave the details to the reader. This can be found in Florian Sheck's book, chapter 4.11..

The upshot of this is the following: Passing from Lagrangian to Hamiltonian mechanics is always possible, if the Lagrangian is hyperregular. In case it is not, while passing from one to the other, we lose some data. We must keep track of this data in terms of constraints, we must do constrain analysis, as was pointed out in the comment of a different post by @AcuriousMind.

For a more detailed treatment of constraints for the Lagrangian I provided, please consult this post.

ProphetX
  • 644
2

You get $p$ exactly as automatically as $\dot{q}$: Starting with the configuration space of your system, i.e. the space of generalized coordinates $q$, the phase space is the cotangent bundle, and the "correct" coordinates on that phase space are the natural coordinates $(q^i, p_i)$ where given a choice of generalized coordinates $q^i$ we expand a covector $p$ at $q$ as $p = p_i\mathrm{d}q^i$ to get the $p_i$ coordinates.

ACuriousMind
  • 124,833
  • How would we figure out how to get the natural coördinates when we only have half of them, i.e. we arbitrarily lay down the $q^i$ part, how to get the $p_i$ parts? – naturallyInconsistent Apr 14 '23 at 08:36
  • @naturallyInconsistent I say it in the answer: You form the cotangent bundle of the space of the $q^i$, and then you expand covectors $p$ in the natural basis $\mathrm{d}q^i$ of the cotangent space as $p = p_i\mathrm{d}q^i$. This is a definition of the $p_i$ as the components of the covector $p$ in the basis $\mathrm{d}q^i$. – ACuriousMind Apr 14 '23 at 08:43
  • 1
    That is not even attempting to answer the question. What does "natural" even mean? We are not looking for any general $p_i$, but rather the canonical momenta of a system. If it is so simple as to get it by definition, then could you explain why the momentum without EM fields should differ from those with EM fields by the vector potential A term? – naturallyInconsistent Apr 14 '23 at 09:01
  • @naturallyInconsistent Either you are misunderstanding me or I am misunderstanding you. My answer provides what the question asks for, namely a definition of coordinates $(q^i, p_i)$ without relying on the existence of a Lagrangian. The statement "the momentum without EM fields should differ from those with EM fields" makes sense only in a context where you can write down an equation for the $p_i$ in terms of the $q^i$ and $\dot{q}^i$, i.e. when you have a Lagrangian. See this answer of mine for a more detailed discussion of such confusions. – ACuriousMind Apr 14 '23 at 11:01
  • @naturallyInconsistent The canonical 2-form, $\omega$ is exact. So you can write it as $\omega = \mathrm{d}\theta$. Writing $\theta$ in the basis spanned by $q$: $\theta = \theta_i \mathrm{d}q^i$, makes the canonical 2-form $\omega = \mathrm{d}\theta_i \wedge \mathrm{d}q^i$. This immediately identifies $p_i = \theta_i$. This is a rephrasing of ACuriousMind's answer. – ɪdɪət strəʊlə Apr 14 '23 at 13:30
  • @naturallyInconsistent in the case of a background gauge field, of course, $\theta = (\pi_i-A_i)\mathrm{d}q^i$, where $\pi_i$ is the kinematic momentum, which identifies $\pi_i-A_i$ as the canonical momentum. – ɪdɪət strəʊlə Apr 14 '23 at 13:34
  • @ɪdɪətstrəʊlə in the situation whereby only the coördinates are laid down, you have neither the canonical symplectic 2-form, nor the Hamiltonian. In fact, if you have either, you have the other too. The problem is how to obtain anything there. Say, could you obtain the kinematic momentum without first assuming the 2-form, the Hamiltonian, or what other implicit assumptions you are making? – naturallyInconsistent Apr 14 '23 at 14:16
  • @ACuriousMind, yes, your link to another answer is much closer to what is needed. In your scheme, yes, there is no inherent link between $q,\ \dot q,\ p$ until the relation eq (1) defines them implicitly. If you insist that there is a natural $p_i\ \mathrm d q^i$, then the problem is translated into "how do we get relation eq (1) without working via Lagrangian, consulting table of known pairings, or guesswork?" – naturallyInconsistent Apr 14 '23 at 14:21
  • @naturallyInconsistent The cotangent bundle comes already equipped with the symplectic 2-form, no additional specifications needed, see also the section contangent bundle as phase space in the Wiki article I already linked in my answer. The natural $p_i\mathrm{d}q^i$ is called the tautological 1-form. – ACuriousMind Apr 14 '23 at 14:31
  • @ACuriousMind the term "tautological" makes it clear that such a 1-form does not have a physical meaning. Until you have the relation equation (possibly augmented with constraints) to make it mean the canonical momentum as is understood in usual Hamiltonian mechanics, you have not actually answered the question. – naturallyInconsistent Apr 14 '23 at 14:33
  • @ACuriousMind Could you give an example to explain this method? – Hydrogen Apr 24 '23 at 15:54
  • 1
    This answer may be correct (I have no idea) but it seems unlikely to be understood by the mind that asked the original question. – DanielSank Apr 24 '23 at 16:41
  • @DanielSank I'm a math PhD. I feel okay with this geometric language. – Hydrogen Apr 25 '23 at 03:31
  • @naturallyinconsistent, in the case of electromagnetic field, the canonical momenta are simply the Darboux coordinates in the general setting I provided in my answer below. You can check explicitly that this is the case: https://www.mathematik.uni-muenchen.de/~schotten/GEQ/GEQ.pdf here above equation 13 is the calculation. – ProphetX May 03 '23 at 01:11
  • So, as a conclusion, we can say: canonical momenta are simply parts of Darboux coordinates on the symplectic manifold, which always exist by the Darboux theorem I quoted below. – ProphetX May 03 '23 at 01:12
2
  1. Traditionally the Hamiltonian formulation and the canonical coordinates $(q^1,\ldots, q^n,p_1,\ldots, p_n)$ are derived from the Lagrangian formulation via a Legendre transformation. (The opposite is also possible, cf. e.g. this Phys.SE post.)

  2. However, OP seems to instead ask for an Hamiltonian approach that does not rely on a Lagrangian formulation. If this is a correct interpretation of OP's question, here is one: If we are given a global function $H\in C^{\infty}(M)$ (which we will call the Hamiltonian by definition) on a $2n$-dimensional symplectic manifold $(M,\omega)$, then we have a Hamiltonian formulation with a time-evolution equation $$\frac{df}{dt}~=~\{f,H\} +\frac{\partial f}{\partial t} .$$ Canonical coordinates $(q^1,\ldots, q^n,p_1,\ldots, p_n)$ are guaranteed to exist locally by Darboux' theorem. They will however not be unique.

Qmechanic
  • 201,751
  • It seems to me that the selection of $p,q$ is implicitly contained in $\omega$. 2. If we only have generalized coordinate $q$, how to find the correct $\omega$?
  • – Hydrogen Apr 24 '23 at 15:56
  • Not a priori; only after use of Darboux' theorem. 2. That's possible, e.g. $\omega=\mathrm{d}p_i\wedge \mathrm{d}q^i$, but that's a different starting point than this answer addresses.
  • – Qmechanic Apr 24 '23 at 16:29