Why are the Lagrangian and the Hamiltonian defined as they are?

In summary, the Lagrangian L = T - V (or K - U) inverts the potential energy portion (let's make attraction negative; repulsion positive) compared to the Hamiltonian. The Lagrangian is important because of its integral, a quantity called action.
  • #1
danmay
48
0
I have two somewhat related questions.

First, why would we care about the Lagrangian L = T - V (or K - U)? I understand with the Hamiltonian H = T +V, the total energy is conserved. But with the Lagrangian, what does it actually mean? Mathematically, it only inverts the potential energy portion (let's make attraction negative; repulsion positive) compared to the Hamiltonian. Wouldn't it make more sense to find stationary action using the Hamiltonian instead of the Lagrangian?


Second (related), the Hamiltonian is actually not necessarily T + V, but is the Legendre transform of the Lagrangian. So, in general, besides the physical interpretation of total energy, what do we have to gain from performing this transform?
 
Physics news on Phys.org
  • #2
The Lagrangian is defined so that finding the minimum (more generally the stationary points) of the action functional [itex]S=\int_a^b \mathcal{L} dt[/itex] will yield the correct equations of motion. It turns out that for non-relativistic mechanics, the correct Lagrangian to choose is T-V.

One gains both a new perspective and perhaps a simpler method when switching from Lagrangian to Hamiltonian mechanics. The Hamiltonian formulation reduces the N 2nd order differential equations found from the Euler Lagrange equations into 2N 1st order differential equations which can sometimes be easier to solve.
 
  • #3
I'm afraid your knowledge of Classical Mechanics is very chaotic.

Hamilton's principle (of least action) is quite different from a Hamiltonian.

The priniciple should give the equations of motion. Try to extremize:
[tex]
Y[q(t), p(t)] = \int_{t_i}^{t_f}{\left( \frac{p^2}{2m} + V(q)\right) \, dt}
[/tex]
where Y stands for "your action", with the Hamiltonian as an integrand (displayed as a function of coordinate and momentum, as it ought to be). Vary it w.r.t. both q and p. What do you get?
 
  • #4
The lagrangian is important because of its integral, a quantity called action:

http://en.wikipedia.org/wiki/Action_(physics )

Action is a property of the dynamics of a system, that takes as an input the trajectory of a dynamical system. It has been both proven and observed that nature chooses the path the gives the smallest value for that integral, otherwise known as "the principle of least action".

EDIT: We all answered in the same time :)
 
Last edited by a moderator:
  • #5
Does anyone have an example of when -- e.g. using Lagrangian mechanics -- kinetic energy T depends on not just generalized velocity but also generalized position?
 
  • #6
Sure: switch to polar coordinates when looking at the Lagrangian for an orbiting mass (or just use polar coordinates in general: Newtonian gravity is nice because it's simple). Another less contrived example (any change in coordinates can result in weird position-dependent kinetic energies) is in the "extended" Lagrangian used to model constant temperature and pressure ensembles in molecular dynamics simulations. You can read about it here:
http://en.wikipedia.org/wiki/Nosé–Hoover_thermostat

One issue with Hamiltonian minimization is that it isn't a well defined decision protocol in Hamiltonian systems (that is, systems where the total energy is constant like the classical universe). Also, even if we instead treated the total energy as a variable in the path, we would get time reversal issues and additional decision-protocol problems: in the short run, it might be better for a marble to roll to the closest energy minimum and stay. However, in the long run it would be better for the marble to find the shortest path to the lowest energy possible and then stay there forever.
 
  • #7
danmay said:
Does anyone have an example of when -- e.g. using Lagrangian mechanics -- kinetic energy T depends on not just generalized velocity but also generalized position?

Consider a "double pendulum", i.e. two point particles with masses [itex]m_1[/itex], and [itex]m_2[/itex], connected to the pivot and each other with rigid massless rods of lengths [itex]L_1[/itex], and [itex]L_2[/itex], respectively.

180px-Double-Pendulum.svg.png

One can choose the angles [itex]\theta_{1,2}[/itex] on the above figure as generalized coordinates. The position of each particle are:
[tex]
x_1 = L_1 \, \sin \theta_1, \ y_1 = L_2 \, \cos \theta_1
[/tex]
[tex]
x_2 = L_1 \, \sin \theta_1 + L_2 \, \sin \theta_2, \ y_2 = L_1 \, \sin \theta_1 + L_2 \, \sin \theta_2
[/tex]
The velocity components are given by the derivaties:
[tex]
\dot{x}_1 = \dot{\theta}_1 \, L_1 \, \cos \theta_1, \ \dot{y}_1 = -\dot{\theta}_1 \, L_1 \, \sin \theta_1
[/tex]
[tex]
\dot{x}_2 = \dot{\theta}_1 \, L_1 \, \cos \theta_1 + \dot{\theta}_2 \, L_2 \, \cos \theta_2, \ \dot{y}_2 = -\dot{\theta}_1 \, L_1 \, \sin \theta_1 - \dot{\theta}_2 \, L_2 \, \sin \theta_2
[/tex]
Then, the square of the speeds are:
[tex]
v^{2}_{1} = \dot{x}^{2}_{1} + \dot{y}^{2}_{1} = \dot{\theta}^{2}_{1} \, L^{2}_{1}
[/tex]
[tex]
v^{2}_{2} = \dot{x}^{2}_{2} + \dot{y}^{2}_{2} = \dot{\theta}^{2}_{1} \, L^{2}_{1} + \dot{\theta}^{2}_{2} \, L^{2}_{2} + 2 \, \dot{\theta}_{1} \, \dot{\theta}_{2} \, L_{1} \, L_{2} \, \cos \left( \theta_2 - \theta_1\right)
[/tex]
and the kinetic energy of the system is:
[tex]
T = \frac{m_1 \, v^{2}_{1}}{2} + \frac{m_2 \, v^{2}_{2}}{2} = \frac{(m_1 + m_2 ) \, L^{2}_{1}}{2} \, \dot{\theta}^{2}_{1} + \frac{m_2 \, L^{2}_{2}}{2} \, \dot{\theta}^{2}_{1} + \color{\red}{m_2 \, L_1 \, L_2 \, \dot{\theta}_1 \, \dot{\theta}_2 \, \cos \left( \theta_2 - \theta_1 \right)}
[/tex]
As you can see, the term in red contains the generalized coordinates through the cosine of the difference of the two angles.
 
  • #8
danmay said:
[...] the Lagrangian L = T - V [...] what does it actually mean?

The Lagrangian does have meaning, and in my opinion, once you know that meaning it makes perfect sense.


In november 2010 I posted in a thread titled 'Lagrangian'.

My purpose is to show that the form of the Lagrangian follows from the Work/Energy theorem. The mathematical discussion that I posted here on physicsforums is a shortened one, a more extensive discussion is on my own website.
(I'm strongly influenced by Edwin Taylor, who is a strong proponent of the principle of least action. I recommend Edwin Taylor's least action web pages.)

The discussion that I present is only for a specific example. I believe the discussion can be readily generalized, but I didn't pursue that because I wanted to keep it very tangible.


Anyway, while the Lagrangian looks counterintuitive, it does make sense. I encourage you to look into the resources I mentioned.
 
  • #9
There are maybe 3 ways to think of the T-U Lagrangian.

1st way is that you look for a Lagrangian that give you Newton's equations of motion as the Euler-Lagrange equation in rectangular coordinates. By a simple calculation, T-U is what you come up with.

2nd way: Think of throwing a ball in the air. Its trajectory is a parabola. Think of the action as a cost which you are trying to minimize. T-U tells you it likes to be in state where U is high and it doesn't like to be in a state where T is high. So, it wants to go up high because U is high there, but it has to get back down somehow (in Lagrangian mechanics, you fix a starting place and ending place). So it does that and spends as little time as possible down low. So, you can see that roughly parabolic motion should minimize the action.

3rd way: the principle of virtual work. Essentially, the variation of the T part of the action represents work done by a fictitious force on a trajectory that deviates slightly from the Newtonian path, and the variation of the U part is the extra work done by the potential to deviate by that path. That's really the physical meaning of the Lagrangian. I've been fairly terse here, so here are some more detailed notes:

http://math.ucr.edu/home/baez/classical/cm05week01.pdf

I have worked out my own more intuitive approach to this derivation, but I'm too lazy to reproduce it here, and it might end up getting a bit too long.
 
  • #10
homeomorphic said:
[...] ways to think of the T-U Lagrangian.

3rd way: the principle of virtual work. Essentially, the variation of the T part of the action represents work done by a fictitious force on a trajectory that deviates slightly from the Newtonian path, [...]

Let me expand on this one.

The Newtonian path has the following property: at every point in time the rate of change of kinetic energy matches the rate of change of potential energy. Now draw a diagram with two curves: the kinetic energy as a function of time, and the potential energy as a function of time, but draw the potential energy curve upside down. That is, draw the curve for minus the potential energy.

For the Newtonian path the diagram has the following property: the curves for kinetic energy and minus potential energy are parallel to each other at every point in time.
Conversely, for any path that deviates anywhere from the Newtonian path the curves are not parallel to each other at every point in time.


This gives a hint towards explaining why the lagrangian works with minus the potential energy. The action is minimal when the curve for kinetic energy and the curve for minus potential energy are parallel to each other at every point in time.


homeomorphic said:
I have worked out my own more intuitive approach to this derivation, [...]

Hi homeomorphic, can I persuade you to check out the article Least action visualized that is on my website.
I'm very curious whether the discussion there is similar to the intuitive approach you've worked out for yourself.
 
  • #11
Hi homeomorphic, can I persuade you to check out the article Least action visualized that is on my website.
I'm very curious whether the discussion there is similar to the intuitive approach you've worked out for yourself.

I didn't read it too carefully, but it looks like it's a bit different from mine. Mine is closer to what Baez says in the notes that I linked to.
 
  • #12
This is great. Allow me some time to read over them.
I should have checked back sooner, but for a while no new posts were being made.
 
  • #13
danmay said:
This is great. Allow me some time to read over them.

For Edwin Taylor's website a good place to start, I think, is the page that was created by Edwin Taylor and Slavomir Tuleja: Principle of least action interactive.

Taylor and Tuleja show that the Newtonian trajectory can be found with an iterative process. The iteration finds a trajectory with the property that along each subsection the change of kinetic energy and the change of potential energy are a match for each other.


What I find interesting about that iterative approach is that it's in a sense an intermediate between the f=ma approach, that is handled with differentiatial calculus, and the least action approach, that is handled with integral calculus.

In the iterative approach for each subsection local change of kinetic energy and potential energy is evaluated. Exhaustively cycling throught the iterations makes the evaluation comprehensive for the trajectory as a whole.
 
  • #14
I'm wondering, are there cases where the action has no local minimum? With respect to small s, that is. Because if [itex]{\partial \over \partial s}S(\mathbf{q}(t))|_{s=0}[/itex] were not 0, then it would no longer be equivalent to [itex]\mathbf{F} = m\mathbf{a}[/itex].
On a related note, [itex]\mathbf{F} = m\mathbf{a}[/itex] plus the conservation of energy seem to be able to specify a future location, but with the action principle, you have to try all locations or know the final position beforehand. Meanwhile, they both require additional pieces of information (e.g. initial/final position, initial/final velocity, and the total time elapsed). Any thoughts on that?

Cleonis said:
For the Newtonian path the diagram has the following property: the curves for kinetic energy and minus potential energy are parallel to each other at every point in time.
This is a consequence of the conservation of energy right? But I can't seem to figure out what significance it holds in terms of minimizing the action. I think the conservation of energy is an "outside" albeit evidentially valid constraint that must be introduced into the Lagrangian or the Newtonian analysis in order to define potential energy in the first place, which is why the action principle uses both the Lagrangian and the conservation of energy.

homeomorphic said:
2nd way: Think of throwing a ball in the air. Its trajectory is a parabola. Think of the action as a cost which you are trying to minimize. T-U tells you it likes to be in state where U is high and it doesn't like to be in a state where T is high. So, it wants to go up high because U is high there, but it has to get back down somehow (in Lagrangian mechanics, you fix a starting place and ending place). So it does that and spends as little time as possible down low. So, you can see that roughly parabolic motion should minimize the action.

3rd way: the principle of virtual work. Essentially, the variation of the T part of the action represents work done by a fictitious force on a trajectory that deviates slightly from the Newtonian path, and the variation of the U part is the extra work done by the potential to deviate by that path. That's really the physical meaning of the Lagrangian. I've been fairly terse here, so here are some more detailed notes:
So the action [itex]\mathbf{S}[/itex] is like weighted time. I'm wondering, can you specify an ending place that is not possible to reach (due to insufficient energy or being along a different direction from the particle's initial heading)? Would we still end up with "the correct solution"? Would the action principle be general enough to accommodate for such trials?
And the virtual work principle sounds similar to the "path" of least resistance, except it isn't necessarily a path (function mapping from every [itex]t[/itex] to a single value of [itex]q[/itex]) where quantum mechanics is concerned?
 
Last edited:
  • #15
By the way Cleonis, I really like your Site. I had visited it before for the sections on the Coriolis effect and Foucault's pendulum, but I didn't know you are on this forum as well.
 
  • #16
danmay said:
I think the conservation of energy is an "outside" albeit evidentially valid constraint that must be introduced into the Lagrangian or the Newtonian analysis in order to define potential energy in the first place, which is why the action principle uses both the Lagrangian and the conservation of energy.

Let me give an example of a case where the definition of potential energy is independent from other energies: planetary motion.

We have the inverse square law of gravitation, which describes the force, and using the work/energy theorem the potential energy law follows mathematically from the force law. Solving the differential equations of the force law also gives the physical trajectory of a planet.
Then you evaluate the sum of kinetic energy and potential energy at every point in time, and you find that the magnitude of this sum does not change.

This illustrates that Newton's laws of motion alone suffice to imply conservation of the sum of potential gravitational energy and kinetic energy. It's already there.
I do grant you that in the history of physics there have been situations where potential energy was defined by way of reliance on energy conservation. For some phenomenon there would be an appearence of energy not being conserved. Time and again the following strategy proved fruitful: assume some unknown force law is at work and infer the corresponding potential energy law by tracking how much apparent violation of energy conservation you see, and take it from there. So yes, there have been cases where in order to make headway some as yet unknown form of potential energy was defined by way of reliance on energy conservation. If that would be the the case for all forms of potential energy, then as you say the rule of conservation of energy would be merely a rule to 'define potential energy in the first place'.

However, once a phenomenon is understood potential energy that is involved can be defined independently, and planetary motion is an example of that.
danmay said:
By the way Cleonis, I really like your Site. I had visited it before for the sections on the Coriolis effect and Foucault's pendulum, but I didn't know you are on this forum as well.

I'm pleased you hear you like my website.
I have periods that I'm active on this forum, but also periods that I don't visit/read/post for months
 

1. What is the Lagrangian and Hamiltonian?

The Lagrangian and Hamiltonian are mathematical functions that describe the dynamics of a physical system. They are used in the field of mechanics to determine the motion of particles and systems.

2. Why are the Lagrangian and Hamiltonian defined as they are?

The Lagrangian and Hamiltonian are defined using the principle of least action, which states that the path a particle or system takes is the one that minimizes the action, a quantity that represents the integral of the Lagrangian over time. This principle leads to the equations of motion for a system.

3. What is the difference between the Lagrangian and Hamiltonian?

The Lagrangian is a function that describes the kinetic and potential energies of a system, while the Hamiltonian is a function that represents the total energy of the system. The Hamiltonian is derived from the Lagrangian and includes the system's kinetic and potential energies as well as any external forces acting on the system.

4. How are the Lagrangian and Hamiltonian used in physics?

The Lagrangian and Hamiltonian are used to solve problems in mechanics, such as determining the equations of motion for a system or predicting the behavior of a physical system. They are also used in other fields of physics, such as quantum mechanics and general relativity.

5. Are there any limitations to using the Lagrangian and Hamiltonian?

While the Lagrangian and Hamiltonian are powerful tools for solving problems in mechanics, they do have limitations. These functions may not accurately describe certain systems, such as those with non-conservative forces or systems with high levels of complexity. In these cases, other methods may be necessary for analyzing the system's dynamics.

Similar threads

  • Classical Physics
Replies
4
Views
4K
Replies
1
Views
465
Replies
27
Views
2K
Replies
3
Views
931
Replies
5
Views
2K
  • Classical Physics
Replies
3
Views
1K
  • Advanced Physics Homework Help
Replies
6
Views
2K
  • Classical Physics
Replies
2
Views
2K
Replies
6
Views
2K
Replies
12
Views
848
Back
Top