Hamiltonian mechanics - the independence of p and q

Click For Summary

Discussion Overview

The discussion revolves around the treatment of generalized coordinates and momenta in Hamiltonian mechanics, specifically addressing the independence of position (q) and momentum (p) variables. Participants explore the implications of the Legendre transformation and the definitions of variables in both Lagrangian and Hamiltonian formulations.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant questions why p and q can be treated as independent coordinates in the Hamiltonian framework despite their connection.
  • Another participant asserts that by definition, the Hamiltonian is a function of independent variables q and p, with generalized velocities eliminated through the transformation.
  • A participant raises a concern about the dependence of dq/dt on q, questioning the validity of transforming p(q, dq/dt) to (dq/dt)(p, q) using the Legendre transformation.
  • It is noted that in the Lagrangian formulation, q and dq/dt are treated as independent, while in Hamiltonian mechanics, q and p are considered independent variables, facilitated by the Legendre transformation.
  • One participant summarizes that the relationship between q and dq/dt becomes relevant only when applying the Euler-Lagrange equations, suggesting that the transformation to p and q can initially ignore this relationship.
  • Another participant agrees, highlighting the common confusion in notation where generalized velocities are treated both as independent variables and as time derivatives of generalized coordinates.

Areas of Agreement / Disagreement

Participants express a range of views on the independence of variables in Hamiltonian mechanics, with some agreeing on the definitions and transformations while others raise questions about the implications and dependencies involved. The discussion remains unresolved regarding the nuances of these relationships.

Contextual Notes

Participants acknowledge the potential confusion arising from the notation used in physics, particularly regarding the simultaneous treatment of generalized velocities as independent variables and as time derivatives. This may lead to misunderstandings about the relationships between variables in different formulations.

QuasarBoy543298
Messages
32
Reaction score
2
in the Lagrangian mechanics, we assumed that the Lagrangian is a function of space coordinates, time and the derivative of those space coordinates by time (velocity) L(q,dq/dt,t).

to derive the Hamiltonian we used the Legendre transformation on L with respect to dq/dt and got
H = p*(dq/dt) - L (q,(dq/dt)(q,p,t),t). so my question is - why we can treat p and q as independent coordinates here (dp/dq = 0...) , when obviously there is a conection?
 
Physics news on Phys.org
By definition, the Hamiltonian is a function ##H(q,p,t)## with the ##q## and ##p## as independent variables. You eliminate the generalized velocities ##\dot{q}## with help of the ##p## (and ##q##). This is a socalled "contact transformation" or "Legendre transformation".
 
but dq/dt is dependent on q, so why we can transform p(q,dq/dt) to (dq/dt)(p,q) using Legendre transformation?
 
In the Lagrangian formulation the ##q## and ##\dot{q}## are considered independent variables of the Lagrange function, in the Hamiltonian formulation the ##q## and ##p## are considered independent variables of the Hamilton function. The Hamilton function is constructed such that this holds true (that's the Legendre transformation between the Lagrange and the Hamilton function!):
$$\mathrm{d} L = \mathrm{d} q \cdot \partial_q L + \mathrm{d} \dot{q} \cdot \partial_{\dot{q}} L$$
Now we have
$$H=\dot{q} \cdot p-L \quad \text{with} \quad p=\partial_{\dot{q}} L$$
and thus
$$\mathrm{d} H = \mathrm{d} \dot q \cdot p + \dot{q} \cdot \mathrm{d} p - \mathrm{d} L = \dot{q} \cdot \mathrm{d} p - \mathrm{d} q \cdot \partial_q L.$$
Thus the "natural independent variables" for ##H## are indeed ##q## and ##p##, and thus we have
$$\partial_p H=\dot{q}, \quad \partial_q H=-\partial_q L.$$
For the solutions of the Euler-Lagrange equations the latter equation gets
$$\partial_q H=-\partial_q L=-\frac{\mathrm{d}}{\mathrm{d} t} (\partial_{\dot{q}} L) = -\dot{p},$$
which gives the Hamilton canonical equations of motion.

Of course, you can also extend this to explicitly time-dependent Hamilton and Lagrange functions. Nothing changes in the above, you only get additionally
$$\frac{\partial L}{\partial t}=-\frac{\partial H}{\partial t}.$$
 
thank you for the quick response!
so if I understand correctly, we treat q and q dot as independent in the Lagrangian formalism (in the Lagrangian itself), but only when using EL equations we treat q dot as the derivative of q (or when constructing them from the extremal action principle). that is why we can treat them as independent until we demand EL to hold (or ds = 0...). that is why we can transform to p,q without having to worry about the relations between q and q dot. that relation wakes up only when constructing Hamilton equations using EL.

so at first (in the differential of H ), we treated H as a mathematical function with no relation between her coordinates, and the relation only comes from Hamilton's equations.
 
Yes, that's it! The trouble is the usual sloppyness of physicists in their notation using ##\dot{q}## at the same time as denoting the generalized velocities as independent variables in the Lagrange function and as the time derivative of the generalized coordinates when considering trajectories in configuration space and particularly the trajectories solving the Euler-Lagrange equations, which are the equations of motion of the mechanical system under consideration.
 
  • Like
Likes   Reactions: PeroK
thank you so much, it was really helpful !
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 43 ·
2
Replies
43
Views
5K
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K