Featured

Hamilton's Principle

In the d'Alembert Principle, we were introduced to the notion of virtual displacement and virtual work. The Lagrange's equation emerged as a consequence of this principle, and it proved to be a powerful tool in deriving equations of motion of any physical system. 

Here, we derive Lagrange's Equation using Hamilton's Principle. In introductory classical mechanics, we are used to think in terms of forces and vectors while solving physical systems. They were quite intuitive, albeit a little tedious when complex systems were involved. Another way of approaching these problems is to begin with the assumption that "Nature is lazy". In any kind of dynamical system, she always ensures that a particular quantity takes on the least possible value. We call this quantity, the Action of the system. So, instead of keeping track of all the force vectors that are acting on the system, we ask ourselves, what quantity is being minimized here? Essentially, we try to formulate the Action and figure out what parameters it depends on and try to minimize it to get the equations of motion.

The action, as far as classical mechanics is concerned, is defined as 

S=t1t2Ldt

where L is the Lagrangian of the system. 

Let us try and understand what this means. Let's consider a particle which was at r1 at time t1 and r2 at time t2. The particle could, in principle traverse any path it fancied but it tends to follow the trajectory in which the action is minimized. Thus, the Action is not a typical function, it is a functional. It's a "function" that takes in a function and outputs a number. In this case, the input would be the set of all possible trajectories that the particle could travel. The output would be some number, and the claim is that the true path of the particle is one for which this number is the least.

If I were to throw a ball up in the air, it's going to go up, reach its highest point and fall down. Let's write down the action for this.

The Kinetic Energy and Potential energy of the ball are

T=12my˙2V=mgy

The Lagrangian becomes

L=12my˙2mgy

If the ball starts off at time t1 and reaches the ground at time t2, the Action for the system will be

S[y(t)]=t1t2(12my˙2mgy)dt

Before we delve right into the mathematics, let us look at this like physicists and figure out what's going on. 

The Lagrangian is the difference between the kinetic and the potential energy of the system. If the integral has to be a minimum, L has to be a minimum. This could happen if the potential part was larger compared to the kinetic part. 

Naturally, this would happen if the ball were to rise up in the air, reach its peak position, and stayed there indefinitely. But remember, we have already set the position of the ball at its start and end time. It starts from the ground and falls back to the ground. So, even if it stayed at the top for the most amount of time, it has to come down eventually, and make it to the ground within time t2. This would demand a large amount of kinetic energy which would contribute to increasing the action. 

Now, we understand that this is a game of balance. The ball should have sufficient kinetic energy to reach a good height, but not too much. It needs to go high enough and stay there long enough to minimize the action, but it can't stay too long as it is counterproductive.  

Mathematically speaking, we try to minimize the action functional. Technically, we are extremizing the action. 

From variational calculus, we have a theorem that says:  If x0(t) produces a stationary value in the functional L, then:

ddt(Lx˙0)=Lx0

A detailed derivation is given in the notes. 

This is called the Euler - Lagrange equation and it specifies the condition for the existence of a stationary point (maxima, minima or a saddle point) for a functional L. In physics, we call this Lagrange's Equation. 

So, the Lagrange's equations give us the extremizing condition for the Action. Let's explore this idea by considering simple physical systems first. 

Let us think of a particle moving in space, free of any potential forces. 

Then the potential energy V=0

The Lagrangian becomes L=12mx˙2

Plugging in the Lagrangian in Lagrange's equation, we get

mx¨=0

We just derived Newton's first law from Hamilton's Principles! When a body is free of external forces, it's velocity is a constant.

Now if we introduce a potential like V(x) we get 

mx¨=Vx

which is Newton's Second Law!

Hamilton's principle can then be thought of as a more fundamental principle. The laws of motion emerge as a consequence of minimizing the quantity called the Action. 

A Simulation

The first time I read about the Principle of Least Action, I wasn't exactly convinced, and it didn't really make much intuitive sense. So, I ran a simulation in python to really see for myself that the action for the classical path is indeed extremized.

Let's take the same example of throwing a ball up in the air. Here are the initial conditions:
x0=0mm=1kgu=10m/sg=9.8m/s2

Then, my equation of motion becomes:
x(t)=x0+ut12gt2
The ball starts moving at t=0s and reaches the ground at t204.08s

We have proven previously, that this is the true path, the path of least action. But to actually show this, we need a few test paths that deviate from this. The paths are constrained to begin at t=0 and reach the ground at t2.0408 which I'll call t1 and t2 respectively.

I can generate a set of trajectories using the equation of a parabola. As the quadratic equation has to vanish at t=t1 and t=t2, they have to be the roots of the equation. Thus, we have our equation:
X(t)=x0+ut12gt2+kt(t2.0408)

To get the modified trajectories, we will vary n from 1000 to 1000 to get a total of 2000 trajectories. Here's a plot of a few of them compared to the true trajectory denoted by the solid white line.

X(t)

Here's the Action for the trajectories generated by X(t), I've labelled the y axis as S[X(t,n)] just to make it clear that X is in fact a set of trajectories generated by varying n.
The dotted white line at the bottom is the Action for the true path x(t).
From the graph it is quite evident that the action is the minimum when n=0 and the quadratic term disappears.


Hamilton's Principle and Lagrange's equations don't just give us Newton's Laws and the equations of motion. These principles have some profound consequences in and bring in a new approach in dealing with physics. The conservation laws are one of these consequences of Hamilton's Principle. 

Let us plot the total energy of the system, for one of the trajectory with time. 


It's clear that the energy is varying as time progresses for the modified trajectory (given by the blue line), in contrast to the the classical path for which the energy remains a constant throughout.



References

1. Feynman Lectures - Vol II

2. Introductory Classical Mechanics - Morin

Comments

Popular Posts