How do you a find a Hamiltonian?

In summary: Q. This is a much stronger condition than the (q'=v,mv'=Q) formulation, which only requires that m and Q are linearly dependent.
  • #1
pi-r8
138
30
So when I first learned about Hamiltonians, my teacher presented them as something which you derived based Newton's second law, with the intermediate step of the Lagrangian. Doing it this way gets a Hamiltonian of the form H = T + V. Now I have a new teacher, who says that that these sorts of Hamiltonians are a special case, and that in general you can't derive them from anything. I was wondering how the people here approach the Hamiltonian- is it derived from something else, or simply developed (guessed) from experimental evidence? If you say that it's derived from a Lagrangian, please explain how you get the Lagrangian.
 
Physics news on Phys.org
  • #2
I think your initial teacher may have confused you with his "derivation": Lagrange's equations are entirely equivalent to Newton's -- you can't really derive one without use of the other (see Marion & Thornton, 4th ed, pg. 258).
On the topic of the Hamiltonian, it is based on 'Hamilton's Principle' that, "of all possible paths along which a dynamical system may move from one point to another in a specified time, then the actual path taken is that which minimizes the time integral of the difference between the kinetic and potential energies." I.e. the actual path is given when the variation of Lagrangian (L=T-V) is zero. The Lagrangian is not "derived" -- it's just what we call the difference in the kinetic and potential energies. So I guess it all comes from this Principle, and since it does coincide and reaffirm the conservation principles, then it does accurately describe the world.

I think the "special case" your new teacher is talking about is if the potential, V, depends only on the (generalized) space coordinates and not on the (generalized) velocities, i.e. V is not time-dependent whatsoever.

Just remember that Hamiltonian formalism is just another tool to get the equations of motion of a system. It's just easier to use scalar quantities (energy) and it accepts non-rectangular coordinates rather than Newtonian methods which are vector based on rect. coordinates.
 
  • #3
Christopher-
When I first studied Lagrangians and Hamiltonians, we used Marion and Thornton as the textbook. I'm well aware that, in that book, Lagrange and Hamilton's equations of motion are derived from a Newtonian framework. However, note that in this book the Lagrangian is defined to be L = T - V, momentum is defined to be m*v, and the Hamiltonian is "derived" from these as H = T + V. If you start with those definitions, then of course Lagrange's equations are equivalent to Newtons. Whereas, if you simply start with Hamilton's equations of motion, and don't restrict the form of the Hamiltonian, or the Lagrangian, or the momentum, you'll get some very non-Newtonian results. Moreover, you can derive the principle of least action more easily by starting with a Hamiltonian framework, then you can by starting with a Newtonian framework.

Now, about time-dependance- this brings up another interesting question. If H has no explicit time-dependance, it's easy to show that its value is constant. Now, since H is a measure of energy, there's two interpretations of this.
1)The Hamiltonian is equal to the total energy only when it is not time-dependant, because energy is always conserved
2)The Hamiltonian measures the total energy, and energy is only conserved when the Hamiltonian is not time dependant

My current teacher believes in the latter explanation, and I must admit that I'm starting to believe him. Still, I'm not certain about this.
 
  • #4
Hamiltonians and Lagrangians for a given law of motion

The ability to derive a Lagrangian and Hamiltonian for a given 2nd order system of equations of motion is not automatic. So, this is not equivalent to Newton's second law or to systems whose equations of motion come ouf of that law. The extra conditions amount to what are known as Helmholtz's conditions.

If you start out with a given system q = (q1,q2,...,qN) with q''(t) = A(q(t),q'(t)), there are certain conditions that apply to the "acceleration function" A before the system can have a Lagrangian or Hamiltonian formulation.

These conditions give you the integrability conditions for certain partial differential equations whose solution ultimately gives you the Lagrangian in question (and from that, the Hamiltonian).

For a system of the form q'(t) = v(t), m v'(t) = Q(t), where m is a NxN matrix and Q an N-dimensional vector (the generalized coefficients of inertia and generalized force, respectively), a similar set of conditions can be established that m and Q must satisfy for a Lagrangian or Hamiltonian to exist. It's this form of the law of motion that Helmholtz's conditions are usually stated in terms of, though the (q'=v,mv'=Q) formulation is weaker than the (q''=A) formulation.

The (q''=A) formulation requires that there EXIST a matrix m ... that will ultimately be one and the same as the m in the 2nd formulation. It may depend on v = q' as well as q, but must satisfy the conditions
dm_{ab}/dv^c = dm_{ac}/dv^b; m_{ab} = m_{ba}
where a, b, c index the individual components. Once you have a suitable m, Q may be defined in terms of a by Q_a = sum (m_{ab} A^b). The remaining conditions are then those which apply (in either formulation) to Q:
dQ_a/dv^b + dQ_b/dv^a = -2 D m_{ab}
D (dQ_a/dv^b - dQ_b/dv^a) = 1/2 (dQ_a/dq^b - dQ_b/dq^a).
where
D = d/dt + sum (v^c d/dq^c)

(The derivatives above are partial derivatives)

(I'm doing this off the top of my head, so I might have the 1/2's, 2's switched around).

If you can either (a) find a set of coefficients m for the formulation (q''=A) that satisfy these 4 conditions; or (b) already have a set of coefficients (m,Q) in the formulation (q'=v,mv'=Q) that satisfy these conditions, then there is a set procedure to work backwards from here to get a Lagrangian. If the matrix m is non-singular, that determines whether a Hamiltonian can also be defined.

I won't take this too far, but will point out that because of the two conditions on m, Frobenius's theorem already guarantees you the ability to integrate the system
dp_a/dv^b = m_{ab}; p_a = dT/dv^a.
This "T" plays the analogous role of kinetic energy and will form the core of what will become the Lagrangian. If you substitute this into the first condition on Q (and perform various manipulations to make it symmetric in the a and b indices), you get a system of the form
dF_a/dv^b + dF_b/dv^a = 0
where F = Q + (other terms). This proves that F is at most linear in v and ius of the form
F_a = E_a(q) + sum (B_{ab}(q) v^b)
where B_{ab} = -B_{ba}. The 2nd condition on Q will prove that E, B are derivable from "potentials" much like the E and B maxwell fields would be
E_a = -d(phi)/dq^a - dA_a/dt
B_{ab} = dA_b/dq^a - dA_a/dq^a.
These can be used in the equation (F = Q + (other terms)), and the law of form mq'' = Q, ultimately to systematically build up the Lagrangian.

All of these points apply also field equations. But only the (q'=v,mv'=Q) formulation is available. Instead of there being just a single evolution variable (t), field equations depend on a set of coordinates (x1,x2,...,xn). So, the "velocity" components are indexed but just by the system's index "a,b,c...", but by a coordinate index, "m,n,p,..."; and the system for which a Lagrangian is to be derived, must have the form:
v^a_m = dq^a/dx^m
sum (m_{ab}^{mn} d(v^b_n)/dx^m) = Q_a
the latter sum taken over the indices b, m and n.

The conditions are similar
m_{ab}^{mn} = m_{ba}^{nm}
d(m_{ab}^{mn})/dv^c_p = d(m_{ac}^{mp})/dv^b_n
but more elaborate for Q:
dQ_a/dv^b_n + dQ_b/dv^a_n =
- sum D_m (m^{ab}_{mn} + m^{ba}_{mn})
and
D_n (dQ_a/dv^b_n - dQ_b/dv^a_n) = 1/2 (dQ_a/dq^b - dQ_b/dq^a)

the sum above is over the index m.

Once you have this, you can proceed to integrate to arrive at a Lagrangian density.

The process of building up a Lagrangian density and (if m is non-singular) a Hamiltonian density from this is more elaborate for the case of field equations than for the case of ordinary equations of motion.
 
  • #5
Christopher314 said:
I think your initial teacher may have confused you with his "derivation": Lagrange's equations are entirely equivalent to Newton's -- you can't really derive one without use of the other (see Marion & Thornton, 4th ed, pg. 258).
coordinates.

This is not a true statement. It is equivalent to Newton's laws in cases where forces of constraint do no work, which is not every problem. This is an important distinction. Newton's laws deal stupidly with constraints to motion regardless of their form, whereas Lagrange's equations do not provide a systematic method for dealing with nonholonomic constraints beyond those that are linear in the generalized velocities.

It's an important distinction that gets lost in a lot of derivations. Also, you assume that the forces of constraint do no work, which need not necessarily be true (although a specific example escapes me at the moment).
 
  • #6
1. I hardly see Newton's laws as "stupid". Wherever have you gotten that idea from?
Nor can I see what is stupid with tackling problems involving other constraints than the simplistic holonomic ones.
From a "Newtonian" perspective, the d'Alembert approach of getting the Lagrange equations with the use of the concept of virtual work is a highly elegant and systematic manner in removing "redundant" unknowns. If this approach cannot be used, too bad.
Perhaps one can simplify the problem in some other manner.

2. The Lagrangian approach is strong enough to derive the equations of motions as long as no VIRTUAL work is done by the constraint forces, even though the contstraint forces might do actual work (for example, normal forces from a moving surface might well do actual work over time) .
 
Last edited:
  • #7
Ha ha, I told him that someone would get onto him after that post of his (I know abszero in real life). In vague defense of my friend, I would point out that he didn't say Newton's laws are stupid, he merely said they deal stupidly with constraints. The d'Alembert approach is highly elegant, and that's the point. The other option is just to think real hard with Newton's laws. I think its fair to say to say there is a difference in sophistication there.

Still, nobody talks bad about Newton and gets away with, right? Right!
 
  • #8
I would say that problems with ugly, non-holonomic constraints are annoying, but it isn't "stupid" to try and tackle them as well. :smile:

Besides, the level of sophistication needed to deal with such problems are not particularly less with such questions.
 
  • #9
pi-r8 said:
So when I first learned about Hamiltonians, my teacher presented them as something which you derived based Newton's second law, with the intermediate step of the Lagrangian. Doing it this way gets a Hamiltonian of the form H = T + V.
That is not always true.
Now I have a new teacher, who says that that these sorts of Hamiltonians are a special case, and that in general you can't derive them from anything.
Nonsense. If you're given T (kinetic energy) and V (potential energy) then you can form L = T - V, i.e. the Lagrangian L. The Hamiltonian is obtained from the Lagrangian through a Legendre transformation (See Goldstein 3rd Ed, section 8.1). The canoniocal momentum, p, is obtained through a derivative of the Lagrangian with respect to its canonical position, q. The quantity

h(q, dq/dt, t) = (dq/dt)q - L(q, dq/dt, t)

Is called the energy function. Once the variables are change then it becomes the Hamiltonian, i.e. h(q, dq/dt, t) => H(q, p, t) = Hamiltonian.

The Legendre transformation let's you take the right side and transform it from a function of q, dq/dt to a function of q, p.

Pete
 
Last edited:
  • #10
Interestingly, there's a lot to learn in order to prove the complete equivalence between the 2 variational problems in classical dynamics.
That is, it's not really that obvious for constrained systems that hamiltonian dynamics is equivalent to lagrangian dynamics...

Daniel.
 
  • #11
pmb_phy said:
...you can form L = T - V, i.e. the Lagrangian L.

This doesn't easily generalise to relativistic field theory. You usually have to guess some reasonable looking Lorentz scalar. For example, the electromagnetic field: there is no real motion of particles to start talking about kinetic and potential energies. Just a field tensor -- and a good guess is to contract it on itself twice to give a scalar, and that seems to give (up to some normalisation) Maxwell Eqns.
 
  • #12
masudr said:
This doesn't easily generalise to relativistic field theory. You usually have to guess some reasonable looking Lorentz scalar. For example, the electromagnetic field: there is no real motion of particles to start talking about kinetic and potential energies. Just a field tensor -- and a good guess is to contract it on itself twice to give a scalar, and that seems to give (up to some normalisation) Maxwell Eqns.
If was posting the Hamiltonian of a classical particle. You're talking about relativistic fields. Its best to know what the person who started this thread wants.

Pete
 
  • #13
pi-r8 said:
So when I first learned about Hamiltonians, my teacher presented them as something which you derived based Newton's second law, with the intermediate step of the Lagrangian. Doing it this way gets a Hamiltonian of the form H = T + V. Now I have a new teacher, who says that that these sorts of Hamiltonians are a special case, and that in general you can't derive them from anything. I was wondering how the people here approach the Hamiltonian- is it derived from something else, or simply developed (guessed) from experimental evidence? If you say that it's derived from a Lagrangian, please explain how you get the Lagrangian.

Is this a relativistic question or a non-relativistic mechanics question? Are you referring to the Hamiltonian of a particle or a field. To me it looks lile your working with the Hamiltonian of a particle in a field using non-relativistic mechanics. Is that correct?

Pete
 
  • #14
It looked like a particle to me as well. But note, I said this point of view doesn't easily generalise. I didn't say it's wrong.

In any case, even for particle mechanics, you can choose any Lagrangian you want, it's just that L = T - V happens to give Newton's Laws for a certain (albeit very large) class of problems.
 
Last edited:
  • #15
masudr said:
It looked like a particle to me as well. But note, I said this point of view doesn't easily generalise. I didn't say it's wrong.

In any case, even for particle mechanics, you can choose any Lagrangian you want, it's just that L = T - V happens to give Newton's Laws for a certain (albeit very large) class of problems.
I understand. The relativistic Lagrangians can be wierd. E.g. see Eq. 15 at

http://www.geocities.com/physics_world/sr/relativistic_energy.htm

Pete
 

1. How do I determine the Hamiltonian for a physical system?

The Hamiltonian is a mathematical operator that describes the total energy of a physical system. To determine the Hamiltonian, you can use the Lagrangian formalism, which involves finding the system's kinetic and potential energies and then using them to construct the Hamiltonian function.

2. Can the Hamiltonian be used to predict the behavior of a physical system?

Yes, the Hamiltonian contains all the information about a system's energy and dynamics. By solving the equations of motion derived from the Hamiltonian, we can make predictions about the system's behavior and evolution over time.

3. How do I know if a system has a well-defined Hamiltonian?

A system has a well-defined Hamiltonian if it has a finite number of degrees of freedom and obeys the laws of classical mechanics. In other words, the system must have a well-defined potential energy function and a finite number of generalized coordinates and momenta.

4. Can the Hamiltonian change over time?

In classical mechanics, the Hamiltonian is a constant of motion and does not change over time. However, in quantum mechanics, the Hamiltonian is a time-dependent operator that describes the evolution of a system over time.

5. What is the relationship between the Hamiltonian and the Schrödinger equation?

The Schrödinger equation is a fundamental equation in quantum mechanics that describes the time evolution of a quantum state. The Hamiltonian is an operator that appears in the Schrödinger equation and determines the state's energy and evolution over time.

Similar threads

Replies
7
Views
1K
Replies
6
Views
645
Replies
11
Views
1K
  • Atomic and Condensed Matter
Replies
0
Views
280
Replies
1
Views
1K
  • Classical Physics
Replies
2
Views
2K
Replies
1
Views
1K
  • Classical Physics
Replies
12
Views
3K
  • Classical Physics
Replies
1
Views
542
  • Advanced Physics Homework Help
Replies
13
Views
1K
Back
Top