2
$\begingroup$

Some background: In Lagrangian mechanics, to obtain the EL equations, one varies the action (I will be dropping the time dependence since I don't think it's relevant) $$S[q^i(t)] = \int dt \, L(q^i, \dot q^i) $$ and deduces the EL equations from the principle of least action as well as the typical restriction on the variation. One then learns that the Lagrangian formalism is heavily restrictive in terms of what coordinate transformations it allows for (it only allows for point-transformations) and so one seeks a description of mechanics in which what we have are truly independent $2n$ coordinates. These $2n$ coordinates are of course the generalized positions and canonical momenta, whereby one inverts the equation $$\frac{\partial L}{\partial \dot q^i} = p_i$$ to obtain $\dot q^i = \dot q^i (q^j, p_j)$ which is possible when $L$ is a convex function of the velocities, then one performs a Legendre transform of the Lagrangian to obtain the Hamiltonian $H$. To actually obtain the EOMs by means of a variational principle and without using the EL equations, one varies the action $$S = \int dt \, p_i \dot q^i - H(q^i, p_i)$$ by varying $q$ and $p$ independently. My concern is, why do we have to do all this? Why can't one just invert the definition of canonical momenta and plug that back into the Lagrangian, then just vary action with the Lagrangian as a function $L = L(q, p)$? This clearly gives incorrect results, but I don't feel like I understand why it was allowed for us to do that in the case of the Hamiltonian but not in the case of the Lagrangian. It seems the issue has to do with the presence of a time derivative of the positions which allows us to integrate by parts, but I still don't feel like I understand this and I hope somebody could clear my confusion. EDIT: I suppose my question just boils down to why we need to take a Legendre transform at all. I understand the need to have coordinates such that we could vary them independently, but I don't understand why the Legendre transform is the right (or only?) way to do this.

EDIT: I do \emph{now} see the motivation for Legendre transforms, however I am now even more confused as to why what I attempted to do in writing $S = \int dt \, L(q, p, t)$ and varying $q$ and $p$ independently is wrong, and I don't really see an (explicit) answer to this in the question this was deemed a duplicate to.

$\endgroup$
6
  • 2
    $\begingroup$ Related: on the meaning of Legendre transformations and this answer of mine $\endgroup$
    – ACuriousMind
    Commented May 10 at 23:21
  • 2
    $\begingroup$ Does this answer your question? Physical meaning of Legendre transformation $\endgroup$
    – hft
    Commented May 10 at 23:37
  • $\begingroup$ Partially. I still want to know why writing $\dot q = \dot q(q, p)$ then writing $S = \int dt \, L(q, p)$ and varying $q$ and $p$ independently does not seem to work. $\endgroup$
    – weirdmath
    Commented May 11 at 0:39
  • $\begingroup$ $q$ and $p$ are not independent if you just plug it back into the lagrangian, as seen by your equation for $p$. $\endgroup$ Commented May 11 at 9:08
  • $\begingroup$ I still don't understand this. When we do Hamiltonian mechanics, we forget about how the p's initially came about and just declare them independent and vary them independently. I can in fact just write the integrand as pqdot - H(q, p, t) and vary the q's and p's independently. The main difference between this and what I'm attempting is that there, I would not be writing qdot = qdot(p, q) and instead just have it be varied automatically when q is varied. $\endgroup$
    – weirdmath
    Commented May 11 at 9:21

0