# 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.

Chances are you are wondering why this article is titled 'Energy-Position equation'. Over the course of this article that will become clear.

## Interactive diagrams

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.

## Energy mechanics

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 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 *s _{0}* to a final point

*s*

Intermediary step: change of the differential according to (1.1), with corresponding change of limits.

Change the order:

Change of the differential according to (1.2), with corresponding change of limits.

So we have:

Up to this point no physics has been stated. (1.7) follows from the *definitions* of velocity and acceleration, combined with the mathematical properties of differentiation/integration.

Multiplying both sides with *m* and combining with *F = ma* arrives at a physics statement: the Work-Energy theorem:

As we know: potential energy is defined as the negative of the integral of force over distance. Hence:

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)

The order of the steps (1.1) to (1.8) emphasizes distinction between mathematics content and physics content. (1.7) represents the mathematics content of the Work-Energy theorem. The physics content is *F=ma*.

(1.10) 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.

### 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.9) established we would like to use that as an energy mechanics tool.

The validity of (1.9) extends down to infinitisimal change:

However, taking the time derivative is not practical.

Taking the derivative with respect to *position* makes everything fall into place: taking the derivative with respect to position of the Work-Energy theorem recovers *F=ma*:

I will refer to (1.13) as the 'Energy-Position equation', as it takes the derivative of the energy with respect to position.

Motion in general has the following property: we can control how fast an object is moving through *space*, but we have no control over motion through *time*. (Sure, in terms of relativistic physics that is no longer quite true, but in order to elicit time effects you have to go *very, very, very* fast.)

That is why the equations of motion of Newtonian mechanics are in terms of derivatives *with respect to* **time**: velocity and acceleration.

(1.13) is stated as a derivative with respect to *position*, and I suppose that at first sight that might look peculiar.

#### Variational calculus

Variational calculus 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 variational calculus in classical mechanics

## Infinitisimal approach

I will refer to the interactive diagrams as 'graphlets' (contraction of 'graphical applet').

In graphlet 1 the unit of operation of variational calculus 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 variational calculus 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 intermittent 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. Energy goes from one form to another; when potential energy decreases kinetic energy increases.

(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 ΔE_{p} remains the same. With any other function for the potential energy the ΔE_{p} 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 logic must be valid at any scale, so that it is valid down to infinitisimally small scale. This is visualized when the horizontal slider is moved.

### Concatenation

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*.

### 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.

t_{1}, t_{2}, t_{3}

t_{2}, t_{3}, t_{4}

t_{3}, t_{4}, t_{5}

(...)

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.

### Evaluating area

Hamilton's action is defined as the integral with respect to time of the Lagrangian (E_{k}-E_{p}), 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 t_{1,2} and t_{2,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.

Reminder: the change of energy that is displayed in this graphlet is *hypothetical* change of energy. The variation sweep is hypothetical: 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; ΔE_{k} = -ΔE_{p}

Graphlet 3 illustrates that in sweeping out variation the (hypothetical) energies are *co-changing*; red and green increase together, and decrease together.

Since the variation sweep consists of change of position the way to evaluate the response of the hypothetical values is to take the derivative with respect to the position coordinate

As to the change of the *actual* energy values, when moving along the *true* trajectory: as shown by eq. (1.13): If you express the physics taking place in terms of energy you gain the option of taking the derivative with respect to the position coordinate.

We can connect the evaluation of the hypothetical change sweep to actual change through the common factor; derivative with respect to position.

There is precisely one point where the hypothetical rate of change and the physical rate of change have *the same magnitude*: at the sweet spot. Hamilton's stationary action capitalizes on that correspondence. Hamilton's stationary action uses the response to *variation* to obtain information about the motion along the *true trajectory.*

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(E_{k}-E_{p})' to variation sweep.

At the point where the variation hits the sweet spot the value of 'area(E_{k}-E_{p})' 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 t_{1,2} and t_{2,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.

Summerizing:

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.

### Integral

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
The summed area along the *entire duration* will be stationary.

- The time intervals can be made arbitrarily narrow.

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 (E_{k}-E_{p})

Hence: when the circumstances are such that the Work-Energy theorem holds good it follows that Hamilton's stationary action will hold good.

### Differential

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/s^{2}.

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 p_{v}, 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 1 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 2 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 3 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 p_{v}' In the 'integral' panel the variational parameter p_{v} 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

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. In graphlet 3 change of potential energy goes with the 3rd power (cubic), and the change of kinetic energy is quadratic, hence the action reaches a maximum.

## Derivation^{1}

The following discussion is about the configuration depicted in graphlet 1.

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.

t for 'time'

s for 'position'

v for 'velocity'

a for 'acceleration'

S for Hamilton's action

S_{k} for the kinetic energy component of Hamilton's action

S_{p} for the 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 general case we don't know in advance in what way the potential energy will be a function of position. The kinetic energy is of course a given, but in the following derivation substituting the term E_{k} with the expression in terms of velocity is postponed. In effect the kinetic energy is treated as if it is yet to be determined how the kinetic energy is a function of velocity.

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, each responding differently to δ*s*

This derivation is for the response of the energies as represented in graphlet 1 and graphlet 3, where varation sweep is evaluated. To compare response of the energies to variation sweep we must enter the potential energy as *minus* potential energy.

the potential energy component of Hamilton's action:

The response of the kinetic energy component of Hamilton's action:

On both sides of t_{2} the velocity changes; 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:

The total time is divided in equal length sub-intervals, so the move from interval (1,2) to the adjacent (2,3) can be rearranged to the form of taking a time derivative:

Combining (2.6) and (2.7) we obtain an expression for the change of the kinetic energy component of Hamilton's action as a function of δ*s*:

Combining the two responses:

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:

As we know, in classical mechanics the kinetic energy term in (2.10) simplifies to mass times acceleration:

## 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=(E_{k}-E_{p}), 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.

Summerizing:

Hamilton's stationary action works by imposing the constraint that was established with (1.10): the rate of change of kinetic energy must match the rate of change of potential energy.

## Jacob's Lemma

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.

Note

^{1} I learned this derivation from the article by Preetum Nakkiran titled 'Geometric derivation of the Euler-Lagrange equation'.

The interactive diagrams on this page are created with the Javascript Library JSXGraph. JSXGraph is developed at the Lehrstuhl für Mathematik und ihre Didaktik, University of Bayreuth, Germany.

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

*Last time this page was modified:* November 14 2021