This article is part of a set of three; the common factor is Calculus of Variations. In classical physics Calculus of Variations is applied in three areas: Optics, Statics, and Dynamics. Each article in the set is written as a standalone article, resulting in some degree of overlap.
The other two articles:
|Optics:||Fermat's stationary time|
The Energy-Position equation
This exposition is about Hamilton's stationary action. This exposition is created for the purpose of making Hamilton's stationary action entirely transparent.
Before starting, let me address the following: given that this article is about Hamilton's stationary action, why is the title: 'Energy-Position equation'? Well, the reason for that is the very reason I created this material.
The intention of this article is to let the interactive diagrams tell the story. You can choose to jump ahead to the interactive diagrams However, I strongly recommend you return to these paragraphs at some point; for overall understanding they are necessary.
The Work-Energy theorem and Hamilton's stationary action have the following in common: the physics taking place is described in terms of kinetic energy and potential energy. The Work-Energy theorem is derived from F=ma, which of course means that F=ma can be recovered from the Work-Energy theorem. As we know: Hamilton's stationary action also has the property that F=ma can be recovered from it. The purpose of this article is to demonstrate how it comes about that F=ma can be recovered both from the Work-Energy theorem and Hamilton's stationary action.
As an overarching name for both the Work-Energy theorem and Hamilton's stationary action I will use the expression 'energy mechanics'.
Requirement for well defined potential energy
In order to have a well defined expression for potential energy the force must have the property that the work done in moving from some point A to some point B is independent of the path taken between the two points. The validity of energy mechanics is limited to forces with that property.
(It may be that in terms of a deeper theory such as quantum physics all interactions actually have that potential-is-independent-of-the-path property, but we should not blindly assume that.)
As we know: the principle of conservation of energy is asserted without any restriction. That's why the concept is referred as a 'principle', it is a blanket statement.
The discussion in this article avoids the blanket statement. The discussion in this article is limited to the classes of cases where by way of experimental corroboration it is evident that the work done in moving from some point A to some point B is independent of the path taken between the two points.
Derivation of the Work-Energy theorem
The derivation starts with F=ma, and evaluating the integral from position coordinate s0 to position coordinate s:
In the steps (1.2) to (1.8) the right hand side of (1.1) is evaluated.
For the time being I will not write the factor m, it is a multiplicative factor that is just carried from step to step. In the final expression I will include the factor m again.
As we know, acceleration and position are related according to (1.2) and (1.3).
The integral for acceleration from a starting point s0 to a final point s
Intermediary step: change of the differential according to (1.2), with corresponding change of limits.
Change the order:
Change of the differential according to (1.3), with corresponding change of limits.
So we have:
The elements that give rise to the relation (1.8) are: (1.2) and (1.3), and the mathematics of differentiation/integration. That is: no physics is referred to, hence (1.8) is independent from any physics.
After multiplying with m we use the right hand side of (1.8) for the right hand side of (1.1), thus arriving at the Work-Energy theorem:
(About the quantity ½mv2 on the right hand side of (1.9): we have that earlier in the history of theory of motion a quantity of the form mv2 was recognized in another context: collisions. In elastic collision a quantity proportional to mv2 is conserved. This quantity-proportional-to-mv2 was referred to as 'the living force'. As we know: today a single concept is used, kinetic energy, with the value supplied by the Work-Energy theorem: ½mv2.)
The Work-Energy theorem has physics content and mathematics content.
Equation (1.8) states the mathematics content.
The physics content of the Work-Energy theorem is F = ma. That is: the physics content of the Work-Energy theorem does not extend beyond F = ma; in terms of physics content the Work-Energy theorem and F = ma are the same equation.
As we know: potential energy is defined as the negative of the integral of force over distance. Hence:
That is: a logical consequence of the Work-Energy theorem is that when an object is moving down a potential gradient the kinetic energy will increase by the amount that the potential energy decreases. (With everything reversed when moving in the opposite direction, of course.)
(1.11) combines three statements. I present these three statements as a unit to emphasize the tight interconnection. While the statements are different mathematically, the physics content of these three is the same.
From this point on all equations/statements in this article will be in terms of potential energy. The basis of that is (1.8) and (1.9)
Potential energy and kinetic energy
Potential energy and kinetic energy are both entities that do not have an intrinsic zero point. Whenever a measurement of energy is made it is a measurement of energy difference. The only way to define potential energy at all is to define the potential difference between some start point and some end point. Kinetic energy satisfies Galilean relativity, so it is definable only as a difference between some starting velocity and some end velocity.
In working with equations the value of the energy is not the relevant property. Instead the derivative of the energy is the relevant property. Note especially: the fact that energy doesn't have an intrinsic zero point makes no difference for the value of the derivative of the energy.
Derivative with respect to position
With (1.11) established we would like to use that as an energy mechanics tool.
The validity of (1.11) extends down to infinitisimal change:
In theory of motion we are accustomed to taking derivative with respect to time. However, taking the time derivative of (1.12) results in quite an unpractical equation.
The following step may at first sight look counterintuitive: take the derivative with respect to position.
(1.14) leads directly to an equation of motion. To some people that may be unexpected; to be in motion is to cover spatial distance over time, so what is a derivative with respect to position going to achieve?
The key is:
- the expression for potential energy is obtained by evaluating the integral of force with respect to the spatial coordinate
- the expression for kinetic energy is obtained by evaluating the integral of acceleration with respect to the spatial coordinate
The differentiation that is specified in (1.14) is simply the inverse of the process of constructing the Work-Energy theorem. That means: proceeding with the (1.14) differentiation recovers F = ma
(See the section verification.)
I will refer to (1.14) as the 'Energy-Position equation', as it takes the derivative of the energy with respect to position.
The Energy-Position equation is the most important equation of this article, hence my decision to use it as the article's title.
Calculus of variations
Calculus of variations is a form of calculus that doesn't take the derivative with respect to the x-coordinate, but instead the derivative with respect to the y-coordinate. For mechanics that means that variational calculus takes the derivative with respect to position instead of the derivative with respect to time.
The following explores the application of calculus of variations in classical mechanics
Calculus of variations, the unit of operation
I will refer to the interactive diagrams as 'graphlets' (contraction of 'graphical applet').
In graphlet 1 the unit of operation of calculus of variations is demonstrated. This is the variational counterpart of the unit of operation of differential calculus.
The unit of operation of differential calculus is a pair of adjacent points on a curve, and to take the derivative we take the limit of making the distance between the points infinitissimally small. The unit of operation of calculus of variations is a triplet of points. We treat the outer points of the triplet as fixed points, and then we examine the effect of a small vertical shift of the middle point.
In graphlet 1 the shape of the dashed line is a parabola. That is: the curve represents the trajectory of an object that is launched upward, and is then subject to uniform (downward) acceleration.
Use the mouse to move the slider that is on the far left of the diagram. As you are sweeping out variation you are looking for the sweet spot: the point where as the object is moving the rate of change of kinetic energy matches the rate of change of potential energy.
(About the case in this specific diagram: a uniform force gives rise to a linear potential, and because of that: as you move the vertical slider the value of ΔEp remains the same. With any other function for the potential energy the ΔEp will change upon variation of the middle point.)
The diagram starts with the unit of operation depicted large, for the purpose of exploration. As we know, for the purpose of calculus the validity of the logic must extend all the way to infinitisimally small scale. This is visualized when the horizontal slider is moved.
We can represent the trajectory as a whole as a concatenation of units of operation. This is without loss of generality. For instance, in the case of Hooke's law the resulting trajectory is the sine function, which when notated as a Taylor series has an infinite number of terms. The concatenation accomodates that. Graphlet 2 provides a visualisation of finding the sweet spot for an entire concatenation simultaneously.
The graphlets 4, 5 and 6 provide an implementation where in a concatenation of subsections each subsection can be changed individually.
Derivative with respect to position
The variation sweep consists of change of position, therefore the way to evaluate the response to variation is to take the derivative with respect to the position coordinate.
We have that the Work-Energy theorem is obtained by taking the integral with respect to position of F=ma. Eq. (1.14) is a differential equation that takes the derivative with respect to position.
So we are dealing with two derivatives with respect to position: derivative with respect to position of variation sweep, and derivative with respect to position of motion along the true trajectory.
At the sweet spot those two derivatives match. Hamilton's stationary action capitalizes on that correspondence.
Numerical analysis implementation
As we know: in cases where obtaining an analytic solution is unpractical there is the option of using numerical analysis. Numerical analysis implementation of differential calculus uses the unit of operation of differential calculus. Using the unit of operation is the only way numerical analysis can be implemented at all.
Likewise variational calculus lends itself to a numerical analysis implementation. This numerical analysis implementation uses the unit of operation; the unit of operation as depicted in Graphlet 1.
The numerical analysis implementation of variational calculus consists of iterating over a division into intervals. The simplest seed to start the iteration is a straight line.
The iteration evaluates instances of the unit of operation in sequence. A triplet is evaluated and the middle point is adjusted to stationary action with respect to its adjacent points.
t1, t2, t3
t2, t3, t4
t3, t4, t5
Each cycle of the iteration moves the trial trajectory a little closer to the true trajectory. Over the course of multiple iterations the trial trajectory converges onto the true trajectory.
Cycling from start to end is the simplest implementation. But the triplets can also be evaluated in random order. Whatever the order in which the triplets are evaluated, the numerical analysis will converge onto the true trajectory.
In each iteration cycle there is propagation of information. Information from individual triplets propagates from those triplets to adjacent triplets. The effect of the multiple iterations is that the position of every point along the trajectory influences the positions of all the other points on the trajectory.
As mentioned in the previous section: the graphlets 4, 5 and 6 provide an implementation where in a concatenation of subsections each subsection can be changed individually. That is, graphlets 4, 5 and 6 are in effect numerical analysis implementations.
Hamilton's action is defined as the integral with respect to time of the Lagrangian (Ek-Ep), and the geometric interpretation of integration is to evaluate an area.
The following graphlet takes the unit of operation as starting point, setting up area evaluation. Specifically: change of area in response to variation sweep. The reasoning is set up to be valid at any scale. Hence the reasoning is valid down to infinitissimally small intervals.
The two time intervals t1,2 and t2,3 are displayed in three of the four subpanels: upper-left, upper-right, and lower-left. The time intervals are set up to be of equal duration.
In the upper-right sub-panel: the height of each bar represents the value of the energy corresponding to that time interval. The number displayed in red is the summed area of the two red bars; the number displayed in green is the summed area of the two green bars.
Hypothetical versus actual
When sweeping out variation the change of energy is hypothetical change of energy, not actual change of energy. In the diagram: at each position of the movable point the diagram shows what the energies would be if the object would move along that particular trial trajectory.
Stating the two different kinds of change explicity:
- Rate of change of actual energy as an object is moving along the true trajectory.
- Rate of change of hypothetical energy (as a function of variation sweep)
In motion along the true trajectory one form of energy is transformed into the other; the energies are counter-changing; ΔEk = -ΔEp
Graphlet 3 illustrates that in sweeping out variation red and green are increasing and decreasing together.
In the hypothetical variation sweep the energies are co-changing, so in order to compare them we need to subtract one from the other. (By convention it is the potential energy that gets the minus sign.)
In the lower-right sub-panel: to express that the potential energy is subtracted from the kinetic energy the green area is displayed as area below the coordinate's zero line. This is the concept of signed area; counting area below the zero point of the coordinate system in the negative.
The lower-right sub-panel represents in blue the result of the subtraction.
The motion of the blue dot over the diagram represents the response of the value 'area(Ek-Ep)' to variation sweep.
At the point where the variation hits the sweet spot the value of 'area(Ek-Ep)' is stationary. (See the section the meaning of 'stationary') That means: at the sweet spot the rate of change of summed red area matches the rate of change of summed green area. This is of course not a coincidence.
The two time intervals t1,2 and t2,3 are set to be equal in duration. Hence:
The rate of change of green area:
At the sweet spot the rate at which the summed green area changes is equal to the rate of change of potential energy as a function of sweeping out variation.
The rate of change of red area:
At the sweet spot the difference in rate of change of the left and right red bar is such that the rate of change of summed red area is equal to the rate of change of kinetic energy as a function of sweeping out variation.
There is a point in the variation sweep where the rate of change of kinetic energy matches the rate of change of potential energy; the sweet spot. If the time intervals are set to be of equal duration then it follows mathematically: at the sweet spot the rate of change of summed red area matches the rate of change of summed green area.
In graphlet 3 the width of each of the two bars is half the width of the time interval, which means that when concatenating units of operation the bars end up exactly adjacent. Hence we can proceed as follows: we divide the total duration in equal time intervals, and then replicate this bar configuration end to end, covering the entire duration.
With the entire duration divided in equal sub-intervals:
- The stationary property propagates from the sub-intervals to the whole duration; when the summed area is stationary in each and every sub-interval then the summed area along the entire duration will be stationary.
- The time intervals can be made arbitrarily short.
Summing bars of signed area, in the limit of subdividing into infinitely many bars: that is evaluating the integral. That integral is Hamilton's action: the integral with respect to time of the Lagrangian (Ek-Ep)
Hence: when the circumstances are such that the Work-Energy theorem holds good it follows that Hamilton's stationary action will hold good.
The standard presentation of Hamilton's action is to state it in integral form:
The graphlet set 1-2-3 shows that the response of the value of this integral to variation arises from response down at the infinitisimals. The response propagates from the infinitisimal scale to the value of the integral.
Therefore: stating the application of variational calculus in integral form is not a necessity.
The Euler-Lagrange equation can be derived using differential operations only. This is demonstrated in the section 'Derivation'
Finding the trajectories
The following three graphlets are three instances of the same graphlet, for three successive cases.
As you manipulate the sliders: the process to home in on the true trajectory is to manipulate the trial worldline such that over the entire trajectory (1.11) is satisfied. The graphlets show that when (1.11) is satisfied the derivative of Hamilton's action is zero.
Graphlet 4 is for the case of a uniform force, causing an acceleration of 2 m/s2.
As we know: with a uniform force the curve that represents the height as a function of time is a parabola.
In the 'energy' sub-panel the green curve represents the minus potential energy. In effect the potential energy curve has been flipped upside down. That way you can see directly that when the trial trajectory coincides with the true trajectory the red and green curve are parallel to each other everywhere.
(Any form of calculating the true trajectory uses the derivative of the potential energy. That is, in calculation the value of the potential energy itself is not used. Because of that the choice of zero point of potential energy is arbitrary.)
In the lower right subpanel:
The blue dot represents Hamilton's action.
The label of the horizontal axis is pv, which stands for 'variational parameter'. The positioning of the dots corresponds to the value of the main slider.
In the case of linear potential: when the trial trajectory coincides with the true trajectory the value of Hamilton's action is minimal/minimized. In the case implemented in this graphlet: any change of the trial trajectory results in raising the value of Hamilton's action.
Graphlet 5 is for the case where the force increases in linear proportion to the displacement. This case is commonly referred to as Hooke's law.
As we know: With Hooke's law the resulting motion is harmonic oscillation and the curve that represents the displacement as a function of time is the sine function.
With Hooke's law the potential energy increases with the square of the displacement. That is: with Hooke's law we have that the rate of change of potential energy is on par with that of the kinetic energy: with Hooke's law the expressions for the energies are both quadratic expressions.
As we know: with Hooke's law the amplitude and period of the resulting oscillation are independent from each other. Hamilton's stationary action corroborates that: when the trial trajectory is the harmonic oscillation function then if you change the amplitude the value of the action remains the same.
(In the diagram the actual curve is the cosine function; the point is that it is the harmonic oscillation function.)
Graphlet 6 is for the case where the force increases proportional to the square of the displacement, hence the potential energy increases with the cube.
In graphlet 4 the potential energy as a function of position is linear. Whenever the potential energy as a function of position is of lower order than the expression for the kinetic energy the action reaches a minimum when the derivative of the action is zero. In graphlet 5 the potential energy function and the kinetic energy function are both quadratic expressions, so the action is neither a minimum nor a maximum. Here in graphlet 6 the potential energy as a function of position is a higher order expression than the one for the kinetic energy (cubic versus quadratic), and consequently when the derivative of the action is zero the action reaches a maximum.
I recommend enlarging the graphlet to the full width of the browser window. Visibility of the navigation column of this page can be toggled. When the navigation column has been hidden: use the button 'Larger' and zoom in on the page as a whole to make the graphlet fill the entire width of the browser window.
How to operate the demonstration:
The graphlet set 4-5-6 is designed to be discoverable, but for the sake of completeness I provide a description.
The main slider, located at the bottom of the graphlet, executes a global variation sweep. The value displayed in the "knob" of the main slider is a value to implement the variation, from here on I will refer to it as the 'variational parameter pv' In the 'integral' panel the variational parameter pv is along the horizontal axis.
Names for the 4 sub-panels:
- upper left: Control panel
- lower left: Height panel
- upper right: Energies panel
- lower right: Integrals panel
Note: The 3 sub-panels with a coordinate system are named after their vertical axis name: Height, Energy, Integral.
In the starting configuration the trajectory points (height panel) have been placed such that they coincide (to a very good approximation) with the true trajectory of the object.
When the object is moving along the true trajectory the rate of change of kinetic energy matches the rate of change of potential energy (work-energy theorem). This match of rate of change has been emphasized by turning the graph of the potential energy (green) upside down. When the object is moving along the true trajectory the red and green curve have the same slope along the entire trajectory.
The energies panel is where it happens. The energies panel represents how the equation that you are using solves for the true trajectory.
Hamilton's Action is represented by the blue dot in the Integrals panel. Use the main slider to sweep out variation. The blue dot follows a curve; it is a curve in variation space. The slope of that curve represents the derivative of Hamilton's Action with respect to variation.
At the point where over the entire trajectory the derivative of the kinetic energy is equal to the derivative of the minus potential energy the derivative of the blue dot is zero.
In the control panel the two sliders on the far left are adjusters for the trajectory. The upper adjuster morphs the trajectory towards a curve that is more blunt than the true trajectory; the lower adjuster morphs the trajectory towards a triangle shape.
These adjusters allow morphing of the trial trajectory while maintaining that during the entire ascent the velocity never reverses from decreasing to increasing again, which would be unphysical.
The row of ten sliders is for adjustment of individual nodes. The three radio buttons toggle between three sets of node adjusting sliders.
The '× 1' button: for a ratio of 1-to-1 of moving the slider and movement of the corresponding node of the trajectory.
The '× 0.1' button: ratio of 10 to 1
The '× 0.01' button: ratio of 100 to 1, for fine adjustment.
In the energies panel: the grey point is draggable, and it drags the entire curve of the kinetic energy (red) with it. By shifting the kinetic energy curve over to the potential energy curve the user can verify that the red and green curve are parallel to each other along the entire trajectory. (The evaluation of the integral uses the unshifted position of the kinetic energy curve.)
In the integrals panel:
· Red/Green point: value of the integral of the red/green curve of the energies panel
· Blue point: the sum of the values of the red point and the green point
As you use the main slider to execute global variation sweep:
In graphlet 4 the action reaches a minimum when the trial trajectory coincides with the true trajectory. The change of potential energy is linear, and the change of kinetic energy is quadratic, hence the action reaches a minimum.
In graphlet 6 the action reaches a maximum when the trial trajectory coincides with the true trajectory. This is because in graphlet 6 change of potential energy goes with the 3rd power (cubic), and the change of kinetic energy is quadratic, hence the action reaches a maximum.
The following discussion is about the configuration depicted in graphlet 1.
(I recommend opening two instances of the webbrowser and resizing them to show two instances of this page side-by-side, so you can scroll graphlets 1 and 3 into view.)
Quoting the statement in the section 'Differential':
stating the application of variational calculus in integral form is not a necessity. The logic operates at the infinitisimal level, and propagates from there to the curve as a whole; the Euler-Lagrange equation can be derived using differential operations only.
In the following the notation conventions for mechanics are used:
|Sk||kinetic energy component of Hamilton's action|
|Sp||potential energy component of Hamilton's action|
The idea is this: in the general case you have an expression that has a term that is a function of position and a term that is a function of the first derivative of position.
In the case of mechanics the Work-Energy theorem provides such an expression; the Work-Energy theorem has a term that is a function of position; the potential energy, and a term that is a function of velocity; the kinetic energy.
In the following the small vertical variation will be represented with a factor δs. The potential energy and the kinetic energy each respond to that variation.
As displayed in graphlets 4,5,6: the trajectory gives rise to a function for the potential energy, and a function for the kinetic energy.
To compare response of the energies to variation sweep we must enter the potential energy as minus potential energy. (This was discussed in the section 'hypothetical'
Potential energy component of the action
The potential energy is a function of the position coordinate s. The amount of change of potential energy upon addition of δs is obtained by taking the derivative of the potential energy with respect to the position coordinate, and multiply that with δs:
Kinetic energy component of the action
The kinetic energy is a function of the velocity. To obtain the amount of change of kinetic energy upon addition of δs: take the derivative of the kinetic energy with respect to the velocity, and multiply that with the amount of change of velocity. That is expressed with (2.5). The expressions (2.2), (2.3) and (2.4) lead up to that.
Upon addition of δs the velocity changes on two adjacent time intervals: t1,2 and t2,3: one side increases, the other side decreases.
Before the change:
After adding δs:
The changes of the velocities:
The change of the kinetic energy component of Hamilton's action:
Applying (2.4) and regrouping:
The total time is divided in equal length sub-intervals, so the move from interval (1,2) to the adjacent (2,3) can also be expressed as a derivative with respect to time, multiplied with the time interval Δt:
Applying (2.7) to (2.6) results in the following expression for how much the kinetic energy component of Hamilton's action will change upon addition of δs:
Combining the two responses:
The purpose of introducing the factor δs was to obtain an expression for rate of change of energy as a function of variation of the position coordinate.
The variation δs, having served its purpose, can now be eliminated. The stationary-in-response-to-variation condition is satisfied when the following is satisfied:
In physics textbooks it is customary to derive the general purpose form of the Euler-Lagrange equation, which means specifying partial differentiation. However, in the case of classical mechanics specifying partial differentiation doesn't actually make a difference because the potential energy is a function of position only, and the kinetic energy is a function of velocity only. Therefore (2.10) is sufficient.
(2.11) constructs the customary form, using (2.10) as starting point.
The Work-Energy theorem is constructed by stating the integral with respect to position of F=ma
Hence taking the derivative with respect to position will recover F=ma.
Simplify to initial position coordinate zero and initial velocity zero:
the derivative with respect to position:
In the Euler-Lagrange equation, (2.10) and (2.11), it looks as if the way the kinetic energy term is processed is different from how the kinetic energy term is processed in the Energy-Position equation, but that is not actually the case.
In classical mechanics the Euler-Lagrange equation takes the derivative of the energy with respect to the position coordinate. Proof: (3.3) proceeds with the differentiation of kinetic energy specified by the Euler-Lagrange equation:
(3.3) evaluates to ma, showing that in classical mechanics the Energy-Position equation (1.11), and the Euler-Lagrange equation (2.10)/(2.11) are the same equation.
The meaning of 'stationary'
Red and green are both ascending functions. We want to identify the coordinate where the rate of change of the red value matches the rate of change of the green value. The shortest way to get there is by setting up an equation with the derivative of the red curve on one side and the derivative of the green curve on the other side.
In the case of Hamilton's stationary action the same comparison is performed, but in a form that takes more steps. We see the following: a third function is defined, which is called the Lagrangian L: L=(Ek-Ep), and the point to be identified is called the point of 'stationary action'. 'Stationary action' is another way of saying: identify the point where the derivative of the Lagrangian is zero.
Hamilton's stationary action works by imposing the constraint that was established with (1.11): the rate of change of kinetic energy must match the rate of change of potential energy.
When Johann Bernoulli had presented the Brachistochrone problem to the mathematicians of the time Jacob Bernoulli was among the few who was able to find the solution independently. 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 curve.
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.
Jacob's lemma generalizes to all cases where the curve that you want to find is an extremum; either a maximum or a minimum. If the evaluation is an extremum for the entire curve, then it is also an extremum for any sub-section of the curve, down to infinitisimally short subsections.
Jacob's lemma is the basis of deriving the Euler-Lagrange equation.
1 I learned this derivation from the article by Preetum Nakkiran titled 'Geometric derivation of the Euler-Lagrange equation'.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.