Hamilton's equation and Euler-Lagrange's equation comparison

  • Thread starter Thread starter JD_PM
  • Start date Start date
  • Tags Tags
    Comparison
Click For Summary

Homework Help Overview

The discussion revolves around the comparison of Hamilton's equation and Euler-Lagrange's equation, specifically focusing on the relationship between the Hamiltonian and Lagrangian in a system described by a given Lagrangian function. Participants explore the implications of their definitions and relationships in the context of classical mechanics.

Discussion Character

  • Conceptual clarification, Assumption checking, Mathematical reasoning

Approaches and Questions Raised

  • Participants discuss the derivation of the momentum from the Lagrangian and the implications of Hamilton's equations. There are attempts to equate the Hamiltonian and Lagrangian under specific conditions, leading to questions about the validity of these assumptions. Some participants express confusion regarding the definitions and relationships between the variables involved.

Discussion Status

The discussion is ongoing, with participants raising questions about the correctness of proposed solutions and the definitions of the Hamiltonian and Lagrangian. Some guidance has been offered regarding the nature of these functions and their dependencies, but no consensus has been reached on the interpretations being explored.

Contextual Notes

There is a noted complexity in the relationship between the Hamiltonian and Lagrangian, particularly when considering their dependencies on different variables. Participants are also addressing potential typos and clarifications in the definitions used throughout the discussion.

JD_PM
Messages
1,125
Reaction score
156
Homework Statement
I will not use summation sign: repeated pair of (upper and lower) indices are summed over: [itex]\sum_{a} A_{a} B^{a} \equiv A_{a}B^{a} = A_{c}B^{c}[/itex] (summed over indices are dummy indices so you can rename them as you like).

Let ##V(q) = 0##. Then the Hamiltonian (##H = T + V##) and the Lagrangian (##L = T - V##) are equal:

$$H = L = 1/2 G_{ab} \dot q^a \dot q^b \ \ \ \ (1)$$

Show that you get ##(1)## either using Hamilton's equation ##\dot{p}_k=\frac{\partial L}{\partial q^k}## or Euler-Lagrange equation ##\frac{d}{dt} \Big(\frac{\partial L}{\partial \dot q^k }\Big) = \frac{\partial L}{\partial q^k}##
Relevant Equations
$$H = L = 1/2 G_{ab} \dot q^a \dot q^b$$

$$\dot{p}_k=\frac{\partial L}{\partial q^k}$$

$$\frac{d}{dt} \Big(\frac{\partial L}{\partial \dot q^k }\Big) = \frac{\partial L}{\partial q^k}$$
We know that the momentum for such a lagrangian is:

$$p_k = \frac{\partial L}{\partial \dot q^k} = 1/2 \Big( G_{ab} \delta_k^a \dot q^b + G_{ab} \delta_k^b \dot q^a\Big) = 1/2 \Big( G_{kb} \dot q^b + G_{ak} \dot q^a\Big) = G_{ak} \dot q^a$$

OK so using Hamilton's equation we get (and recalling that ##L = H## for this particular problem):

$$\dot p_a = -\frac{\partial H}{\partial q^a} = -\partial_a H = -1/2\partial_a G_{cb} \dot q^c \dot q^b \ \ \ \ (2)$$

By using ##\frac{d}{dt} \Big(\frac{\partial L}{\partial \dot q^k }\Big) = \frac{\partial L}{\partial q^k}## we get:

$$\frac{d}{dt} \Big(\frac{\partial L}{\partial \dot q^a }\Big) = \frac{d}{dt}\Big( G_{ab} \dot q^b\Big) = \frac{\partial L}{\partial q^a} = 1/2\partial_a G_{cb} \dot q^c \dot q^b \ \ \ \ (3)$$

Mmm so there's a sign difference between ##(2)## and ##(3)##. They should be equal. Why am I wrong?
 
Physics news on Phys.org
I can't figure out what you are trying to do.

All I could think of is

a) Take ##L = \frac 1 2 G_{ab}\dot q^a \dot q^b##

b) Define ##H = p_k\dot{q}^k - L##, where ##p_k = \frac{\partial L}{\partial \dot q^k}##.

c) Show that ##H = L##.

Is that the exercise?
 
  • Like
Likes   Reactions: JD_PM
You need to be very careful here. Even if you have no potential energy, the Hamiltonian and Lagrangian cannot be the same because the Hamiltonian is a function of ##q## and ##p## while the Lagrangian is a function of ##q## and ##\dot q##. Since the relation between ##p## and ##\dot q## generally depends on ##q##, the partial derivative of the Hamiltonian wrt q is not equal to the partial derivative of the Lagrangian wrt q. That is, generally
$$
\frac{\partial L}{\partial q} \neq \frac{\partial H}{\partial q}
$$
even if ##H = L## under the identification ##p = \partial L/\partial \dot q##.
 
Last edited:
  • Like
Likes   Reactions: JD_PM
PeroK said:
I can't figure out what you are trying to do.

All I could think of is

a) Take ##L = \frac 1 2 G_{ab}\dot q^a \dot q^b##

b) Define ##H = p_k\dot{q}^k - L##, where ##p_k = \frac{\partial L}{\partial \dot q^k}##.

c) Show that ##H = L##.

Is that the exercise?

What you suggest is to do the following exercise:

Show that ##H = L## given ##L = \frac 1 2 G_{ab}\dot q^a \dot q^b##, ##H = p_k\dot{q}^k - L## and ##p_k = \frac{\partial L}{\partial \dot q^k}##

Solution:

$$H = p_a\dot{q}^a - L = G_{ba} \dot q^b \dot q^a - \frac 1 2 G_{ab}\dot q^a \dot q^b = \frac 1 2 G_{ba} \dot q^b \dot q^a$$

So indeed

$$H = L$$

But based on what Orodruin said, this cannot be correct because 'the Hamiltonian and Lagrangian cannot be the same'...
 
Orodruin said:
Since the relation between ##p## and ##\dot q## generally depends on ##q##, the partial derivative of the Hamiltonian wrt q is not equal to the partial derivative of the Lagrangian wrt q. That is, generally
$$
\frac{\partial L}{\partial q} \neq \frac{\partial H}{\partial q}
$$
even if ##H = L## under the identification ##p = \partial L/\partial \dot q##.

Mmm I do not get your reasoning, could you please explain your argument based on an example?

Besides, why is the above exercise proposed by PeroK wrongly solved?
 
JD_PM said:
What you suggest is to do the following exercise:

Show that ##H = L## given ##L = \frac 1 2 G_{ab}\dot q^a \dot q^b##, ##H = p_k\dot{q}^k - L## and ##p_k = \frac{\partial L}{\partial \dot q^k}##

Solution:

$$H = p_a\dot{q}^a - L = G_{ba} \dot q^b \dot q^a - \frac 1 2 G_{ab}\dot q^a \dot q^b = \frac 1 2 G_{ba} \dot q^b \dot q^a$$

So indeed

$$H = L$$

But based on what Orodruin said, this cannot be correct because 'the Hamiltonian and Lagrangian cannot be the same'...
Technically we have a third function, which I'll call ##H'##:

##H'(q, \dot q) = H(p(q, \dot q), \dot q)##

In this case ##H' = L##.
 
  • Love
Likes   Reactions: JD_PM
PS The following appears a lot in physics texts:

You have some function ##\psi(x)##, say, and a change of variable ##x = f(y)##. Which leads to ##\psi(y)##. But, in fact, what we really have is a new function:

##\psi'(y) = \psi(f(y))##

To take an example. If ##\psi(x) = \sin(x)## and ##x = 2y##, then:

##\psi(y) = \sin(y)## (technically, as ##\psi## is simply the sine function)

But:

##\psi'(y) = \sin(2y)##

Is what's really meant. If we are taking about a real wave amplitude, say, then ##y = \pi/4## means ##x = \pi/2## and the amplitude should be ##1## when ##y = \pi/4## . Which it is for ##\psi'## but not for ##\psi##.
 
  • Love
Likes   Reactions: JD_PM
JD_PM said:
Solution:


H=pa˙qa−L=Gba˙qb˙qa−12Gab˙qa˙qb=12Gba˙qb˙qa​
This is incorrect because, as already mentioned, the Hamiltonian is a function of q and p, not q and ##\dot q##. You obtain the Hamiltonian from the Lagrangian by insering ##\dot q## as a function of q and p where ##p = \partial L/\partial \dot q##.

Take the simplest example ##L = m \dot q^2/2##. You would find that ##p = m\dot q## and therefore ##\dot q = p/m## leading to ##H = p^2/(2m)##. Here, neither L or H depend on q so the partial derivatives both vanish. However, this would not be the case if you let m depend on q.
 
  • Informative
Likes   Reactions: JD_PM
PeroK said:
Technically we have a third function, which I'll call ##H'##:

##H'(q, \dot q) = H(p(q, \dot q), \dot q)##

In this case ##H' = L##.

Oh I think I see it now. The issue is that we get a function (which you labeled ##H'##) which is a function of ##q## and ##\dot q##. By definition this cannot be the Hamiltonian, as ##H(q, p)## is certainly not ##H'(q, \dot q)##. Thus we need to apply a change of variables to get the Hamiltonian out of ##H'(q, \dot q)##; in this case we need ##\dot q = p(q, \dot q)##.

By the way, I think there is a typo in #6;

I get:

$$H'(q, \dot q) = H(q, p(q, \dot q))$$

Where I've used the change of variables ##\dot q = p(q, \dot q)##

Instead of ##H'(q, \dot q) = H(p(q, \dot q), \dot q)##

Do you agree?
 
  • #10
JD_PM said:
Oh I think I see it now. The issue is that we get a function (which you labeled ##H'##) which is a function of ##q## and ##\dot q##. By definition this cannot be the Hamiltonian, as ##H(q, p)## is certainly not ##H'(q, \dot q)##. Thus we need to apply a change of variables to get the Hamiltonian out of ##H'(q, \dot q)##; in this case we need ##\dot q = p(q, \dot q)##.

By the way, I think there is a typo in #6;

I get:

$$H'(q, \dot q) = H(q, p(q, \dot q))$$

Where I've used the change of variables ##\dot q = p(q, \dot q)##

Instead of ##H'(q, \dot q) = H(p(q, \dot q), \dot q)##

Do you agree?

Hmm ... I guess it depends what we mean by the "Hamiltonian". Like the Lagrangian, it takes a different form in different coordinates.

If we take ##L, H, H'## to be specific functions (of specific variables), then we need to stay consistent in what these mean.

The way I defined ##H## in post #3 I think is consistent with post #6.
 
  • Like
Likes   Reactions: JD_PM
  • #11
PeroK said:
Hmm ... I guess it depends what we mean by the "Hamiltonian". Like the Lagrangian, it takes a different form in different coordinates.

Your Hamiltonian is a function of ##p## and ##\dot q##. I think that the Hamiltonian has to be ##H(q, p)## (by definition) instead.
 
  • #12
JD_PM said:
Your Hamiltonian is a function of ##p## and ##\dot q##. I think that the Hamiltonian has to be ##H(q, p)## (by definition) instead.
How do you define it?
 
  • #13
JD_PM said:
Your Hamiltonian is a function of ##p## and ##\dot q##. I think that the Hamiltonian has to be ##H(q, p)## (by definition) instead.
This is correct.

PeroK said:
How do you define it?
What he is saying is that you wrote that the Hamiltonian is a function of ##p## and ##\dot q##. It is a function of ##p## and ##q##.
 
  • Like
Likes   Reactions: JD_PM
  • #14
Orodruin said:
...he...

He/she/bot ... :rolleyes:
 
  • #15
OK So my answer to #1 would be:

This exercise is faulty; let's argue why

It asks to show that

$$H = L = 1/2 G_{ab} \dot q^a \dot q^b \ \ \ \ (1) $$

We know that ##L(q, \dot q) = 1/2 G_{ab} \dot q^a \dot q^b##

But

$$H'(q, \dot q) = p_a\dot{q}^a - L = G_{ba} \dot q^b \dot q^a - \frac 1 2 G_{ab}\dot q^a \dot q^b = \frac 1 2 G_{ba} \dot q^b \dot q^a$$

And of course

$$H'(q, \dot q) \neq H(q, p)$$

Thus ##(1)## should be:

$$H(q, p) \neq H'(q, \dot q) = L(q, \dot q) = 1/2 G_{ab} \dot q^a \dot q^b \ \ \ \ (1) $$

I think I got it! Thank you both :)

WoW I am learning a lot these days...
 
  • Like
Likes   Reactions: PeroK
  • #16
JD_PM said:
Oh I think I see it now. The issue is that we get a function (which you labeled ##H'##) which is a function of ##q## and ##\dot q##. By definition this cannot be the Hamiltonian, as ##H(q, p)## is certainly not ##H'(q, \dot q)##. Thus we need to apply a change of variables to get the Hamiltonian out of ##H'(q, \dot q)##; in this case we need ##\dot q = p(q, \dot q)##.

By the way, I think there is a typo in #6;

I get:

$$H'(q, \dot q) = H(q, p(q, \dot q))$$

Where I've used the change of variables ##\dot q = p(q, \dot q)##

Instead of ##H'(q, \dot q) = H(p(q, \dot q), \dot q)##

Do you agree?

Yes, you're right. The correct functional form of ##H## is as a function of ##q, p##.
 
  • Like
Likes   Reactions: JD_PM

Similar threads

  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 81 ·
3
Replies
81
Views
8K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
Replies
7
Views
6K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
15
Views
1K