Least action visualized
In this article I explore the 'Action' of the 'Principle of least Action'. I discuss how the Principle of Least Action relates to the laws of motion.
The usual notation for the 'Action' is the letter 'S'. For the Energy I will use the letter 'E', with subscript; 'k' for 'kinetic' and 'p' for 'potential'
We have that when the Action is evaluated for a range of trajectories the value of S is least for the case of the true trajectory. How is it that the quantity (Ek - Ep) has that property?
I will go through this discussion for a specific case and subsequently I will discuss: does this specific case generalize to all cases?
As the title indicates: the emphasis is on visualization.
Instead of subtracting Ep from Ek early on I will evaluate the time integrals of Ek and Ep separately. Combining the two will be postponed until the very last step.
Differentiation - Integration
There is a specific property of integration that is key to the nature of the principle of least action
As we know, we use differentation of a curve to find the slope of that curve, and we use integration of a curve to find the area enclosed between that curve and some horizontal line.
Here's the thing: when the slope of a curve changes the value of that curve's integral changes in proportion. Take the simplest case: f(x) = ax Change of the magnitude of the slope changes the value of the integral. This property will be put to use.
For emphasis I repeat in a box section:
Force acting over distance; the work-energy theorem
We obtain the work-energy theorem from the force-acceleration principle:
Here I demonstrate the case of a uniform force, hence uniform acceleration; the result generalizes to a force that is not uniform but dependent on position.
The following expressions follow from definitions. Velocity is defined as the time derivative of position; acceleration is defined as the time derivative of velocity. Given those definitions we have the following expressions that every mechanics texbook starts with:
Change of velocity as a function of time:
Change of position as a function of time:
(1.5) and (1.6) are not independent; differentiation of (1.6) gives (1.5). Conversely, (1.6) can be thought of as the result of integration of (1.5)
We obtain an expression for t from (1.5), and substitute that into (1.6).
Multiplying out and moving position and acceleration to the left:
(The above expression is also known as Torricelli's formula)
Torricelli's formula is turned into a physics statement as follows: We multiply with 'm' (mass), and combine with F = ma. The result is an expression for force acting over a distance (s - s0)
Force acting over a distance (s - s0) is called doing work.
The demonstration in this article is for the classes of cases where the force is a conservative force. When the force is conservative there is a defined potential energy. From this point onward I will be using the expression 'potential energy'.
The validity of the Work-Energy extends to arbitrarily small increments of motion. During the entire time the rate of change of kinetic energy must match the rate of change of potential energy. In the form of a differential equation:
In the rest of this article I will refer to this as the energy equation.
An object shoots upward, released to free motion. The object climbs, decelerated by gravity, reaches its highest point, and falls back again.
To work with round numbers I have selected the following conditions:
- Total duration: 2 seconds (from t=-1 to t=1)
- Gravitational acceleration: 2 m/s2
- Mass of the object: 1 unit of mass.
Those conditions imply that along the true trajectory the starting velocity is 2 m/s, and the object climbs to a height of 1 meter.
Diagram 1 gives the height (vertical axis) of the object as a function of time (horizontal axis). The graph representing the motion is of course a parabola. Expression (2.1) gives that parabola.
Class of trial trajectories
Graphlet 2 shows how the trajectory is varied, generating a class of trial trajectories. (In this graphlet, and in the subsequent graphlets, you can slide to other values by dragging the circle with the mouse.) The startpoint and endpoint are fixed, in between the trajectory is varied. The set of all possible variations of the trajectory is much larger than this particular class of course, but for the purpose of this demonstration this simplest case is sufficient.
More generally, the constraint is that the variation must preserve the fixed startpoint and endpoint. Superficially that may not look particularly constraining, but in fact it is. This significant constraint is a key element.
With the trajectory being varied in the way presented in graphlet 2 I need just a factor pv which stands for 'variational parameter'. Now each trajectory is a function of two variables: 't' and 'pv'
In the graphlet, use the slider to see the range of trial trajectories.
As you can see, when the variational parameter pv is zero expression (2.2) simplifies to expression (2.1).
To prepare the ground for comparing kinetic and potential energy graphlet 3 shows a trivial case: how the evaluation comes out if there is no force (and therefore no potential energy). Then in the graph the true trajectory is a straight line. The diagram on the left shows a range of trial trajectories, the diagram on the right represents the kinetic energy at each point in time.
As we know: the integral of kinetic energy over time is equal to the size of the shaded area.
Kinetic energy and potential energy
Repeating expression (2.2) for the trajectory as a function of time t and the variational parameter pv.
The derivative of function (2.2) with respect to time gives the velocity.
Entering the velocity (2.3) in the formula 1/2mv2 gives expression (2.4) for the kinetic energy. Expression (2.5) is obtained by multiplying the height (2.2) with the gravitational acceleration (which has the value 2 in this example.)
The Energy equation
- Red curve: kinetic energy Ek
- Green curve: minus potential energy Ep
- Slider: variational parameter pv
In the graphlet the criterium that identifies the the true trajectory is the energy equation:
The demand is that the energy equation must be satisfied continuously:
The graphlet uses the minus potential energy because that is what is being compared by the energy equation.
The height at which the potential energy has been placed is arbitrary; as we know potential energy does not have an inherent zero point. Since the comparison uses the derivatives of the respective energies the lack of an inherent zero point makes no difference.
Response to variation
As you sweep out the variation there is only a single value of the variational parameter pv where the slopes of the two curves match. That's because the magnitude of the kinetic energy is a quadratic function of pv and the magnitude of the potential energy is a linear function of pv.
This difference is independent of the way you are sweeping out the variation. Whatever way you implement the variation: as you sweep it out the kinetic energy is more sensitive to it than the potential energy.
This concludes the discussion of the physics of the principle of least action.
From here on I will refer to the 'red curve' and the 'green curve'. Partly because that's just shorter, but mainly to emphasize that this part of the demonstration is about mathematics only.
As announced at the start, combining the components of the action is postponed until the very last step. I define the action components Sk (kinetic energy component) and Sp (potential energy component).
The following integrals are integrals over time: from t=-1 to t=1.
The kinetic energy (2.4) evaluates to (3.3)
In the case of the potential energy there is the fact that the evaluation compares the kinetic energy with the minus potential energy. To accommodate that I have added minus signs throughout. (2.5) evaluates to (3.4)
For future reference: the total action:
However, the minus sign can be moved inside the integration, and then the total action can be thought of as the sum of two integrals: the integral of the kinetic energy and the integral of the minus potential energy:
Graphlet 5 pulls everything together:
The top half is the same as graphlet 4.
The curves in the lower-left quadrant are the same curves as in the upper-right quadrant, but a different property is emphasized: as you vary the trial trajectory the respective slopes of the energy curves change at a different rate.
In this case the response of the curve for the potential energy to trial trajectory variation is linear, since in this case the potential energy itself is a linear function of the height.
The kinetic energy is proportional to the square of the velocity, hence the response of the curve for the kinetic energy to trial trajectory variation is quadratic.
To capitalize on the property emphasized in the lower-left quadrant I turn to the property of integration that I mentioned at the start: when you change the slope of a curve the value of that curve's integral changes in proportion.
The checkbox: blue graph: the sum of the two integrals.
The subdiagram in the lower-right quadrant stands out from the others. The graphs in the lower-right quadrant are functions of the variational parameter pv. Hence the slopes of those graphs correspond to the derivative with respect to pv. When the variation is at the true trajectory the combined derivative evaluates to zero:
Additional mathematical remarks
In graphlet 5: what we need is to assess what the slopes of the energy curves are doing. We find that we can compare those two slopes by comparing the integrals of the two curves. That is, here integration delivers what we otherwise use differentation for.
Once more returning to this statement: when you change the slope of a curve the value of that curve's integral changes in proportion. This property is enforced by having both the start point and end point fixed.
Does it generalize?
First, let me emphasize: the purpose of this article is to explain why the principle of least action holds good. This demonstration is far from a formal mathematical proof. Still, this demonstration is relevant only if it can be generalized. So: can it?
Generalization to other cases consists of generalizing to other functions for the potential energy, since in all cases the kinetic energy is evaluated in the same way.
The demonstration in this article uses the simplest case of potential energy, the case of a constant force.
Let's look at two other functions for the potential energy that are common:
- The potential of an inverse square force
- The potential of Hooke's law
Inverse square force
The potential of an inverse square force is proportional to 1/r.
As demonstrated, with a constant force the response of the potential energy to the variation is slower than the response of the kinetic energy (linear versus quadratic). With the potential energy proportional to 1/r the response of the potential energy to variation is even slower. It follows that the same matching will work, and that the point where the rates-of-change of the red integral and green integral match will still be a minimum of the blue line.
With Hooke's law the potential energy is proportional to the square of the displacement, and the solution to the equation of motion is harmonic oscillation.
The position as a function of time:
Where a is the amplitude of the harmonic oscillation
As we know, this function is a solution to the equation of motion for every value of the amplitude a
After half an oscillation period you are at t = π. Take t = 0 as the starting point and t = π as end point. The equation of motion tells us that there is a class of trajectories with different amplitude, all going through the starting point at t = 0 and the end point at t = π.
The potential energy is the integral over distance of the force. Taking the potential energy at the origin as zero we have the following expression for the potential energy:
So for the case of Hooke's law: when you sweep out the variation the potential energy and kinetic energy are both quadratic functions of the variational parameter pv.
The velocity as a function of time:
The Action for a half period of the oscillation:
This provides an illustration of the statement that F = ma and the principle of least action are mathematically equivalent. For every value of the amplitude a the action evaluates to zero.
Higher order potentials
For the principle of least action the case of harmonic oscillation is special: as you sweep out the variation both the potential energy and the kinetic energy change quadraticly. In that sense the case of harmonic oscillation can be regarded as a critical case.
So, let's now move to higher power. Let's make the force increase with the square of the displacement. Then the increase of potential energy is proportional to the cube of the displacement. That is, while the kinetic energy still changes quadratically with the variation, the potential energy now changes faster; proportional to the cube.
That means that with the force increasing with the square of the displacement the Action will have a maximum instead of a minimum.
Does it matter that there are cases where the Action is a maximum? No, it doesn't, because the Euler-Lagrange equation is agnostic as to whether the Action is a minimum or a maximum.
The Euler-Lagrange equation
As we know, the Euler-Lagrange equation is a general variational calculus equation. It facilitates finding an extremum of a functional.
In the case of dynamics the equation of motion you are looking for describes position as a function of time, so here I give the functional S in that form.
The Euler-Lagrange equation identifies a stationary point of the functional S
In the following I will explain how it is possible that the solution to an equation stated in integral form (integral of the Lagrangian) can be found with an equation that is a differential equation
A key point is this: the fact that you are looking for an extremum (minimum or maximum) is actually a very constraining condition.
I will start with a specific case, and then I will generalize.
Consider expressions (3.3) and (3.4), both are integration from t=-1 to t=1, in notation ∫-11f(t)dt. What if you would cut that up, and compute two adjoining integrals, ∫-10, and ∫01?
For emphasis I'm putting the following property in a box section.
To generalize this: the integration is over a certain timeframe, we can call that: from t1 to t2. You can subdivide that timeframe in subsections. The overall integration will be minimal if and only if the integrals of each of the subsections are minimal. There is no limit to how far you can subdivide, hence this extends to infinitisimally short subsections. This means it must be possible to restate the problem as a differential equation.
(The first to recognize this lemma was Jacob Bernoulli, publishing in 1697. See the appendix 'Jacob's Lemma'. It may well be that this lemma was independently rediscovered multiple times.)
A differential equation doesn't look at the entire path. A diffential equation takes the evaluation one (infinitisimal) step at a time. That is, a differential equation uses local information only to inform the next step.
Preetum Nakkiran has devised a derivation that uses local information only: geometric derivation of the Euler-Lagrange equation I recommend that you study his derivation.
In addition Appendix II gives a derivation that is modeled after the derivation in the Feynman Lectures.
In the history of physics the introduction of the concept of generalized coordinates was a great innovation. The possibilities of generalized coordinates deliver great expressive power.
This expressive power is used in energy mechanics.
I now return to the central equation of this article, the energy equation: (1.9) and (2.6). During the entire time the rate of change of the kinetic energy is equal to the rate of change of the minus potential energy.
However, the form of (6.1) is not practical; potential energy is by nature a function of position, but (6.1) calls for the potential energy's time derivative.
We do need to take a derivative, but we're not confined to taking the time derivative. The obvious choice: we convert the equation to taking the derivative with respect to position.
To convert between (6.1) and (6.2): multiply/divide both sides by ds/dt
The derivative of the kinetic energy evaluates to a promisingly simple expression:
Here I have used v for 'velocity'. When using generalized coordinates this generalizes to the first derivative of the position in terms of the generalized coordinates.
Comparison with Euler-Lagrange equation
Before I go further let me first go over the verification that using Lagrangian-in-EL-equation is equivalent to using the Energy equation (6.2)
The Euler-Lagrange equation is a very general equation, more general than is needed for the purpose of classical mechanics. The full EL-equation with the Lagrangian:
For the purpose of this comparison the Lagrangian-in-EL-equation simplifies to the following form:
The term with the potential energy is already identical to the one in the energy equation (6.2).
Evaluating the term with kinetic energy:
(6.3) and (6.6) evaluate to the same expression. This completes the verification that the Lagrangian-in-EulerLagrange-equation (6.5) is identical to the energy equation (6.2)
The Atwood machine is the simplest example of using generalized coordinates.
Of course the purpose of this example isn't to demonstrate the Atwood machine, it's to demonstrate that using generalized coordinates doesn't depend on anything else. Using generalized coordinates isn't tied to any particular formalism. This example demonstrates using equation (6.2)
The two weights move in opposite directions, but since the velocity is squared that is inconsequential. Using the letter z for the amount of displacement:
The kinetic energy:
The potential energy:
Substituting in the energy equation (6.2) and taking the derivatives:
The efficiency of the energy approach
When the motion has more than one degree of freedom the force-acceleration equation has to be written in vectorial form, and then you have vectorial form both for the force and the acceleration:
That's a redundancy and in computations that redundancy comes with a workload.
In energy mechanics the velocity is squared and thus the directional information of the velocity term is lost. That's an advantage, as all of the directional information is still there, expressed in the gradient of the potential. Now a single term is carrying directional information instead of both; by removing redundancy a more powerful instrument has been created.
The key points
- In graphlet 4 the Energy equation is used to identify the true trajectory among the range of trial trajectories.
- In graphlets 5 it is demonstrated how using the Energy equation as criterium relates to evaluating the action.
- The mathematical property that identifies the true trajectory is independent of the way the variation is implemented. As you sweep out the variation: the way the kinetic energy is sensitive to it is different from the way the potential energy is sensitive to it.
- Making start point and end point fixed sets up the following property: changing the the slope of the energy curve changes the value of the integral in proportion.
- The demonstration is for a specific case: uniform force. The reasoning generalizes to all cases.
- The foundation of the Euler-Lagrange equation is this: the value of the overall integral is minimal if and only if the value is minimal along every subinterval. This extends to infinitisimally short subintervals. This is why the Euler-Lagrange equation is a differential equation.
- The combination of using generalized coordinates and the energy approach is more efficient than the force-acceleration approach.
Appendix I: Jacob's Lemma
There is a lemma in variational calculus, first stated by Jacob Bernoulli. (Therefore I propose to name it 'Jacob's Lemma'.)
When Johann Bernoulli had presented the Brachistochrone problem to the mathematicians of the time Jacob Bernoulli was among the few who solved it. The treatment by Jacob Bernoulli is in the Acta Eruditorum, May 1697, pp. 211-217
Jacob opens his treatment with an observation concerning the fact that the curve that is sought is a minimum.
Lemma. Let ACEDB be the desired curve along which a heavy point falls from A to B in the shortest time, and let C and D be two points on it as close together as we like. Then the segment of arc CED is among all segments of arc with C and D as end points the segment that a heavy point falling from A traverses in the shortest time. Indeed, if another segment of arc CFD were traversed in a shorter time, then the point would move along AcFDB in a shorter time than along ACEDB, which is contrary to our supposition.
Back to the Euler-Lagrange equation
Appendix II: Derivation of the EL-equation
In the following the variable y is used for the spatial coordinate (in the diagrams the vertical axis).
To arrive at the Euler-Lagrange equation a series of manipulations is performed with the following objective:
- Removal of the integration
- Removal of the variation
It is essential to be aware why this procedure is necessary: if the variation and the integration are not removed progress is not possible.
Removing the variation is possible when the solution to the variational problem is an extremum of the functional. As demonstrated in graphlet 5, the extremum is the point where there is a match in rate of change.
The following derivation is modeled after the one in the Feynman lectures. Rather than deriving for the general case Feynman manipulates the explicit expression for the Lagrangian.
(In the general case the functional may include one or more terms with a product of y(t) and and dy/dt, therefore in the general case a derivation must allow for that by specifying partial derivatives. (II.1) states the Lagrangian explicitly; the abstraction level has been stepped down. This is why in the course of the subsequent derivation there is no need for partials.)
The kinetic energy is purely a function of dy/dt, and the potential energy V(y) is purely a function of the spatial coordinate.
The variation is expressed with the symbol η. The underline indicates that the value for y is a tentative value.
Multiplying out the quadratic expression:
In order to make progress: in the following the variation is restricted to a zone that is infinitisimally close to the true trajectory. That is, the full variational assertion is that you can vary by an arbitrary amount, from here on the variation is restricted to an infinitisimally narrow zone.
Here and everywhere else in the derivation: because the variation is restricted to an infinitisimally narrow zone every term with η that is quadratic or higher can be dropped.
For the potential energy a Taylor series expansion is applied with the understanding that all terms quadratic or higher can be dropped:
Combined, with quadratic and higher dropped:
Narrowing down to just the variation:
This expression still has both the variation and the derivative of the variation, and that blocks the removal of the variation. Integration by parts will allow a rearrangement that clears the obstacle.
the purpose of the integration by parts is to obtain an expression that no longer contains the derivative of the variation.
The product rule of differentiation:
After rearranging the left hand side has the derivative of the variation and the right hand side has only the variation.
Substituting in the expression for the variation of the action:
The variation is constrained to have the following properties: η(t1) = 0 and η(t2) = 0, hence the first term on the right hand side is zero.
Collecting the terms and rearranging:
Now the equation has arrived at a form where obtaining the two goals listed at the beginning can be executed: removal of the integration and removal of the variation. The two are achieved in one stroke: the expression inside the square brackets must be zero during the entire time.
The constraint is that δS is zero. The function η(t) is not zero, therefore the part inside the square brackets is constrained to be zero the entire time.
The second term of is the derivative of the potential energy with respect to position: the force. So we see that the Euler-Lagrange equation reproduces the force-acceleration principle:
We are now in a position to understand why the Euler-Lagrange equation reproduces F=ma
Hamilton's stationary action starts with the energy equation (1.9)
The Euler-Lagrange equation converts the variational form back to a differential equation. Along the way there is one change in the form: the Euler-Lagrange equation is in this form:
The equivalence of the lagrangian-in-EL-equation and (II.17) is demonstrated in the section Energy mechanics.
Appendix III: More standard derivation of the EL-equation
Appendix II gives a derivation modeled after the one in the Feynman Lectures. Feynman proceeds differently from other derivations. The usual way to proceed with the derivation is to derive for a general functional F, and not separate into into kinetic energy and potential energy, leaving that to the stage of applying the EL-equation.
The following derivation is extremely condensed. I give it only as a means of comparison with the derivation in appendix II. This derivation is modeled after the derivation by Richard Fitzpatrick.
The variation of the action:
Integration by parts, combining, rearranging:
δy is zero at t=t1 and t=t2. Hence:
δy is not zero (only at t=t1 and t=t2), so in order to satisfy the constraint that the δs is zero the expression inside the square brackets is constrained to be equal to zero.
Appendix IV: derivation of the Work-Energy theorem
The derivation in the main article uses Torricelli's formula. Torricelli's formulat is actually the product of integration, but the integration is hidden. However, in a proper exposition key points are explicit. The following derivation puts the focus on the integration. The integration is key to what the Work-Energy theorem is.
The steps in the following derivation are all towards the end goal of obtaining an expression in terms of the velocity v.
In the course of the derivation the following two relations will be used:
The integral for acceleration from a starting point s0 to a final point s
Use (IV.1) to change the differential from ds to dt. Since the differential is changed the limits change accordingly
Rearrange the order, and write the acceleration a as dv/dt:
Use (IV.2) for a second change of differential, the limits change accordingly.
Putting everything together:
The final step is to obtain a dynamics statement by combining (IV.7) and F = ma
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.