# Calculus of variations in mechanics

1. Sep 14, 2008

### Heirot

Hello!

I have a couple of questions concerning Lagrangian and Hamiltonian mechanics.

First of all, are generalized velocities dq/dt (t) functionally depenent or independent of generalized coordinates q(t)? We vary them independently while deriving Euler - Lagrange equations, so it would apper that they are independent functions. But that doesn't make much sense (at least not for me). One is a derivative of the other! How can they be independent? The same questions goes for canonical momenta and coordinates in Hamiltonian mechanics. Do we postulate the independace of momenta or what?

Thank you

2. Sep 14, 2008

### Ben Niehoff

You treat them as independent variables, yes. And if you think about it, they actually are. For example, consider the simple case of q_i simply being the ordinary Cartesian coordinates x, y, and z. Certainly you can imagine that a particle found at point (2, 5, -1) can have any velocity whatsoever!

Therefore, when considered as abstract state variables, the coordinates and velocities (or momenta) must be considered independent. It is only after solving the Euler-Lagrange equations that you derive the actual physical dependence between them.

3. Sep 14, 2008

### Heirot

Yes, thank you, that is physically plausible, but what about the mathematics' point of view? We still have a function and its derivative. However abstract and unknown the function may be, its derivative cannot be arbitrary! Whatever the function is, we can always find its derivative (in principle).

Last edited: Sep 14, 2008
4. Sep 14, 2008

### smallphi

When you derive the Euler-Lagrange equations from an action specified in terms of a Lagrangian, the things that one vary are the coordinates q(t), the variations in the velocities are DERIVED from those of the coordinates so velocities are considered dependent on the coordinates - at the end the variation of the action is written as an integral over the variations of the coordinates and since those are all independent, then you conclude that the integrand must be zero leading to the Euler-Lagrange equations. The variations of the velocities had to be eliminated beforehand because they are NOT independent of those of the coordinates and hence you can't conclude the integrand must be zero for the integral to be zero.

There is another formulation of the action, in terms of Hamiltonian, and in this formulation the velocities are considered independent from the coordinates. It is proven that this is equivalent to the Lagrangian formulation.

There is no physical significance behind any action formulation. The action is just a convenient mathematical machinery to generate equations of motion and impose certain symmetries on them. The particles or the system do not 'feel' which is the shortes path and follow it. In quantum field theory they use integrals over all possible paths with different probabilities but again its a mathematical machinery that gets the right results, it doesn't mean that the field 'feels' the most probable path. The physical significance of the action principle is totally unclear to me, it's never proven that any physical theory that has something to do with experimental data should be derived from an action principle.

5. Sep 14, 2008

### Heirot

OK, I can see where I was mistaken. So, in the transition beetween Lagrangian and Hamiltonian, we ASSUME that the momenta are independent of the coordinates and then show that we get the equivalent equations -> therefore our assumption is valid?

6. Sep 14, 2008

### smallphi

The lagrangian and the hamiltonian schemes just show that you can assume whatever you want to be independent as long as you get the correct equations of motion.

That has nothing to do with the fact that in real life if you know the coordinates as function of time, you can derive the velocities.

7. Sep 14, 2008

### Heirot

But then Lagrangian mechanics is a more realistic model than the Hamiltonian mechanics. Oh boy, I'm sooo confused right now

8. Sep 14, 2008

### smallphi

In reality nothing is varied so neither of them is more or less realistic. The particle doesn't vary its coordinates to determine which path is shorter, it simply follows its equations of motion.

On the other hand, variational problems lead to differential equations. The question is can one set up a variational problem to obtain the right equations of motion. And it turns out it's possible. Wether that originates from some deeper physical principle nobody knows yet.

The variables that can be varied are positions, momenta and time, and you can choose to vary whatever you want as long as mathematically you get the right equations of motion. I've seen formulations where even the time is varied, that is the usual case in General relativity, but I've seen it even in classical mechanics.

Here is a very good introductory book in Lagrangian mechanics with some advanced topics. Unfortunately, some parts of the book (the Hamiltonian formulation) are still unwritten:
http://homepages.physik.uni-muenchen.de/~Winitzki/Classical_mechanics_book.pdf [Broken]

The thing I told you, that the variational principle is just a mathematical machinery to obtain equations of motion and the actual system doesn't care of minimizing some action integral, is discussed in section 3.2.1

Last edited by a moderator: May 3, 2017
9. Sep 15, 2008

### Peeter

Although not mechanics, two examples of time varation in classical physics are Maxwell's equations from the $E^2 - c^2B^2$ energy density, and the Lorentz force Law from the $A \cdot v$ potential.

Last edited: Sep 15, 2008
10. Sep 19, 2008

### smallphi

I think the question of this thread was mainly due to mixing up the 'virtual displacements' in D'Alembert's principle (which makes possible using Lagrangians in systems with unknown constraint forces that have zero virtual work) with the variations in the variational principles. Most textbooks I know, even very good ones, use exactly the same notation for virtual displacements and variations which doesn't help the problem.

A good very clearly written book for undergraduate classical mechanics is the "Classical Mechanics" by R. Douglas Gregory. It covers D'Alembert's principle (one of the best coverage of that I've seen), Lagrangians, the variational principle with Lagrangians, and transition to phase space and Hamilton's equations. It doesn't cover the variational principle with Hamiltonians but is very good and I think essential preparation for it. This textbook is a MUST if one want's not only to do calculations but also to understand them.

Another more advanced textbook is "Analytical Mechanics for Relativity and Quantum Mechanics" by Oliver Davis Johns. It covers the above plus variational principle with Hamiltonians and much more like cannonical transformations, Hamilton-Jackobi theory etc. It has examples of varying the time in non-relativistic mechanics (electromagnetism is relativistic) which is not usually seen in classical textbooks. Such unusual variations made me realize that one can vary whatever is convenient as long as the desired equations of motion are obtained. The book is more advanced than Gregory so I recommend it AFTER covering the corresponding sections in Gregory. The two books furnish a complete course in Lagrangians and Hamiltonians.

Last edited: Sep 19, 2008
11. Sep 21, 2008

### Heirot

Thank all of you, I finally got it now But now another question rises... I was reading Landau the other day and he commented (in one of the footnotes) that Euler - Lagrange equations give the least action only locally, but globally they are a necessary contidion for the stationary action. I understand that they corespond to the first derivative in calculus of one variable, and therefore they give stationary "points" (actions). But why is it locally minimum? And how can a sum of local minima give anything else than a global minima?