Classical Mechanics 3: The Euler-Lagrange Equation (Derivation!).

by George Russell-Ross | Classical Mechanics

Equations of Motion.

The diligent reader (who reads the sections in chronological order) will be familiar with the paths of descent problem, also known as the tautochrone problem. Whilst producing their independent and brilliantly unique solutions, two great scientific minds produced an equation so devilish, we will need several sections to master it.

In principle, the Euler-Lagrange equation allows you to compute equations of motion, but what actually are equations of motion?

In short, equations of motion simply describe how a system evolves over time. There is really only one requirement: they must be a function of time that describes either position, velocity, acceleration or another time-derivative of displacement. As the most famous example, the SUVAT equations describe the movement of an object that has constant acceleration. The EoMs discussed in the section will not be limited thus and will contain variable acceleration and for some added fun, they aren’t even limited to a stationary reference frame.

Equations of Motion are perhaps the most powerful result in Classical Mechanics because using them allows you to model and predict how the system moves over time – the very heart of the subject!

The Euler-Lagrange equation dominates so much of our time in this chapter because it is so good at computing EoMs. Furthermore, it’s true advantage is that plugging values into it takes almost the exact same amount of time and effort for any different type of system. Therefore, in simple systems such as one with constant acceleration, it is wildly inefficient to use it and the SUVAT system is already in place. However, in very complex systems, it is beautifully elegant and efficient thus allowing you to find the EoM’s much more easily. For example, consider this question:

Suppose one smaller sphere is placed on the top of a larger sphere such that it rests in unstable equilibrium. The smaller sphere on top, with mass m and radius r, is given a push of N newtons and rolls off the larger sphere, mass M and radius R. How long are the two spheres in contact with each other?

Finding equations of motion for this with Newtonian mechanics is not impossible, its just ludicrously hard. Modelling every force acting on both spheres and applying vector calculus is time consuming and even the best physicists can make mathematical errors. Once mastered, applying the Euler-Lagrange equation makes this much much easier.

The Lagrangian as a Function.

One important aspect of the Lagrangian is that it’s of an given object is a function of just three properties:

1 – Position.

The objects position affects the Lagrangian because it changes the potential energy as shown above in examples of V(x).

2 – Velocity.

Kinetic energy is dependent on velocity.

3 – Mass / Charge / Spring Constant.

The

and it’s mass and it’s velocity because they both change its kinetic energy, T. Lets dive one step deeper though. Velocity is also a function a position because it is just the rate of change of position so the Lagrangian depends on an objects position and mass.

To be honest, the Lagrangian is not very exciting on it’s own – really it’s just a number that shows a seemingly odd measure of energy in a system. However, when it is combined with the principle of least action exciting conclusions can be drawn. Before we can jump into the principle of least action however, we will first look at a fiendish maths puzzle and why Lagrangian Mechanics was born.

The Equation.

Simply put the equation is:

\[
\frac{d }{dt}\frac{\partial L}{\partial \dot{x_{i}}} = \frac{\partial L}{\partial x_{i}}
\]

Defining the Variables.

L = the Lagrangian of the system. Following the last section, remember, it is T – V or the kinetic energy – the potential energy.

xi = generalised co-ordinates. As the Euler-Lagrange equation is set up to model a myriad of systems, it also needs a wide selection of potential variables that uniquely define the system. xi is most commonly a measure of distance for systems including moving particles but it can also be a measure of angle in circulating or oscillating systems. Co-ordinate systems are more fully developed at the start of the next section.

xi-dot = the differential of xi with respect to time. Newton first developed of adding a dot above a variable when it has been time differentiated. For the example where xi is a measure of distance, xi-dot is a measure of velocity.

Partial Derivatives.

In the Euler-Lagrange equation, the reader may meet for the first time partial derivatives. ∂ (a stylised d) denotes a partial derivative and so ∂A / ∂B is a partial differential. They operate in a very similar way to normal differentials with one subtle, but vital, distinction. If you take the partial derivative of a function A=f(B), you take all other variables that are not B, to be constants.

As a simple polynomial example, let’s take f(B) = B2G4H11. Because we are doing a partial differentiation respect to B, we treat all other variables like they are constants. So we treat G4H11 as though it was 1. This means we are just left with B2 which differentiates to 2B:

\[
\begin{array}{rcl}
A & = & G^2H^{11}B^2 \\
\frac{\partial A}{\partial B} & = & \frac{\partial }{\partial B} (G^2H^{11}B^2) \\
& = & \underbrace{G^2H^{11}}_\text{constant} \frac{\partial }{\partial B} (B^2) \\
& = & G^2H^{11} \space \space 2B \\
& = & 2G^2H^{11}B \\
\end{array}
\]

Differentiating Time.

The very first part of the equation is d/dt. My eyes always twitch a little at this type of notation – it is convention to write it in the form:

\[
\frac{d }{dt}\frac{\partial L}{\partial x_{i}}
\]

However, I much prefer to think of it as:

\[
\frac{d \frac{\partial L}{\partial x_{i}}}{dt}
\]

For that is what the operation describes: you do the partial derivative of the Lagrangian, L, with respect to xi and then differentiate that with respect to time. Always work out the partial derivative first and then apply the differential!

Deriving the Euler-Lagrange Equation.

With an understanding of the Equation, it’s terms and what it is used for, let’s dive in to the main course of this section which is of course, deriving it. We start this proof by returning to our principle of minimised (or more accurately, stationary) action. To sum it up (integral pun!): 

\[
A = \int_{}^{} L dt = 0
\]

The Lagrangian, L, is dependent on the potential and kinetic energy of the system, which in turn are dependent on two properties: velocity and position. So we will rewrite the principle of stationary action to include this: 

\[
A = \int_{}^{}L (x,  \dot{x})dt
\]

The above equation uses notation that is more of a convention than actually true. The brackets just serve to remind us what L acctually depends on; mathematically, L’s components are position, x and velocity, x-dot. 

Segmented Time. 

By the very nature of the world we live in, time is a continuous function. Time flows smoothly from one instant to the next. However, when you take a video, all that happens is many photos are taken shortly after one another and the layered. By playing them consecutively at a certain rate (standard is 24 frames per second), you can generate the illusion of continuous time even though it is actually discrete time. 

parabolic falling

Discrete time for a parabolic fall – TGD.

A very similar process happens in this proof. Let’s assume the system we are modelling through the stationary action is a ball being thrown. Picture the trajectory of the ball as a line through 3D space. Imagine that the line has now been split into a ludicrously vast number of segments. The relationship between consecutive segments is simply a time difference. Segment 1 occurs at time = t1, whilst segment 2 occurs at time =t2. On the picture left, I have represented the segments with a hard dash. 

We will define the constant time difference between positions of the ball to be Δt and in the case of the video, Δt would simply be 1/24 seconds. In between the time segments there is nothing.

We can use the term stroboscopic to describe this. Imagine taking the ball and throwing it on a trajectory with a photo sensitive film behind it. Then place a strobe light that flashes periodically directed towards the screen. After the ball‘s flight has finished and many flashes have been emitted , you could examine the photo sensitive film. As pictured right, a pattern of ball-shaped dark patches can be seen where the ball blocked the flash with nothing in between. 

Parabolic falling

The shadows cast by the parabolic fall – TGD.

Applying the same logic to our ball that travels on its trajectory through ‘segmented time‘, we have modelled the smooth curve as a serious of positions, labelled t1, t2 …. Although, we can model where the ball is between positions as represented by the dotted line above. 

Because of this modelling assumption about the flight of the ball, we need to make a slight change to how we integrate the Lagrangian. By its nature, integrals only work on continuous variables so we are unable to integrate L with respect to time. However, we have a neat trick to get around this. Integration is nothing more than the infinite sum of infinitesimal parts over a range. We can approximate this to a finite number of summations through: 

\[
A = \int_{}^{}L (x,  \dot{x})dt\simeq \sum_{}^{} L (x,  \dot{x})\Delta t = 0
\]

Working with this expression further, we need to find a way of expressing x and x-dot in terms of our segmented time and by extension segmented distance. 

Position – x. 

Let’s find the average position of the ball between segments of time (flashes in the stroboscope example):

\[
x_{a}=\frac{ x_{n} + x_{n+1}} {2}
\]

Where xn is the position of the ball at time tn. Nothing more than the classic averages formula, this result allows us to approximate the position of the particle over the course of the trajectory. 

Velocity – x-dot.

\[
\dot{x}=\frac {x_{n+1}- x_{n}}{\Delta t}
\]

Can be found from velocity=distance/time. In this case it is modelled between two consecutive time intervals. 

Let us then rewrite the integral-approximation with those two substitutions: 

\[
A =\sum_{}^{} L(\frac{ x_{n} + x_{n+1}} {2} ,\frac {x_{n+1}- x_{n}}{\Delta t} )\Delta t
\]

The best way to imagine the above expression is to picture a series like: 

\[
 L(\frac{ x_{1} + x_{2}} {2} ,\frac {x_{2}- x_{1}}{\Delta t} )\Delta t + L(\frac{ x_{2} + x_{3}} {2} ,\frac {x_{3}- x_{2}}{\Delta t} )\Delta t + … L(\frac{ x_{n} + x_{n+1}} {2} ,\frac {x_{n+1}- x_{n}}{\Delta t} )\Delta t
\]

Remember the above series is nothing more than an approximation for the action of the system. At the core of classical mechanics and the primary assumption in this section is the principle of stationary action. In this context it means we can do the partial derivative of the series with respect to any of the xn series* and set it equal to 0. 

*= This is a slight stretch of  the truth. It only works for the interior‘ positions – all those positions that are not either x1 or xN (the two fixed end points). 

Interior Positions and Action.

It is so so vital to understand why we can apply stationary action to any of the interior positions of the xn series as it leads to a much deeper understanding of the Lagrangian. When I learnt this proof this logic occupied lots of my time, so I dedicate an entire subtitle to it.

My research boiled down to this: the principle of stationary action does not “test out” every possible trajectory and then pick the one with the least action, it only tests the next interval of time. In the real world, these intervals of time are infinitely small but in our approximation they are Δt long.

Routes on a Chess Board – TGD

Imagine you are playing chess on a square chess board that is split into 64 tiles as seen in the image above right. Suppose you want to find a path from point A on one side to point B on the opposite side. To get there in the shortest distance, you could look at the board as a whole and plot a straight line from A to B, cutting through many tiles. This route is highlighted in red.

Suppose though that you are now a king piece on the board and can only travel like a king, meaning you can take a one tile jump in any direction. To find the shortest distance now that you can’t look at the board as a whole, you could consider one square at a time. Looking at the 8 squares that surround you, pick the one that takes you closest to point B. Once on that tile, apply the same process. This route is highlighted in blue.

The principle of least action works in a very similar way. It cannot see every trajectory, in the same way the king can’t see the whole chess board. And, like the king, it considers one tile at a time. Rather than minimise distance tho, the principle of least action chooses the tile (the position xn), that causes the Action to remain stationary. Always remember, the principle of Least Action is a king!

Returning to differentiating our series, there’s a shortcut we can take because we can infer that each value of xn  appears in exactly two terms. Take x3 for example. It appears in the term where n = 3 but also in the term where n = 2 because there is an n+1 part in each term. 

We could apply the partial derivative to any of the values of n to apply the action-minimising process but to be fully mathematically vigorous, we’ll consider the general case: xc. The two terms containing xc are:

\[
 L(\frac{ x_{b} + x_{c}} {2} ,\frac {x_{c}- x_{b}}{\Delta t} )\Delta t \\and\\ L(\frac{ x_{c} + x_{d}} {2} ,\frac {x_{d}- x_{c}}{\Delta t} )\Delta t
\]

Where xb = xc – Δt and xd = xc + Δt. Before we can do this tricky differential though, we first need to understand the multivariable chain rule:

The Multi-Variable Chain Rule.

We want to take the partial derivative of the two Lagrangian terms containing xc. These terms are seen above and from now on we will define them as a collective with the letter B. Because there are two terms in B, we will uniquely define them as Bb (the first term of B that expresses xc in conjecture with xb) and Bd (the second term in B: the one that expresses xc and xd). Therefore, the partial derivative we need is: δB/δxc. 

The multivariable chain rule can be applied to functions that are dependent on two or more variables which in turn are both dependent on the same third variable. In this case, it is the Lagrangian being dependent on both velocity and position, which are both dependent on position, x. It is mathematically not sound to differentiate both the velocity and position functions separately because B depends on x indirectly through both position and velocity. To remain mathematically sound, we will apply the multivariable chain rule which states in this case:

\[
\tag{1}
\frac{\partial B_{b}}{\partial x_{c}}=[\frac{\partial B_{b}}{\partial \dot{x}}\times \frac{\partial \dot{x}}{\partial x_{c}}] + [\frac{\partial B_{b}}{\partial x}\times\frac{\partial x}{\partial x_{c}}]
\]

Some equations are what I call shells. They appear to be ridiculously hard at first glance but once you peel away the outer shell, the hollow inside is easy to interpret. The multivariable chain rule is one such equation. All it really is the chain rule on δB/δxc with respect to velocity + the chain rule on δB/δxc with respect to position. Peeling away the shell entirely, two of these terms are very easy to find:

Position.

Applying the substitution for position in terms of xc we can get:

\[
\frac{\partial {x}}{\partial x_{c}}=\frac{\partial }{\partial x_{c}}\frac{ x_{b} + x_{c}} {2}=\frac{1}{2}
\]

Partially differentiating with respect to xc means we just treat xc like a constant which vanishes.

Velocity.

Applying the substitution for velocity in terms of xc we can get:

\[
\frac{\partial \dot{x}}{\partial x_{c}}=\frac{\partial }{\partial x_{c}}\frac {x_{c}- x_{b}}{\Delta t}=-\frac{1}{\Delta t}
\]

This result is gained from treating xc like we did in the position section.

With these results found, we can substitute them into equation 1:

\[
\frac{\partial B_{b}}{\partial x_{c}}=[-\frac{1}{\Delta t}\frac{\partial B}_{b}{\partial \dot{x}} ] + [\frac{1}{2}\frac{\partial B_{b}}{\partial x}]\Delta t
\]

There is a Δt at the end of this expression because it is just a constant and so it is dragged along for the ride totally unchanged from our original expression equating the Lagrangian and Action.

The above expression is what we get when we apply the multivariable chain rule to Bb. We also need to do it for Bd. The reader may wish to follow the same process again and should arrive at the result:

\[
\frac{\partial B_{d}}{\partial x_{c}}=[\frac{1}{\Delta t}\frac{\partial B_d}{\partial \dot{x}} ] + [\frac{1}{2}\frac{\partial B_d}{\partial x}]\Delta t
\]

Recall the the partial derivative we wanted was δB/δxc. This is the culmination of our maths because the next step is simply collecting like terms.

\[
\frac{\partial B}{\partial x_{c}}=\color{Red} \frac{\partial B_{b}}{\partial x_{c}}\color{Black}+\color{Blue} \frac{\partial B_{d}}{\partial x_{c}}\\
=\color{Red} [-\frac{1}{\Delta t}\frac{\partial B_{b}}{\partial \dot{x}} ] + [\frac{1}{2}\frac{\partial B_{b}}{\partial x}]\Delta t \color{Black}+ \color{Blue}[\frac{1}{\Delta t}\frac{\partial B_d}{\partial \dot{x}} ] + [\frac{1}{2}\frac{\partial B_d}{\partial x}]\Delta t\\
=\frac{1}{\Delta t}(-\frac{\color{Red}\partial B_b}{\partial \dot{x}}+\frac{\color{Blue}\partial B_d}{\partial \dot{x}}) + \frac{1}{2}(\frac{\color{red} \partial B_b }{\partial x}+\frac{\color{Blue}\partial B_d}{\partial x})
\]

Smoothing out Time.

Across this entire derivation, the primary assumption has been the stroboscopic time, first define above. It is possible to achieve our goal of deriving the Euler-Lagrange equation by keeping time segmented in this fashion but when it comes to proof my philosophy is “I’d rather be wrong than leave you half-convinced”. So to convince the most stubborn mathematicians, let us smooth time back to being a continuous function.

This rather grand sentence is not quite as exciting as it first appears – all it involves is introducing a limit on Δt. We will simply consider the above equation under the limit of Δt tending to 0. Saying this is like saying “We will close the gaps between stroboscopic time intervals to nothing” – which is the very definition of a continuous function.

Before looking at out function though, we will consider some function f. At the start of every basic calculus course, the derivative of a simple polynomial is defined from the limit definition. Using this, it is possible to define a time derivative (df/dt) of the function f to be:

\[
\frac{d f}{dt}=\lim_{\Delta t \to 0} \frac{f(t+\Delta t)-f(t)}{\Delta t}
\]

In the context of our equation, we will make the comparison:

\[
f = \frac{\partial L}{\partial \dot x}
\]

In equation GEORGE we see that this expression appears in the first term. Because Xb, xc and xd are, by definiton, a small interval of time: Δt apart. To rewrite it in terms of f, t and Δt:

\[
\frac{1}{\Delta t}(f(t)-f(t+\Delta t)) = -\frac{1}{\Delta t}(f(t+\Delta t)-f(t))
\]

As time gets smoother and smoother and Δt shrinks to zero, it becomes obvious that this result arises:

\[
\frac{1}{\Delta t}(-\frac{\partial B_b}{\partial \dot{x}}+\frac{\partial B_d}{\partial \dot{x}}) \longrightarrow -\frac{d }{dt}\frac{\partial L}{\partial \dot{x}}
\]

The second term of B is trivial and we can simplify it without the need for maths. It is:

\[
\frac{1}{2}(\frac{ \partial B_b }{\partial x}+\frac{\partial B_d}{\partial x})
\]

In words, I would describe this through “Half the sum of δB/δx defined at two points: xc and xd.” When Δt tends to zero, this seperation between xc and xd vanishes to nothing and so we are just left with:

\[
\frac{ \partial L}{\partial x}
\]

Finishing with the Principle of Least Action.

We now have an expression for δB/δxb which is:

\[
\frac{\partial B}{\partial {x_{b}}}= -\frac{d }{dt}\frac{\partial L}{\partial \dot{x}} + \frac{ \partial L}{\partial x}
\]

The principle of least action tells us that δB/δxb is always equal to zero. So with a small amount of re-arranging we can derive:

\[
\frac{d }{dt}\frac{\partial L}{\partial \dot{x}} – \frac{ \partial L}{\partial x}=0
\]

Which is of course, the Euler-Lagrange equation in the form we know and love!

Related articles

Share This