An Introduction to Lagrangians and the Principle of Stationary Action

Nawaf Al Balushi
10 min readOct 24, 2022

--

In 1687, Newton published his Principia Mathematica, revealing his three laws of motion along with his development of calculus. After that, many scientists, including Newton, came up with a series of problems that are in the field of what would become the calculus of variations, but at the time, their solutions were not straightforward. Then in the 1750s, Leonhard Euler and Joseph-Louis Lagrange release their Euler-Lagrange equations; a huge advance in the calculus of variations and made these types of problems much easier to solve. This would lead to the concepts such as the Lagrangian and the principle of stationary action, which are indispensable tools in modern physics, as shown by Albert Einstein and Richard Feynman in their theories of general relativity and path integrals respectively.

Stationary Path (Photo by Machen from Wikimedia)

Prerequisites:

  • Single-variable calculus, including applications of integration and differentiation
  • Knowledge of alternative coordinate systems such as polar coordinates
  • Understanding of partial derivatives
  • Understanding of kinetic and potential energy and the conservation of total energy
  • Newton’s laws of motion
  • Conservation of linear momentum
  • Good to know: Familiarity with Newton’s time derivative notation (dot on top of a quantity indicates that it’s the time derivative of the quantity; number of dots indicate the order of the time derivative)

Functionals

Firstly, the definition of a functional must be understood. Simply put, it is a mapping that takes in functions as inputs and outputs a real number. This definition is a special case of functionals as the general definition may cause unnecessary confusion and is irrelevant for the most part.

Examples of functionals:

Example 1: A functional that takes a function as an input and outputs the function’s value with zero as its argument.

Equation 1

Example 2: A functional that integrates a function from 0 to 1 to output a real number (assuming y is real-valued for x ∈ [0,1]).

Equation 2

“Where might a functional show up in a problem?” you may ask. They usually show up in the form of definite integrals of functions to be determined such as those for finding volumes, surface areas, or arc lengths.

Example: Curve with Shortest Length

Given two points on the xy-plane, what curve connects the two points with the shortest length? The answer may seem obvious; it’s just a straight line. However, the proof behind this involves calculus and other unexpected techniques. Furthermore, the answer is not always a straight line as you might expect. Depending on the space in which these two points lie, a straight line may “leave” the bounds of the space that the points are defined to be in. A common example of this is the curve with shortest length where the curve is constrained to lie on a sphere. The answer, in this case, would be an arc of a great circle, a circle which lies within the sphere, as shown in the image below:

Geodesic of a sphere (Photo by J Villanueva)

The general term for such a curve is called a geodesic and is an important concept in general relativity, which states that free particles traverse along geodesics in spacetime.

From integral calculus, you may remember the following formula as the arc length of a given curve C given by y = f(x), which I shall write in functional notation:

Equation 3

The shortest length problem can now be reframed: what function y minimises or extremizes the functional S? (Extremizing this integral would necessarily minimize it as it’s clear that there is no maximum. A function that proves this would be a parabola that goes through the two points and take the limit as the y-coordinate of the vertex goes to ±∞ and the x-coordinate is the mean of the x-coordinates of the two points)

The Principle of Stationary Action

Various physicists formulated their versions of what would now be referred to as one general principle, known as the principle of stationary action or Hamilton’s principle . The action, denoted by S[q], is shown below:

Equation 4

Time to unpack the expression above. This functional has q as its input function, where q(t) is a generalized coordinate. A generalized coordinate is a parameter used to define the state of a system. For example, a 2-dimensional system of N point masses, which are free of any forces and potentials, would have 2N generalized coordinates. Each particle would have a pair (x,y), (r,θ), or another type of coordinate, depending on the coordinate system used, to describe its position. To keep it general, we use q = (q₁,…, qₙ) to represent any of these coordinate system. In equation 4, there is only one generalized coordinate, but the Lagrangian can include any number of them, depending on the number of objects considered, the dimensions of the system, the orientations of the objects, and the constraints set on them (the meaning of a constraint on a system will be elaborated upon). The limits of integration are to show that the system is being considered between times t₁ and t₂, however these aren’t relevant when it comes to finding the equations of motion. The Lagrangian L, in general, is a function of q, dq/dt, and t and is equal to the kinetic energy of the system minus its potential energy (for non-relativistic, conservative systems). Notice how this is different from the total energy, though there is a connection between the two that is out of the scope of this article. (Look up Hamiltonian mechanics for more information)

The Lagrangian is usually written like this, where T is the system’s kinetic energy and V is the system’s potential energy:

Equation 5

The principle of stationary action states that the true evolution of the system q(t) is such that the action integral S[q] is at a stationary point. Similar to how the stationary points of regular functions are found in differential calculus, a “derivative of S[q]” must be taken “with respect to q” then be set to zero. This condition does not necessarily extremize the functional, it could be a saddle point like in regular differential calculus, but this stationary condition alone is enough to generate the correct equations of motion. The process of finding the stationary point for a general functional will show that the condition that the Lagrangian must satisfy is a set of partial differential equations, namely the Euler-Lagrange equations. If the generalized coordinates satisfy the EL (Euler-Lagrange) equations of the functional, then that set of generalized coordinates is the stationary point of the functional and the EL equations of the given Lagrangian will also be the equations of motion for the system. The EL equations for a functional S[q₁,…,qₙ] are as follows:

Equation 7

The rest of the article will focus on the applicability of these equations to physics, rather than mathematics. Despite this, the EL equations can find the stationary functions for any functional of the same form; it is a purely mathematical concept until you apply it to the action functional.

Equivalence of the Principle of Stationary Action with Newton’s Second Law

It can be shown that the Lagrangian formalism is equivalent to Newton’s second law F = dp/dt. For simplicity, the coordinate system used will be a one-dimensional cartesian system and the potential used. For this, it will be assumed that there are no non-conservative forces (no forces that cannot be represented as potentials such as friction and no forces or potentials with explicit time dependence will be taken into account). This isn’t very general, but it will suffice for most scenarios.

Equation 8

Since the action of this system has the same form as the general case, besides the limits of integration, the action does not need to be written down and the next step can be writing the EL equation for this system. (The limits of integration in the action can be ignored for now because they aren’t used in the EL equations)

Equation 9

Computing the partial derivatives:

Equation 10
Equation 11

If you are familiar with applying calculus to physics problems, then a bulb should have lit up in your head by now. The first equation, is the definition of a conservative force in terms of its potential energy function. To see this connection more clearly, integrate both sides with respect to position and rearrange for V(x) to see that it's the definition of the potential energy function in terms of a conservative force such as an electric or gravitational force. This partial derivative is called the generalized force when the derivative is with respect to the system’s generalized coordinate.

The second equation is the definition of linear momentum. However, the Lagrangian formalism defines this seeming coincidence to be the generalized momentum where ẋ is replaced by the time derivative of the generalized coordinate.

Replacing these partial derivatives with their more familiar representations and substituting them into the EL equation:

Equation 12
Equation 13

Now that it has been shown that the two formalisms are equivalent, one might ask why the Lagrangian formalism has the attention it does in classical mechanics, despite its more complex looking nature. One reason is that it’s better-suited for constrained systems. Constrained systems are systems which have forces that “guide” the particles or objects in the system. Examples of constraint forces include the normal force of a surface on a slope, tension in an ideal inextensible rope, or static friction so that the system is constrained to move in a particular way. However, the constraint force must act normal to the surface or curve that the particle is constrained to move in, otherwise it would perform work on the particle. Unlike Newtonian mechanics, Lagrangian mechanics allows one to skip the step of calculating the constraint forces and go straight to the equations of motion.

Example: Simple Pendulum

Consider a simple pendulum, where the rope is massless and is inextensible:

Figure 1

From the diagram, the following Lagrangian can be deduced:

Equation 15

Mathematically speaking, the m and l constants can be omitted since the EL equations are linear in L, thus the equations of motion will be the same. However, the Lagrangian would no longer be equal to the kinetic energy minus the potential energy and the physical interpretations of the partial derivatives will no longer apply.

Computing the partial derivatives:

Equation 16
Equation 17

Now that the generalized force and generalized momentum are found, the EL equation can be written down, skipping the algebra to simplify it:

Equation 18

The equation of motion obtained is exactly the same as what would’ve been found with Newton’s second law. However, instead of dealing with tension in the rope directly, the constraint force for this example, its effect is already accounted for by reducing the number of coordinates needed to define the configuration for a 2-dimensional system to just one coordinate: the angle traced by the mass.

That example may have been easy to solve for using Newtonian mechanics too, but it is a stepping stone to 3-dimensional systems where the constraint forces may be extremely complicated and not worth the extra effort.

Why Lagrangians?

Besides making problems in classical physics easier by simplifying the steps needed to arrive at the equations of motion, another reason that Lagrangian mechanics is superior to Newtonian mechanics is its generalizability. For instance, in general relativity, the principle of stationary action applies, but Newton’s laws do not. In quantum mechanics, it is impossible to solve for position as a function of time due to the indefinite nature of observable quantities at that scale. However, Richard Feynman generalized the stationary action principle into his path integral formulation, a key factor in the development of quantum field theory. Even before the 20th century, Fermat hinted towards how general this principle could be with his principle of least time, which states that light takes the path of least time; this wouldn’t have been able to be done using Newtonian mechanics and it was one step closer to Einstein’s law of geodesics.

Thank you for reading my article! I was hoping to make this more broad, but I thought the examples given are more important for understanding how it works in classical mechanics, rather than going into many different areas of physics. A possible follow up article may explore the Hamiltonian, symmetry/conservation laws, and special cases of the Lagrangian that would shed light on how significant the formalism really is.

EDIT: Made a correction: “…is equal to the kinetic energy of the system minus its potential energy (for non-relativistic, conservative systems)”. Examples of where L ≠ T - V include the free relativistic particle and the charged particle in an electromagnetic field.

--

--