Hamiltonian mechanics - the independence of p and q

Click For Summary
SUMMARY

The discussion centers on the independence of generalized coordinates \( q \) and momenta \( p \) in Hamiltonian mechanics, specifically through the Legendre transformation. Participants clarify that while \( q \) and \( \dot{q} \) are treated as independent in Lagrangian mechanics, the transformation to Hamiltonian mechanics allows \( q \) and \( p \) to be independent variables. The Hamiltonian \( H(q,p,t) \) is constructed to reflect this independence, and the relationship between \( q \) and \( \dot{q} \) emerges only when applying Hamilton's equations. The conversation emphasizes the importance of precise notation to avoid confusion in the treatment of these variables.

PREREQUISITES
  • Understanding of Lagrangian mechanics and the Lagrangian function \( L(q, \dot{q}, t) \)
  • Familiarity with the Legendre transformation and its application in mechanics
  • Knowledge of Hamiltonian mechanics and the Hamiltonian function \( H(q, p, t) \)
  • Grasp of Euler-Lagrange equations and their role in deriving equations of motion
NEXT STEPS
  • Study the Legendre transformation in detail, focusing on its mathematical formulation and applications
  • Explore Hamilton's equations of motion and their derivation from the Hamiltonian function
  • Investigate the implications of time-dependent Hamiltonian and Lagrangian functions
  • Examine common notational conventions in classical mechanics to enhance clarity in communication
USEFUL FOR

Physicists, mechanical engineers, and students of classical mechanics who seek a deeper understanding of the transition from Lagrangian to Hamiltonian mechanics and the implications of variable independence in these frameworks.

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
679
  • · 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