Variables in lagrangian vs hamiltonian dynamics

In summary: Neither in Lagrangian nor in Hamiltonian formalism are the variables truly independent. As an example, take an oscillator, whose (reduced) Lagrangian is ## {\dot q^2 \over 2} - k{q^2 \over 2} ##, the E-L equation is ## \ddot q + k q = 0 ##. This equation can be trivially converted to ## \dot q^2 + k q^2 = h ##, where the dependence between ##q## and ##\dot q## is manifest. Why this example proves that the variables in the Hamiltonian formalism are likewise not independent is left as an exercise.
  • #1
copernicus1
99
0
In the lagrangian formalism, we treat the position ##q## and the velocity ##\dot q## as dependent variables and talk about configuration space, which is just the space of positions. In the hamiltonian formalism we talk about canonical positions and momenta, and we consider them independent. Is the independence based on the additional parameters in momenta (namely the mass), or is it based on the fact that the canonical momentum is separate from the physical momentum?

Thanks!
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
The choice of which parameters are independent from each other is completely up to you. In lagrangian mechanics one chooses [itex]q[/itex] and [itex]\dot q[/itex], so you have two independent variables. When you define the conjugate momentum you are going to have:
$$
\frac{\partial L}{\partial \dot q}=p(q,\dot q).
$$
Now, there is nothing wrong in inverting this relation to obtain [itex] \dot q(q,p)[/itex] and then re-write everything in terms of [itex]q[/itex] and [itex]p[/itex], you will still have two independent variables, just with a different meaning. This is nothing but a change of variables.
 
  • #3
I think you may have misread my question. My question was referring to the dependence of q and q-dot in the Lagrangian formalism versus the independence of q and p in the Hamiltonian. In Lagrangian dynamics, q and q-dot are not independent. I'm wondering about the difference between the two formalisms.
 
  • #4
Actually in the lagrangian formalism q and q-dot are treated as independent variables. When, for example, you take the variation of the action you derive first w.r.t. q and then w.r.t. q-dot, this can only be done if they are considered as independent, otherwise you would have to use the chain rule.
 
  • #5
Einj said:
Actually in the lagrangian formalism q and q-dot are treated as independent variables. When, for example, you take the variation of the action you derive first w.r.t. q and then w.r.t. q-dot, this can only be done if they are considered as independent, otherwise you would have to use the chain rule.

That is false. You would not have to use the chain rule, you merely might, which would lead you nowhere. Lagrange's insight was that instead of using the chain rule, one should use integration by parts, which eliminates q-dot (except he did not use the dot notation all) and results in Euler-Lagrange equations immediately.

Neither in Lagrangian nor in Hamiltonian formalism are the variables truly independent. As an example, take an oscillator, whose (reduced) Lagrangian is ## {\dot q^2 \over 2} - k{q^2 \over 2} ##, the E-L equation is ## \ddot q + k q = 0 ##. This equation can be trivially converted to ## \dot q^2 + k q^2 = h ##, where the dependence between ##q## and ##\dot q## is manifest. Why this example proves that the variables in the Hamiltonian formalism are likewise not independent is left as an exercise.
 
  • Like
Likes ZetaOfThree

Related to Variables in lagrangian vs hamiltonian dynamics

1. What is the difference between lagrangian and hamiltonian dynamics?

Lagrangian dynamics and Hamiltonian dynamics are two different approaches to describing the motion of a system. In lagrangian dynamics, the equations of motion are derived from a single function, called the Lagrangian, which takes into account the kinetic and potential energy of the system. In Hamiltonian dynamics, the equations of motion are derived from another single function, called the Hamiltonian, which takes into account the total energy of the system.

2. What are the advantages of using lagrangian dynamics over hamiltonian dynamics?

One advantage of using lagrangian dynamics is that it is easier to include constraints in the system, such as fixed points or rigid bodies. This makes it a better choice for complex systems with many constraints. Another advantage is that the Lagrangian formulation can be generalized to include non-conservative forces, while the Hamiltonian formulation cannot.

3. How do variables differ in lagrangian and hamiltonian dynamics?

In lagrangian dynamics, the variables used to describe the system are the generalized coordinates and their derivatives, such as position and velocity. In hamiltonian dynamics, the variables used are the generalized coordinates and their conjugate momenta, which are related to the system's energy. The choice of variables depends on the specific problem being solved.

4. Can lagrangian and hamiltonian dynamics be used for any type of system?

Yes, both lagrangian and hamiltonian dynamics can be applied to any type of system, as long as it can be described using generalized coordinates. These can include classical mechanics problems, as well as quantum mechanics and field theory problems.

5. Are there any limitations to using lagrangian and hamiltonian dynamics?

One limitation of using lagrangian and hamiltonian dynamics is that they are not always interchangeable. In some cases, one formulation may be more suitable than the other. Another limitation is that the equations of motion can become very complex for highly nonlinear systems, making it difficult to find analytical solutions.

Similar threads

Replies
3
Views
979
Replies
20
Views
8K
Replies
2
Views
2K
Replies
6
Views
2K
Replies
7
Views
797
Replies
4
Views
648
Replies
5
Views
898
Replies
25
Views
1K
  • Advanced Physics Homework Help
Replies
1
Views
707
  • Introductory Physics Homework Help
Replies
5
Views
279
Back
Top