Skip to main content

Featured

Lomb Scargle Periodogram

An astronomical time series data is a series of discrete events with either an even or uneven sampling rate. This can be expressed mathematically as a pointwise product between a continuous signal with a rectangular function and a dirac comb.  The Discrete Fourier transform of this results in the convolution of the three functions in the omega space. The square of the Fourier transform is proportional to the power of each periodic signal in the time series or more accurately: Scargle showed that this is equivalent to fitting the time series data with the model  using a least square fitting. The resulting Chi square for each frequency is indicative of the power that the signal contributed to the time series. Essentially the difference between the absolute difference between the chi square assuming non variability and the chi square assuming a sinusoidal variation in the time series is equivalent to the Power, or the classical periodogram given by Lomb. Scargle’s Method of Calcu...

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 = \int_{t_1}^{t_2} L \, dt$$

where $L$ is the Lagrangian of the system. 

Let us try and understand what this means. Let's consider a particle which was at $r_1$ at time $t_1$ and $r_2$ at time $t_2$. 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

$$\begin{align}T &= \frac{1}{2}m\dot{y}^2 \\ V &= mgy \end{align}$$

The Lagrangian becomes

$$L = \frac{1}{2} m \dot{y}^2 - mgy$$

If the ball starts off at time $t_1$ and reaches the ground at time $t_2$, the Action for the system will be

$$S[y(t)] = \int_{t_1}^{t_2} \left( \frac{1}{2} m \dot{y}^2 - mgy \right) \, 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 $t_2$. 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 $x_0(t)$ produces a stationary value in the functional $L$, then:

$$\frac{d}{dt} \left( \frac{\partial L}{\partial \dot{x}_0}\right) = \frac{\partial L}{\partial x_0}$$

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 = \frac{1}{2}m \dot{x}^2$$

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

$$m\ddot{x} = 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 

$$m \ddot{x} = -\frac{\partial V}{\partial x}$$

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:
$$\begin{align} x_0 = 0 \; m && \\ m = 1 \; kg && \\ u= 10\;m/s && \\ g =9.8 \; m/s^2 &&  \end{align} $$

Then, my equation of motion becomes:
$$x(t) = x_0 + ut - \frac{1}{2}g{t^2}$$
The ball starts moving at $t = 0s$ and reaches the ground at $t \approx 204.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 $t \approx 2.0408$ which I'll call $t_1$ and $t_2$ respectively.

I can generate a set of trajectories using the equation of a parabola. As the quadratic equation has to vanish at $t= t_1$ and $t = t_2$, they have to be the roots of the equation. Thus, we have our equation:
$$X'(t) = x_0 + ut - \frac{1}{2}gt^2 + kt(t -2.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