In classical mechanics, the action of a system is defined as the integral of the Lagrangian between two times,

$S=\underset{{t}_{1}}{\overset{{t}_{2}}{\int}}L\phantom{\rule{.2em}{0ex}}dt=\underset{{t}_{1}}{\overset{{t}_{2}}{\int}}(T-V)dt$

where the Lagrangian itself is defined as the difference between kinetic and potential energy. These two quantities are implicit functions of time through their dependence on velocity and spatial location, respectively. The integral can be evaluated for any path between the two fixed endpoints determined by the boundary conditions imposed at the two times.

The principle of least action states that the value of the action integral is an extremum for the physically real path of the system between the two endpoints, generally a minimum rather than a maximum. This forms the basis for deriving the Lagrange equations, which are equivalent to the equations of motion determined by Newton’s second law but more convenient for general systems. For system with a single spatial variable, the single Lagrange equation is

$\frac{d}{dt}\frac{\partial L}{\partial \stackrel{\xb7}{x}}-\frac{\partial L}{\partial x}=0$

Since the action integral is a single value determined by any of an infinite number of paths, a visualization of the principle of least action must work effectively with some small fraction of possible paths. One approach is to allow user modification of a single test path and report the corresponding value for the action. Here is one such example using (ugh!) Java applets, and a more modern example using pure JavaScript for a restricted set of test paths. While these are completely accurate in terms of the physics, reporting a single action value upon modification is perhaps not compellingly informative.

Another approach is to determine explicitly the physically real path as a function of time, then systematically modify the path in both the positive and negative spatial directions. The action integral can then be plotted as a function of the modifications of the path. The resulting function represents the principle of least action by always displaying a minimum at the origin, where there are no deviations from the physically real path.

If the amplitude of the modifications is taken as one axis for plotting, the second axis of a three-dimensional plot is available to describe some other feature of the modifications. Adapting an idea from the physics of music, the amplitude will be controlled by a periodic function that is zero at the endpoints, corresponding to the vibrational modes of a string or closed pipe. Any periodic function could be used, but for simplicity a sine wave will be used here. The second axis of the plot will then indicate the order of the modifications.

Concretely, if the physically real path of the system is given by $x\left(t\right)$ , then the modified path will be taken to be

${x}_{\mathrm{modified}}\left(t\right)=[1+Asin(\frac{n\pi}{{t}_{\mathrm{end}}}t\left)\right]x\left(t\right)$

where *A* is the variable amplitude of the modifications, *n* is the integral order of the modifications and *t*_{end} is the final value of the temporal coordinate for the physical path.

Now to see this in action, so to speak. First consider an object falling from some height under uniform gravitational acceleration until it meets the ground. The Lagrangian of this system is

$L=\frac{1}{2}m{\stackrel{\xb7}{x}}^{2}-mgx$

The Lagrange equation is

$\stackrel{\xb7\xb7}{x}+g=0$

and its explicit solution as a function of time is

$x={x}_{0}+{v}_{0}t-\frac{1}{2}g{t}^{2}$

The physically real path and its modifications look like this:

With an explicit solution to the motion the action could be evaluated analytically, since the integrals involved are circular functions multiplied by powers. The process is straightforward albeit tedious and would detract from the simplicity of the presentation. Instead the Lagrangian is written in the underlying code with explicit derivatives of the modified path and the action integral evaluated numerically using this fast JavaScript function.

Setting *m* = 1 for convenience, the action integral as a function of the amplitude of modifications is

The action function is somewhat surprisingly symmetric about the origin. Verifying this takes quite a bit of algebra, but pops right out of the graphic. As expected, the action is always minimal at the origin where there is no modification to the path.

Connecting data points across modifications of different order leads to the surface

which has the expected minimum valley when the amplitude of modifications is zero. The same minimum is reached when the order *n* of modifications is zero, when again there is no change to the physical path.

Now consider an object attached to a spring moving back and forth. The Lagrangian of this system is

$L=\frac{1}{2}m{\stackrel{\xb7}{x}}^{2}-\frac{1}{2}m{\omega}^{2}{x}^{2}$

The Lagrange equation is

$\stackrel{\xb7\xb7}{x}+{\omega}^{2}x=0$

and its explicit solution as a function of time is

$x\left(t\right)={x}_{0}cos\omega t+\frac{{v}_{0}}{\omega}sin\omega t$

Setting ω = 1 for convenience, the physically real path over the first quarter period and its modifications are

Again with *m* = 1, the action integral as a function of the amplitude of modifications is

which is again symmetric about the origin. Again as expected, the action is always minimal at the origin where there is no modification to the path.

Connecting data points across modifications of different order leads to the surface

which again has the expected minimum valley when the amplitude of modifications is zero. The same minimum is again reached when the order *n* of modifications is zero.

While easily soluble systems have so far be presented for the sake of the physicist’s typical simplicity, the idea is extensible to nonsoluble systems through numeric integration of the equations of motion. If the potential of the last example is modified to accomodate an arbitrary integral power,

$L=\frac{1}{2}m{\stackrel{\xb7}{x}}^{2}-\frac{1}{k}m{\omega}^{2}{x}^{k}$

the Lagrange equation

$\stackrel{\xb7\xb7}{x}+{\omega}^{2}{x}^{k-1}=0$

is no longer explicitly soluble in terms of known functions when *k* > 4 . Setting *m* = ω = 1 for convenience, the numerically integrated physically real path over the first quarter period and its modifications are

The numerical integration of the Lagrange equation returns interpolating functions for the path and its derivative that can be used to express the Lagrangian. The action integral as a function of the amplitude of modifications is then

The action function here is no longer completely symmetric about the origin. The action as expected has an extremum at the origin where there is no modification to the path, but for low values of the order *n* this is a local rather than global minimum.

Connecting a subset of data points across modifications of different order leads to the surface

which has overall the same minimum valley when the amplitude of modifications is zero. If the domain of the graphic is extended to larger positive amplitudes of modification, the action surface here plunges towards negative infinity, which is interestingly different behavior compared to the previous examples.

With numerical integration available, the principle of least action can be demonstrated for any potential whatsoever by alteration of the underlying code embedded in the document.

*Uploaded 2017.02.27 — Updated 2017.06.15*
analyticphysics.com