Ancient revolutionizing interpretations of F = ma

The Lagrangian and Hamiltonian formalism

RuchirRawat
12 min readJul 6, 2024

Introduction

Newton’s second law of motion, F=ma, is the cornerstone of classical mechanics — a principle so fundamental that it’s taught in every high school physics class. Yet, for all its simplicity and power, Newton’s formulation only scratches the surface of what describes the motion of the universe. What if I told you that there are deeper, more versatile ways to understand and predict the behavior of physical systems? Ways that not only solve problems more elegantly but also reveal profound insights into the nature of reality itself? So, why set camp at the surface when you can delve into the depths? Join me as we unravel the intricate nature of particles and forces, guided by the ingenious insights of Lagrange and Hamilton. Your journey from F=ma to the frontiers of theoretical physics begins here.

State of a classical system

Through the onset of Newtonian mechanics, and the Lagrangian and Hamiltonian formalism for that matter, one could always determine with completely certainty the evolution of a mechanical system through time by solving the so called equation of motion. The equation of motion as described by Newtonian mechanics is the, rather famous, F = ma equation.

Newton’s second law of motion, that formally defines force to be the rate of

The equation is a vector equation, which means that it can encompass multiple equations in a condensed form. Each of these equations, produces one ordinary differential equation along each coordinate of our coordinate system.

The state of a system is a set of variables corresponding to the system one must know to completely determine the evolution or changes the system will go through as time passes. Such a set is said to be complete since it is the smallest set of quantities one needs to predict the evolution of the state being studied. This helps us answer the question “What will this system look like later?” and for that matter “What did this system look like in the past?”.

Furthermore the state of the system at different times is connected by series of events. These series of events describe what the system looked like at each point in time from the time it started evolving, and what it will look like up to some final state. This series of events is called the path. These terminologies should make more sense with a simple scenario.

The above diagram describes the path of a ball (system) thrown in the air, that freely falls to the ground over time under the gravity of the earth. The initial state of the ball is completely described by the direction and the speed with which it is thrown into the air. The final state may, or may not, be specified. The state of the ball at some random time instant is also shown. From the diagram, at this point in time the ball is at some height from the ground and has, furthermore, moved some distance along the x and y axes. In addition, it possesses a speed of 8 m/s, which as a vector possesses three components, one along each axis. The state of the ball at this instant of time is mathematically expressed by these positions and the three velocity components. So the state, in this example, is completely specified by 6 numbers.

The state of a system, as described in the Newtonian and the Lagrangian formalism, are by the use positions and velocities. Meanwhile in the Hamiltonian formalism positions and momenta of the substituent particles in the system are used for this purpose. This means that if one knows the positions and velocities or momenta of each particle in the system at all times one can tell with complete certainly, what this system will look like in the future and what it looked like in the past.

Position and velocity/momentum are sometimes called variables of state. In the example above, there are six variables of the state. Namely, the x, y, z positions and velocity components of the ball in these directions. How does one find these variables of state? One simply solves the equations of motion as described by one of the above formalism. This typically involves knowledge of mathematical methods related to solving ordinary differential equations of the second order. In a way, the state of a system or even the path is a mathematical solution of the equations of motion, as described by a theory.

Birth of the Lagrangian

Let us consider a simple question.

“What is the path that minimizes the distance between two points on a plane?”

One wouldn’t have to think twice before saying, that the answer is a straight line. However, one would have to put in some thought when asked why this is the case.

The purpose of asking this question isn’t to immediately start looking for an answer. Rather it is to understand what we’re trying to solve for, to begin with. We are trying to solve for a path for a given initial and final position (initial and final states), under the condition that the distance between the given positions is minimized. Such a problem is called a minimization problem, for obvious reasons.

One starts the problem off by defining the length to be minimized, as an integral. This is may seem like an oddly specific choice to represent distances, but believe me when I say that it comes very naturally.

Express distance between two points on a plane as some integral over a spatial coordinate, say x. L is some function that depends on the problem.

Such an integral is called the Action, which is a very special type of function since its input isn’t just a number. It is a path! Any one of the infinitely many paths that can connect two points on a plane, to be more specific. This type of function, that takes paths as inputs instead of numbers, is called a functional. Of course, the key to solving the problem is by finding the path that minimizes the Action.

Historically, the necessity for a new formulation of mechanics was recognized with the introduction of the Brachistochrone problem by the renowned Bernoulli brothers. Despite its seemingly straightforward statement, the problem posed significant challenges to the foremost intellectuals of the era, who struggled not only to derive the governing equation but also to solve that equation of motion, once they had it. The problem states,

“What is the path connecting two points, positioned at different heights from the ground, that would minimize the time of a ball rolling on it, under gravity?”

A pictorial representation of the Brachistochrone problem. The question is which one of these paths minimize the time the ball takes to roll down.

Yet again, we have a minimization problem. Obviously, there are infinitely many paths that join two points in our two dimensional plane, but just one that satisfies the condition stated in the Brachistochrone problem. How does one find this path? They solve the equation of motion, namely F = ma. However, if finding this equation alone isn’t daunting enough, solving it happens to be far more challenging.

Alternatively, one could express the time taken by the ball to roll down a randomly chosen path as an integral, just like before. This time we choose time to be our functional. Again when one works this out on paper, the choice of expressing time as an integral doesn’t seem arbitrary.

Express time taken for a ball to roll down under gravity between two points on a plane as some integral over a spatial coordinate, say x. L is again some function that depends on the problem.

Solving a minimization problem, such as the two examples above, by expressing our problem as an integral (of paths) lies at the heart of Lagrangian mechanics. In majority of all cases, the solution lies in minimizing this integral. This goes by the name of the principle of least action.

Leonhard Euler, already a celebrated figure in the academic world by this time, proposed his own solution to the Brachistochrone problem. However, unbeknownst to him, his young future Italian protégé, Joseph-Louis Lagrange, was already ahead in addressing this challenge. Lagrange’s innovative approaches would eventually lead to the development of the Lagrangian formalism, revolutionizing the field of mechanics.

Leonhard Euler (left) and Joseph-Louis Lagrange (right)

Lagrange’s work was first reveled to the world in his monumental book, “Mécanique Analytique,” published in 1788. This treatise systematically laid out the principles of mechanics using calculus, eliminating the need for geometric considerations that had dominated the field previously. Lagrange’s methods provided powerful new tools for understanding a wide range of physical systems, from simple pendulums to complex planetary motions. The equation is displayed underneath, in all its glory,

The Euler-Lagrange equations

This equation is actually a direct consequence of the principle of least action. When we generalize the above two problems, to a problem where our task is to extremize an integral of the form,

The action of a general problem (the physical significance of the terms on the right will be explained later)

the outcome, of course, is the Euler-Lagrange equation. We can now state the principle of least action more formally.

The true path taken by a system, for a given pair of initial and final state of the system, is also the one that extremizes the action and solves the Euler-Lagrange equation of motion.

The quantity, that we denote by L, is what we call the Lagrangian of the system and is the mathematical object around which the theory revolves. In fact, since knowing the expression for the Lagrangian and plugging it into the above equation produces the state variables by solving the equation of motion, we can perceive the Lagrangian itself to be the state of our system. (Although this notion breaks in quantum mechanics since the notion of what we call a state, changes. More about it in this article.)

The Lagrangian is the state in classical mechanics.

Other terms in this equation may seem scary at first, but the rest of what follows, will provide a deeper understanding of this equation and its implication in mechanics. This new formulation not only solved the Brachistochrone problem and many others but also paved the way for the development of modern theoretical physics, influencing subsequent advancements such as Hamiltonian mechanics, the theory of general relativity and quantum mechanics, to name a few.

It turns out that treating the problem of finding paths taken by classical systems as minimization problems provides exactly the same solutions as Newton’s F=ma would. Except now the problem would be mathematically easier and in addition provide further insights into, what we call, the symmetries of the system (More of symmetries in upcoming articles).

We can, in fact, see this close parallel between Newton’s second law and the Euler-Lagrange equations when they’re displayed next to one another.

The close parallel between Newton’s second law of motion and the Euler-Lagrange equations of motion

One may be lead to believe that the Euler-Lagrange equations are a close parallel or analogy of Newton’s equations of motion. However, the Euler-Lagrange equations happens to be a very natural generalization of Newton’s equations, with far more applications. Newton’s law is, in a way, a special case of the Euler-Lagrange equations.

The Lagrangian approach remains a cornerstone of classical mechanics, demonstrating the profound impact of Lagrange’s early insights and the continuing importance of his methods in contemporary physics. In my mind, the principle of stationary action and the Euler-Lagrange equation will always be the most fundamental laws of nature and the one that governs all phenomena around us.

Spanning space with coordinates

The study of classical mechanics is in many ways a parallel study of coordinate transformations and representation of physics in mathematical language. Just like the content of an article is independent of the language it may be written in, it goes without saying,

The laws of physics are invariant under choice of representation and coordinate transformations.

Firstly the statement conveys the idea, that the way we express physics on paper doesn’t affect physical facts and everyday experiences. In essence, Newton’s F = ma, the Euler-Lagrange equations of motion (and Hamilton’s equations) are equivalent and just different languages in which the laws of classical mechanics are written. Similarly, the Lagrangian (and the Hamiltonian), points to the same state for a given system. Any new theory we come up with, to write the laws of physics, must ensure that the solution it provides describes the same physical phenomena as any other formalism.

Secondly, the statement eliminates the dependence of a theory of the choice of coordinate system. One may be accustomed to seeing the Cartesian or the x-y coordinate system, since it stays as the most commonly used set of coordinates for solving problems. But depending on the nature of the problem, one may find it easier to represent the same problem in a different coordinate system, say the spherical coordinate system.

For instance, the use of the polar coordinate system is preferable to study a pendulum since the distance of the bob from the origin is fixed and one can describe the system just using a single angle, as a function of time. Using the x-y coordinate system would require solving for both the x and y coordinates as functions of time to determine the state of the system.

It’s preferable to use the polar coordinate system to study pendulums due to a fixed r coordinate and it suffices to determine the angular coordinate to completely specify the state of the pendulum.

For the Euler-Lagrange equation to preserve reality under coordinate transformations one should, in principle, be able to use any set of coordinates to be able to solve the equation. This is clearly seen in the expression of the equation. The equation prefers the use of q as the letter to indicate coordinates, which could then assume any set of coordinates for a problem at hand. The q’s with a dot overhead represent the rate of change of that coordinate with respect to time.

These q’s and q dots are called the generalized coordinates and velocities of our system. The beauty of the equation lies in its ability to incorporate any set of coordinates, all the while keeping the physics of the problem intact. For the example with the pendulum, we just have one generalized coordinate, given by the angle theta. Differentiating it with respect to time gives us the generalized velocity of the coordinate.

If we chose to work our way through the problem in the x-y coordinate system, we would have to deal with the x coordinate, the y coordinate, the velocity of the pendulum along the x coordinate (x dot) and the velocity of the pendulum along the y coordinate (y dot). Of course, this would be harder and more confusing to deal with, and nonetheless, describe exactly the same dynamics of the pendulum.

The theory starts with finding the Lagrangian of the system, which automatically determines the state of our system.

In general the Lagrangian is a function of these generalized coordinates ,velocities and time. When we plug in this function into the Euler-Lagrange equation we get multiple ordinary differential equations, which when solved, yield the q’s and q dots as functions of time, hence fully determining our state.

The close parallel between Newton’s equation of motion and the Euler-Lagrange equation helps us define another term.

The term marked in blue, on the bottom left, corresponds to what we would call the momentum in Newton’s law. Since this term corresponds to the momentum along the coordinate i in its Newtonian analogue and the term involves a derivative with respect to generalized velocity along the coordinate i, it comes quite naturally to name this term generalized momentum. Additionally, since the momentum along a coordinate is derived using the derivative of the Lagrangian with respect to the velocity along that coordinate, this momentum is said to be canonically conjugate to that coordinate. Canonically conjugate momentum is of prime importance in the Hamiltonian formalism.

The Hamiltonian

The Hamiltonian formalism is another way of seeing the same problem. Instead of now working with the Lagrangian, we work with a new mathematical object called the Hamiltonian. The Hamiltonian is purely mathematically defined by performing, what we call, the Legendre transformation on the Lagrangian. When this transformation is carried out in classical mechanics, the Hamiltonian is always found to be the total energy carried by the system as a virtue of the motion of its constituent particles.

Introducing a new formalism, called the Hamiltonian formalism, using a coordinate transformation applied to the Lagrangian formalism.

An important property of this transformation is that it splits the Euler-Lagrange equation into two. These equations are called the Hamiltonian equations of motion. ‘n’ Euler-Lagrange equations are an equivalent of ‘2n’ Hamiltonian equations. The difference being that Euler-Lagrange equations are second order in time and Hamiltonian equations are first order.

Secondly, this time instead of working with generalized coordinates and generalized velocities we work with generalized coordinates and generalized momentum canonically conjugate to these coordinates. The state of the system is hence given by generalized coordinates and generalized momentum, which is together called the Phase Space. The Hamiltonian formalism is of prime importance in Quantum Mechanics.

Summary

From the humble beginnings of Newton’s second law, F=ma, to the sophisticated landscapes of Lagrangian and Hamiltonian formalisms, we have journeyed through the foundational principles that govern classical mechanics. These advanced formulations not only simplify solving complex physical problems but also provide deeper insights into the underlying symmetries and laws of nature, which I shall speak of in future articles.

The Lagrangian formalism, with its principle of least action, offers a powerful method to determine the true path of a system by minimizing the action. This approach generalizes Newton’s laws and provides elegant solutions to a wide range of physical phenomena, from the simple motion of a pendulum to the intricate orbits of planets. On the other hand, the Hamiltonian formalism transforms our understanding by shifting focus to phase space, where the state of a system is described by generalized coordinates and momenta. This formulation is particularly crucial in quantum mechanics and offers a robust framework for analyzing the evolution of systems over time.

By exploring these deeper interpretations and methodologies, you have equipped yourself with a more versatile and profound understanding of classical mechanics. See you in my other articles!

--

--