Unraveling the Mystery of Hamiltonian Mechanics

In summary: Hamiltonian formalism you have an independent set of variables the q's and the p's.In summary, the conversation discusses the relationship between the Lagrangian and Hamiltonian formulations in mechanics. The key point is that in the Lagrangian formalism, the q's and their time derivatives, qdots, are taken as independent variables. However, in the Hamiltonian formalism, both the q's and p's, their canonically conjugate momenta, are considered independent. This is achieved through a Legendre transform from the Lagrangian to the Hamiltonian. The result is a larger invariance group and a more explicit symplectic structure in the phase space, making the Hamiltonian formulation the preferred
  • #1
Bosh
9
0
Hi,

A fundamental aspect in the Hamiltonian framework of mechanics is that the q's and p's are independent. I feel like I understand the steps in the Legendre transform from Lagrangian to Hamiltonian mechanics, but I don't see how you can go from a system where only the q's are independent (the qdots are just time derivatives of the q's) to one where both q and p are independent.

In thermodynamics Legendre transforms you always go from from sets of 2 independent quantities to other sets of 2 independent quantities. It seems to be saying that in Lagrangian mechanics q and qdot are independent, but I can't seem to make sense of that.

Any help would be appreciated!
 
Physics news on Phys.org
  • #2


You always have Hamiltonian relations between q's and p's. They just aren't explicit when you are working with Lagrangian.
 
  • #3


This is, in fact, an important point! Indeed in the Lagrangian formalism of Hamilton's principle the action is a function of the trajectories [itex]q(t)[/itex]. Now, when you Legendre transform to the Hamiltonian formalism, you realize that you get the constraint

[tex]\dot{q}=\frac{\partial H}{\partial p}[/tex]

if you extend the Hamilton principle of least action to independent variations to phase-space trajectories [itex](q(t),p(t))[/itex]. This in turn extends the invariance of the Lagrangian formalism under point transformations, i.e., under diffeomorphisms from one set of generalized position coordinates to another set, to canonicial transformations (symplectomorphisms) of the generalized coordinates and their canonically conjugated momenta, i.e., such transformations [itex]q'=q'(q,p)[/itex], [itex]p'=p'(q,p)[/itex] that leave the canonical Poisson brackets

[tex]\{q_j,q_k\}=\{p_j,p_k\}=0, \quad \{q_j,p_k\}=\delta_{jk}[/tex]

invariant.
 
  • #4


Right, I think where I'm getting confused is that with Lagrangians, along any path you can't vary q without varying [itex]\dot{q}[/itex]. I therefore have trouble seeing how you can transform to a Hamiltonian and now vary q and p independently. p = [itex]\frac{\partial L}{\partial \dot{q}}[/itex], so since L = L(q, [itex]\dot{q}[/itex], t), p = p(q, [itex]\dot{q}[/itex], t). So how can you vary q without varying p?
 
  • #5


The point is to define the q and the p as independent variables. Then the action becomes a functional of these phase-space variables,

[tex]A[q,p]=\int_{t_1}^{t_2} \mathrm{d} t [\dot{q} \cdot p-H(q,p)].[/tex]

Then you take the variations of phase-space trajectories, with the endpoints of q fixed, this leads to

[tex]\delta A=\int_{t_1}^{t_2} \mathrm{d} t [\delta \dot{q} \cdot p+\dot{q} \cdot \delta p-\delta q \cdot \partial_q H(q,p)-\delta p \cdot \partial_p H(q,p)].[/tex]

Since [itex]\delta q(t_1)=\delta q(t_2)[/itex] the integration by parts of the first term yields

[tex]\delta A=\int_{t_1}^{t_2} \mathrm{d} t \{ \delta q \cdot [-\dot{p}-\partial_q H(q,p)] + \delta p \cdot [\dot q-\partial_p H(q,p)] \}.[/tex]

Since this has to vanish for all variations of the phase-space trajectory, one is lead to

[tex]\dot{p}=-\partial_q H(q,p), \quad \dot{q}=\partial_p H(q,p).[/tex]

These are the Hamilton canonical equations of motion, which are equivalent to the Euler-Lagrange equations of motion of Hamilton's principle in the Lagrangian formulation.

The advantage of the Hamiltonian formulation is that the symplectic structure of the phase space is made explicit and thus that the formalism becomes invariant under symplectomorphisms of phase space (vulgo known as canonical transformations), which is a larger invariance group than the diffeomorphism group on configuration space, which of course is a subgroup of the symplectomorphism group.

Thus, as Helmholtz has put it in one of his marvelous textbooks: The Hamiltonian formulation in phase space is the true arena for classical mechanics.

Nowadays we know how right he was with this claim since Hamiltons principle in the Hamilton formulation is the starting point for quantum mechanics and quantum field field theory that are the most comprehensive models of nature we have today!
 
  • #6


Bosh said:
Right, I think where I'm getting confused is that with Lagrangians, along any path you can't vary q without varying [itex]\dot{q}[/itex].
This is incorrect. In the Lagrangian formalism, q and qdot are taken as independent of each other. (You might be confused because physically q and qdot are dependent of each other; the thing is, the independence is mathematical and it's only after solving the math that you get that q and qdot depend on the time variable t, creating the dependence between q and qdot).

So how can you vary q without varying p?

By varying qdot!
 
  • #7


Exactly, in Lagrangian theory both [itex]q[/itex] and [itex]\dot q[/itex] are independent, so in standard cases when we derive the Hamiltonian from the Lagrangian, we change variables from [itex]q[/itex],[itex]\dot q[/itex] to q and p.

The fact that in deriving the equations of motion from the action principle we vary only [itex]q[/itex] and not [itex]\dot q[/itex] only means that the whole trajectory q(t) determines all velocities during the time interval considered. It does not imply that from values of [itex]q[/itex] [itex]\dot q[/itex] can be determined - in fact it cannot, so the velocities are another independent variables.
 
  • #8


Mr. Vodka:

If you look at how you derive the Euler-Lagrange equations in the Lagrangian formalism, you don't vary q and [itex]\dot{q}[/itex] independently. What you do is you vary the path q(t), and that creates variations in q and [itex]\dot{q}[/itex] that are related to each other through [itex]\delta \dot{q} = \frac{d}{dt} \delta q[/itex].

That the two variables are related through the solution as you say is what happens when you derive Hamiltonian mechanics from a variational principle. But the modified Hamilton's principle you use for that (where you vary both the path in q AND the path in the p's) is slightly different from the Hamilton's principle (where you just vary the path q(t)).

Just like the ultimate justification for the regular Hamilton's principle is that the Euler-Lagrange equations reduce to Newton's laws, I think the justified for the MODIFIED Hamilton's principle is that it provides Hamilton's equations, which you can get from the Euler-Lagrange equations, which in turn reduce to Newton's laws. And I can completely see how the modified principle gives you Hamilton's equations, just like vanhees wrote out.

Perhaps I hadn't enunciated it clearly, but where I'm stuck is how you go from the Euler-Lagrange equations to Hamilton's equations (not through a variational principle but by doing a Lengendre transform). I think I understand the individual steps, but I'm confused by the fact that it seems like in the Lagrangian formalism you have one independent set of variables the n q's (and as a result you get n second-order diff eq's), while in the Hamiltonian formalism, you have two independent sets of variables n q's and n p's (and as a result you have 2n 1st order diff eq's).

Where do you sneak in doubling the number of in dependent variables? Transformations I'm used to preserve the dimensionality...you go from 2 ind. variables to 2 others (which seems to be the case in the thermo Legendre transformations). Is it really the case that in the Lagrangian case q and [itex]\dot{q}[/itex] are independent, even though if you derived the equations from a variational principle (Hamilton's principle), they wouldn't be independent?

Hope the long response doesn't turn too many people off!

p.s. @ mr. vodka: In your second point, it's only in the simplest cartesian case that you can vary q without varying p, like you say. In the general case (e.g. spherical coordinates), p depends on both q and [itex]\dot{q}[/itex], so you can't vary q without varying p!
 
  • #9


It seems like you're mixing up two ideas: on one hand, the q and qdot are independent, and on the other hand, we introduce a certain restriction, namely the Euler-Lagrange equation, for which the solution is the physical solution you're looking for (the Newtonian trajectory).

It's a bit like the following simplified example, to make my point (forget about classical mechanics for this, it's just math):
We can introduce two independent variables x and y. They are independent by definition, actually. Now we might put in a new constraint f(x,y)=0. We can now solve x and y and of course then they will no longer be independent. And you see in this case that nothing magical happens: it's not that the previously independent x and y are suddenly dependent, no, it's rather sloppy notation: first x and y were simply placeholder names for two independent variables, but as soon as I wrote down f(x,y)=0, I meant "the functions [itex]x: t \mapsto x(t)[/itex] and [itex]y: t \mapsto y(t)[/itex] such that for all t f(x(t),y(t)) = 0".

The above situation, in Lagrangian mechanics, is completely similar: at first q and qdot are independent by definition (making the qdot notation indeed rather tricky, since intuitively it makes you think of the derivative with respect to time, indicating a dependence). It is only when you introduce the Euler-Lagrange equation (how it is derived is irrelevant to our cause) that q and qdot become dependent; not "magically", but because you're actually using the same names for slightly different concepts. It is only in this second step that qdot attains its physically relevant meaning of derivative wrt time (since before, there is no time variable!).
 
Last edited:
  • #10


Hm, thanks for the reply Mr. Vodka. I'd be interested to see what other people think. I'm not sure that looking at the Lagrangian problem in q and [itex]\dot{q}[/itex] space is quite right. I think the variation is done in q, t space, and when you derive the condition for the action to be minimized, since the Lagrangian depends on q dot, the condition also involves qdot. I think the statement you make in parentheses at the end is not right...the time variable is in there the whole time as the parameter, just as the distance is the parameter in the bachristochrone problem (or however you spell that :) )

I think your view where you're varying both things is the correct view for a derivation of Hamiltonian mechanics from a variational principle where you're varying both q and p, and through Hamilton's equations you get equations of constraint.

Maybe I'm wrong though, would be curious if other people would weigh in on it.

Thanks for all the replies!
 
  • #11


Sure, I'm curious myself if others agree; I'm a bachelor student myself, so I make no claim on the truth!
 
  • #12


Have you read my answer to the question carefully? Again, the Hamiltonian formulation is different from the Lagrangian formulation of Hamilton's principle. In the Lagrangian formulation, the action functional is taken as a functional of position-space trajectories, i.e., as a functional of functions [itex]q(t)[/itex]. In this functional you have [itex]\dot{q}=\mathrm{d} q/\mathrm{d} t[/itex]. Only in writing the partial (!) derivatives of the Lagrangian with respect to [itex]q[/itex] and [itex]\dot{q}[/itex] you treat [itex]\dot{q}[/itex] as if it were an independent variable.

In the Hamiltonian formulation, you change the action functional to be the functional of phase-space trajectories [itex](q(t),p(t))[/itex], and [itex]q[/itex] and [itex]p[/itex] are independent coordinates to specify points in the 6N-dimensional phase space (for N particles in three-dimensional configuration space). This is a non-trivial extension of the action principle and also of the representation of symmetries, which plays a crucial rule in the development of quantum theory.

Also in the path-integral formalism of quantum theory the starting point is always the Hamiltonian formulation. Only in special (however important) cases, the Lagrangian and the Hamiltonian path integral lead to the same quantum system, and in general a naive use of the Lagrangian path integral leads to mistakes!
 
  • #13


Hi Vanhees, sorry yes I've been reading all your posts carefully, I just have agreed with everything you said so I didn't comment on it.

I am completely on the same page as you that the variational principle in the Hamiltonian formalism is more general than that in the Lagrangian. But I'm trying to get at something different than the different variational principles...in the end the variational principles are just made up. I could make up any sort of variational principle I wanted. The good ones are only kept--they only have any worth--because they give Hamilton's/the Euler Lagrange equations which can be shown equivalent to Newton's laws.

Where I'm getting confused (and this is my own shortcoming) is in going from the E-L equations to Hamilton's equations. It seems like you're going from an (n+1) dimensional space (q's + t), to a (2n + 1) dim. space (q's, p's + t). So it seems like that can't be a unique transformation.

I think I'm starting to see from all your above replies (and maybe you can tell me if I'm on the right track) that I should think of the space for the Lagrangian as begin a (2n+1) dim. phase space of (q's, [itex]\dot{q}[/itex]'s + t). The idea that the q's and dots are related is wrong because the Lagrangian can give you a value for any trajectory, physical or non-physical, so you can take any combinations of q's and [itex]\dot{q}[/itex]'s. The E-L equations then give you a constraint connecting the q's and [itex]\dot{q}[/itex]'s for physical trajectories. So it's no problem then to go from (2n+1) Lag. space to (2n+1) Ham. space, and then you figure out what the E-L equations for physical trajectories tell you about trajectories in q,p space. Does that sound right?

If I might ask a last, related, short question: As your derivation shows, vanhees, even in a Hamiltonian variational principle, you only require the variation of the q's to vanish at the endpoints (like for the Lagrangian variational derivation). Yet, to set up canonical transformations, you have to further impose that the momentum variations vanish. For example, for a generating function involving p:

p[itex]\dot{q}[/itex] - H = P[itex]\dot{Q}[/itex] - K + [itex]\frac{d}{dt}F(p,Q,t)[/itex]

This is only true if F(p,Q,t) vanishes at the endpoints, which in turn is only true if p vanishes at the endpoints. So aren't you limiting the number of physical trajectories you can get out if you impose that the momenta variations vanish? If more than one variational principle gave you Hamilton's equations, wouldn't you want the most general variational principle?

It seems like since canonical transformations rely on this, and they're so powerful, it should be a point emphasized more often!

Thanks
 

1. What is Hamiltonian mechanics?

Hamiltonian mechanics is a mathematical framework used in classical mechanics to describe the motion of a system of particles. It is based on the concept of energy and uses a set of equations known as Hamilton's equations to calculate the evolution of a system over time.

2. Who developed Hamiltonian mechanics?

Hamiltonian mechanics was developed by Irish mathematician and physicist William Rowan Hamilton in the early 19th century. He introduced the concept of the Hamiltonian function, which is a key component of the Hamiltonian formalism.

3. How is Hamiltonian mechanics different from other classical mechanics theories?

Unlike other classical mechanics theories, such as Newtonian mechanics and Lagrangian mechanics, Hamiltonian mechanics takes into account both the position and momentum of a particle. It also uses a different set of equations and is often preferred for its simplicity and efficiency in solving complex systems.

4. What are some practical applications of Hamiltonian mechanics?

Hamiltonian mechanics has a wide range of applications in physics, engineering, and other fields. It is used to study the dynamics of particles in systems like celestial bodies, atoms, and molecules. It is also used in fields like quantum mechanics, control theory, and fluid mechanics.

5. How does Hamiltonian mechanics relate to other areas of mathematics?

Hamiltonian mechanics has connections to many other areas of mathematics, including differential geometry, topology, and symplectic geometry. It is also closely related to the concept of phase space, which is used to visualize the state of a system in classical mechanics.

Similar threads

Replies
4
Views
616
Replies
2
Views
768
Replies
1
Views
467
Replies
7
Views
1K
  • Classical Physics
Replies
33
Views
1K
  • Advanced Physics Homework Help
Replies
1
Views
693
Replies
7
Views
1K
Replies
27
Views
2K
Replies
6
Views
2K
Back
Top