*This is the first post in a series of posts on various topics in classical mechanics.*

*The ideal reader has a working knowledge of single-variable calculus, partial derivatives, and basic introductory physics (force, acceleration, momentum, energy, etc). Note that throughout this series, time-derivatives are written as \(\dot{x}\equiv\frac{dx}{dt}\) and vectors are marked by boldface.*

Newton's laws form the basis of the field of

**classical mechanics**, the field of physics concerned with the motion of macroscopic objects under the influence of certain forces. Newton was the first to mathematically express the relationship between the force on an object and its motion; his second law states that the force applied is proportional to the object's acceleration: $$\mathbf{F(\mathbf{x}, \mathbf{t})}=m\mathbf{a}=m\mathbf{\ddot{x}},$$
where \(\mathbf{x}\) is the object's position vector. Now, as physicists, our job is of course to find the position of the object at any moment in time. This is done by solving the above

Now it turns out that in the grand scheme of things, with the availability of supercomputers and excellent approximation algorithms, exact solubility of differential equations is not the physicist's biggest worry. The hard part is

**equations of motion**for \(\mathbf{x}\); however, as the force may depend on position and time, the equation is a**second-order differential equation**in time, and for complicated systems is often impossible to solve exactly. As an example of such a force, consider the force on a block attached to a spring whose stiffness \(k\) is changing over time. In this case, by Hooke's law, the equations of motion are \(m\mathbf{\ddot{x}}=-k(t) \mathbf{x}\). The exact solution for \(\mathbf{x}\) depends on the precise form of \(k(t).\)Now it turns out that in the grand scheme of things, with the availability of supercomputers and excellent approximation algorithms, exact solubility of differential equations is not the physicist's biggest worry. The hard part is

*obtaining*the equations of motion in the first place. Most systems thrown at you in Physics 101 succumb to analysis after simply drawing a free-body diagram and slogging through some trigonometry to resolve components of the forces. This is not always the case, though - many physical systems of interest are opaque to straightforward force analyses. I wouldn't fancy, for instance, considering the forces in a double pendulum system or the swinging Atwood machine. Furthermore, in much of modern physics, such as the realm of subatomic particles, the classical concept of Newtonian force is not well-defined. For these reasons (and many more that will become clearer later), it is often useful to work with more elegant formulations of classical mechanics; the one we will develop with here is based off the**principle of least action**(also known as**Hamilton's principle**) and is known as**Lagrangian mechanics**. If you're interested, check out the further reading section at the end of the post.###
**An ode to coordinates**

Figure 1: The simple pendulum |

While the difference between Cartesian and polar coordinates for the case of the simple pendulum is not particularly complicated (conversion is quite easy and we do it implicitly), from a more general perspective, Newton's second law is very rigid in its insistence on Cartesian coordinates. Ideally one would like to use coordinates that suit the system under consideration, the number of which agrees with the

**degrees of freedom**of the system. Take for example, a bead constrained to a wire. The number of degrees of freedom of the bead is one, no matter how the wire twists and turns in three dimensions: the position of the bead can be parameterized by one variable (such as the wire's arc length) as it moves along the curve. To describe the bead's position, then, we need only one coordinate along with the shape of the wire (a "constraint"), not the three implicit in \(\mathbf{x}\). Similarly, the simple pendulum is a system with only one degree of freedom - its position along the circular arc to which it is constrained to move can be parameterized by a single coordinate \(\theta\). Thus we see a distinction between the dimensionality of the space in which the system is embedded (2 for the pendulum) and the dimensionality of the path that the system actually takes (1 for the circular arc that the pendulum sweeps out). The difference between these two dimensions is precisely the number of the constraints on the system - for the pendulum, there is one constraint that relates \(x\) and \(y\). This constraint is that the pendulum does not stretch; i.e. \(x^2+y^2=l^2.\)

Incidentally, the natural coordinates for a system are commonly known as

**generalized coordinates**, and are written as \(\mathbf{q}=(q_1, q_2,\dots, q_d)\) where \(d\) is the number of degrees of freedom of the system. The wonderful thing about the principle of least action is, as we shall see, that we are not forced to use Cartesian coordinates. Instead we can simplify our lives by working with generalized coordinates. So instead of imagining the system moving in time through a Cartesian space, we will think of it as moving through a generalized

**configuration space**. The advantages of using generalized coordinates is tremendous: we no longer have to worry about the constraints on the system because the natural coordinates always respect the constraints! In the case of the pendulum, if we describe the system by \(\theta\) we shouldn't have to make any reference to the fact that \(x^2+y^2=l^2.\) We will see this explicitly when we use the principle of least action to analyze the simple pendulum below.

### The principal matter

Let us now turn to the principle of least action. Don't worry if it seems too abstract at first. Bear with it - we will work through a few examples and, in fact, prove that it is equivalent to Newtonian mechanics by using it to derive Newton's second law!

**Define the**

__The Principle of Least Action__:**Lagrangian**of a system to be the difference between its kinetic and potential energies, \[L(\mathbf{q},\mathbf{\dot{q}}, t)=T-U.\] Define also the

**action**of any putative path \(\mathbf{q}(t)\) of the system through configuration space from \(\mathbf{q}(t_1)=\mathbf{q_1}\) to \(\mathbf{q}(t_2)=\mathbf{q_2}\) to be \[S[\mathbf{q(t)}]=\int_{t_1}^{t_2} L(\mathbf{q},\mathbf{\dot{q}}, t) \;dt.\] The path \(\mathbf{q}(t)\) actually taken by the system through configuration space is the path for which the action is stationary to first order. In other words, if a path and any

*very slightly different*path, \(\mathbf{q}(t)+\delta \mathbf{q}(t)\) have the same action, this is the path that the system will take through configuration space.

Figure 2: This function has three stationary points: two minima and one maximum |

Figure 3: A few of the possible paths from \(\mathbf{q}(t_1)\) to \(\mathbf{q}(t_2)\) |

*neither*(consider, for example, \(x^3\) at zero: in general these points are known as saddle points). It just so happens that for almost all physical phenomena, the action functional is minimized by the path that the system takes through configuration space! This is why the principle is named, a tad imprecisely, the principle of least action.

Note: you should be happy that the principle of least action says not a word about forces, and instead uses only energies. This is fortunate, as forces are inevitably more complicated than energies for most interesting systems. For one, forces are always vectors! Energy on the other hand, never has a direction, and so we never have to discuss its components, etc. In addition, energy is very flexibly written in arbitrary coordinate systems, unlike the unit vectors that forces are expressed in. This flexibility yields great benefits when the systems under consideration are not readily described as rectangular (Cartesian, if you will).

### Out of the frying pan and into the fire?

Of course, the example with the ball is very schematic. It does, however, give a fair representation of the

**global**approach that the principle of least action takes. Newton's law, on the other hand, are very

**local**in their scope. As a differential equation, Newton's second law describes how the system changes per infinitesimal time step. Only by integrating this differential equation over these infinitesimal time steps do we obtain how the system evolves over time. Using the principle of least action is much less narrow in its scope: it is cognizant of the initial and final conditions of the system and uses these, along with knowledge about how the energies of the system vary with its configuration (i.e. the Lagrangian), in order to compute how the system gets from \(\mathbf{q_1}\) to \(\mathbf{q_2}\).

"But wait!" you might exclaim. We abandoned the tedious task of playing with forces and Newton's second law, but have to instead comb through the actions of all the paths that get the system from \(\mathbf{q_1}\) to \(\mathbf{q_2}\)! There are an infinite number of such paths; surely there must be an easier way! Wouldn't it be great if we could have the best of both worlds? If only we could deal with energies and use the principle of least action to produce a differential equation equivalent to Newton's second law!

### Euler and Lagrange to the rescue

Fortunately, there

*does*exist a way to connect the global Lagrangian method to the local differential equations approach. Consider it fair warning, however, that the following derivation is not as mathematically rigorous as one might like. As the technical details have little pedagogical value in the context of our discussion, I shall simply point the reader to any standard work on the calculus of variations. What we wish to do is to formalize our ideas of "neighboring" paths and construct the equivalent of \(f'(x)=0\) for functionals so that we may find the paths of stationary action. Consider, without loss of generality, a system with one degree of freedom that obeys the boundary conditions \(q(t_1)=q_1\) and \(q(t_2)=q_2\), and is characterized by a Lagrangian \(L.\) The derivation for the \(d\)-dimensional case is obtained in exactly the same way and is left as an exercise for the (calculus-happy) reader. Let the actual path that our system takes through configuration space - the path we are trying to find - be denoted by \(q(t)\). How can we talk about paths that are only slightly different than \(q(t)\)? The trick is to define slightly varied paths as \[r(t)=q(t)+\epsilon \eta(t)\] where we will later take the limit \(\epsilon\rightarrow 0\). \(\eta(t)\) is any*arbitrary*function that respects \(\eta(t_1)=0\) and \(\eta(t_2)=0\). This constraint is placed so that all perturbed paths respect the same boundary conditions that the true path does. Incidentally, if we look back at Figure 3, we see that \(\delta q(t)=\epsilon \eta(t)\). In words, what we have just done is added an arbitrary change to our path and forced it to be a infinitesimal change by taking \(\epsilon\rightarrow 0.\) Now we need to compute the actions on all such paths.
In analogy to what we discussed about functions at stationary points, and according to the principle of least (stationary) action, we want \[S[r(t)]=S[q(t)]\] as \(\epsilon\rightarrow 0\), i.e. we want the actions of all paths very close to the true path to be equal to the action of the true path. From this relationship, then, we may be able to extract useful information about \(q(t)\). The above equation gives us \[\int_{t_1}^{t_2} L(r,\dot{r}, t) \;dt=\int_{t_1}^{t_2} L(q,\dot{q}, t) \;dt.\] But since \(\epsilon\rightarrow 0\), we may perform a multivariate Taylor expansion of the Lagrangian of the perturbed path (in both \(q\) and \(\dot{q}\)) about \(r(t)=q(t)\) as \[\int_{t_1}^{t_2} L(q,\dot{q}, t) + \frac{\partial L}{\partial r}\big|_{r=q}(r-q) + \frac{\partial L}{\partial \dot{r}}\big|_{r=q}(\dot{r}-\dot{q}) \;dt=\int_{t_1}^{t_2} L(q,\dot{q}, t) \;dt.\] Note that the first term on the left is common to both sides, and so we drop it from both sides. Also, by definition (see above), \(r-q=\epsilon \eta\), and also, by taking a derivative, \(\dot{r}-\dot{q}=\epsilon \dot{\eta}\). We now have \[\int_{t_1}^{t_2}\frac{\partial L}{\partial q}\eta + \frac{\partial L}{\partial \dot{q}}\dot{\eta}\;dt=0\] Integrating the second term by parts yields \[\int_{t_1}^{t_2}\frac{\partial L}{\partial q}\eta - \frac{\partial}{\partial t}\frac{\partial L}{\partial \dot{q}}\eta\;dt=\int_{t_1}^{t_2}\left(\frac{\partial L}{\partial q}-\frac{\partial}{\partial t}\frac{\partial L}{\partial \dot{q}}\right)\eta(t)\;dt=0.\] Can you see why the surface term from the integration by parts vanished? Hint: it's due to a condition we enforced on \(\eta(t)\). Now we have the integral of an expression that is multiplied by the function that produces all of our varied paths. Since \(\eta(t)\) is

*completely arbitrary*and not necessarily zero, but the integral over its product*is*, the other factor must be zero! Draw yourself a few pictures of integrals and think about this for a bit if you don't see it right away. This reasoning, albeit in a more rigorous incarnation, is known as the fundamental lemma of the calculus of variations. Thus we arrive at the famous**Euler-Lagrange equation**, \[\frac{\partial L}{\partial q}-\frac{d}{dt}\frac{\partial L}{\partial \dot{q}}=0,\] which is, in general, a second-order differential equation for the true path \(q(t)\) of the system, as \(L\) is a function of \(q(t)\) and \(\dot{q}(t)\). In general, for a system with \(d\) degrees of freedom, we have a system of differential equations: \[\frac{\partial L}{\partial q_i}-\frac{d}{dt}\frac{\partial L}{\partial \dot{q_i}}=0,\] with \(i=1\dots d.\)### Back to reality

Okay, so we've (with no small amount of black magic) been able to reduce the principle of least action down to a differential equation. The question now, is of course, does it work? Let's do a few easy examples to make sure we agree with answers we get from Newtonian mechanics.

#### The free particle

The free particle is exactly what it sounds like: a particle free to move in all 3 dimension with no forces on it. This system has 3 degrees of freedom, and since it has no particular symmetry/constraints, we will choose our generalized coordinates to be the usual Cartesian coordinates. The first step is to write the particle's Lagrangian. Since there is no potential energy, we have \[L=T=\frac{1}{2}m \mathbf{v}^2=\frac{1}{2}m(\dot{x}^2 + \dot{y}^2 + \dot{z}^2).\] The Euler-Lagrange equations effectively impose the principle of least action on our system's path: \[\begin{align}\frac{\partial L}{\partial x}-\frac{d}{dt}\frac{\partial L}{\partial \dot{x}}=- \frac{1}{2}m\frac{d}{dt}\frac{\partial}{\partial \dot{x}}\dot{x}^2&=0 \\ \frac{\partial L}{\partial y}-\frac{d}{dt}\frac{\partial L}{\partial \dot{y}}=- \frac{1}{2}m\frac{d}{dt}\frac{\partial}{\partial \dot{y}}\dot{y}^2&=0 \\ \frac{\partial L}{\partial z}-\frac{d}{dt}\frac{\partial L}{\partial \dot{z}}=- \frac{1}{2}m\frac{d}{dt}\frac{\partial}{\partial \dot{z}}\dot{z}^2&=0 \end{align}\] Taking the \(\dot{q}_i\) derivatives and the time derivative yields (check it for yourself!) in vector notation, \[m\mathbf{\ddot{q}}=m\mathbf{a}=0,\] where \(\mathbf{q}\) is the position vector of the particle. This is exactly what we would have obtained from Newton's laws: that with no forces acting on the particle, the particle will have zero acceleration. Integrating this equation of motion, of course, yields motion with constant velocity.

#### Simple pendulum

*without discussing forces*! Additionally, we needed only concern ourselves with one variable - the degree of freedom, \(\theta\)! Even better, there was not a word about the tension in the string, something we don't particularly care about in computing the pendulum's motion; tackling the problem via Newtonian mechanics, on the other hand, would have required balancing a projection of gravity against the tension.

Although this approach might appear more convoluted than straightforwardly applying Newton's laws, it is only because these two examples were very simple, and are easily analyzed using forces. But before we move on to more complicated examples, let's prove that the principle of least action is equivalent to Newton's second law.

### Newton again

Take a single particle system with some arbitrary, position-varying potential energy \(U(\mathbf{x}).\) Without any further information, we may write the system's Lagrangian as \[L=T-U=\frac{1}{2}m\mathbf{\dot{x}}^2-U(\mathbf{x}).\] Directly inserting this into the Euler-Lagrange equations yields for the \(x\) component, \[\begin{align}\frac{\partial}{\partial x}\left(\frac{1}{2}m\dot{x}^2-U(x)\right)-&\frac{d}{dt}\frac{\partial}{\partial \dot{x}}\left(\frac{1}{2}m\dot{x}^2-U(x)\right)=0 \\ -\frac{\partial U}{\partial x}-&\frac{d}{dt}\left(m\dot{x}\right)=0 \\ m\ddot{x}=&-\frac{\partial U}{\partial x}\end{align}\] and as you should remember from Physics 101, the right hand side of the last equation, by definition of potential energy, is simply force! Consolidating all the components into vector form, we obtain Newton's second law, \[\mathbf{F}=m\mathbf{\ddot{x}},\] and we may now breathe a bit easier, what with good old Newton getting along with the principle.

### Exercises

1. You've no doubt encountered the Atwood machine (bottom left) at some point, which can be solved fairly easily by considering gravity and tension. The motion of the

**double Atwood machine**(bottom right), however, is not as trivial, and is perhaps more easily solved using Lagrangian mechanics. The first exercise is to solve for the motion of the double Atwood machine, ignoring the mass of the pulleys.

__Hint #1__: How many degrees of freedom are there? The variables in the picture should give you a clue.

__Hint #2__: Before writing out the Lagrangian, write down the positions of each mass in terms of the variables shown. Then use these positions to write down the kinetic and potential energies (measuring height with respect to the top). Remember, the Lagrangian is for the whole system, so the total energies are found by summing the energies for each mass! If you get stuck - and only then! - you might want to glance at this.

2. Since we've worked through the simple pendulum, it's time for you to tackle the

**double pendulum**(shown below).

__Hint #1__: How many degrees of freedom are there? It should be equal to the number of angles needed to describe the system at any point in time.

__Hint #2__: The kinetic energy of the system is similar to that of the simple pendulum. The potential energy is a little trickier, and you will have to do a bit of trigonometry to determine the height of the lower mass.

__Hint #3__: Don't actually do this problem. Well okay, do it, but it's okay to stop when the Euler-Lagrange-ing gets sufficiently tedious. This is mostly an exercise in being able to write down the Lagrangian of a complicated system. You should check your work here.

### Conclusion

Hopefully this post gave you a glimpse of the power and elegance of the Lagrangian formulation of mechanics. Instead of fiddling around with Newton's second law, balancing forces and playing with trigonometry, we now have a much more mechanical\(^*\) technique for deriving the system's equations of motion: simply write down the Lagrangian and take a few partial derivatives. Not only is this process pretty foolproof, it is based on a very elegant and general minimization principle that is easily extended to quantum mechanics and general relativity. Furthermore, there are many interesting aspects of mechanics that become more transparent through the Lagrangian approach; in fact, this is where Lagrangian mechanics

*truly*shines! I hope to work through a few neat topics in the next few posts. I've always found one of the most fascinating aspects of Lagrangian mechanics to be how one can motivate conservation laws (such as conservation of energy and momentum) from simple symmetry principles (such as time-translational or translational invariances), so that's probably what I'll discuss next time.### Further reading

For a more complete treatment of the topics discussed here I strongly recommend Cornelius Lanczos' lucid The Variational Principles of Mechanics or by way of free online resources, John Baez's course notes or Susskind's Stanford lectures on YouTube. The more ambitious reader might choose to tackle Landau and Lifshitz's terse but elegant classic,

*Mechanics*.
* My puns are always intended

Image credits: links provided, otherwise from Wikipedia

Image credits: links provided, otherwise from Wikipedia