Concept Deep Dive: Lagrangian Mechanics

I'll be honest: Having this website has been a great study tool for me. It feeds the goblin-part of my brain that likes to have its reward now, and not eventually, when the exam is done. That means, it makes me actually get stuff done, even if there's the occasional error in there that I might have caught, had I proof-read the LaTeX document. Anyways, sometimes solving problems from books just doesn't cut it and I have to do a little more work to help myself get comfortable explaining the bigger picture things. This is that. I'm not sure yet, whether this will become a regular thing, but I don't see why not, if it's in any way helpful. I'll crank a few of these out now though, so I can get through the topics that I really want to get through.

Lagrangian: What and Why

Lagrangian mechanics are a way of looking at mechanics that is a little advanced past the Newtonian approach which is perfectly fine for simple problems. Lagrangian mechanics still operate under the same basic assumptions that Newtonian mechanics does, but it chiefly uses an approach for energy conservation derived through the minimization of the action functional. How that works, I'll detail in the next segment.

From there it's usually easy to exploit either the geometric constraints to directly minimize the motion in question and get actionable equations of motion, or (more conveniently) apply the special case of the Euler equations to get a differential equation. The most common applications are harmonic oscillators, which reappear again and again all throughout physical models of more complex systems.

What is a Functional and the (abridged) Road to the Lagrangian

Functionals are maybe best described by "functions of functions". In physics, most advanced quantities could be (and occasionally are) described in the form of a functional. Generally, mechanics has a few basics tenets that are universal and also relatively intuitive. One might know them in the form of Newtonian Axioms, but the more elegant version is the principle of least action, which is also known as the Hamiltonian principle. It's really what it sounds like: Any sort of system operates in a way, such that it minimizes its action at all points on the coordinate system (and at all times). In terms of numbers, that gives

with the action of the system S. From here, it might be interesting to know the definition of the Action, which just so happens to include the Lagrangian relatively handily.

If one isn't too happy with assuming the definition of the action functional, one could alternatively arrive at the integral and its evaluation to null through the generalized forces and once again going through the Euler equations. I'll circle back to this later though, for now, it should suffice to know this definition to understand where things go next. It's also important to note that, since we're looking for equations of motion and the coordinates q and their time derivatives are functions of time. I omitted their explicit dependencies in the formula for legibility.

Since the variation (delta) is not a function of time by design, it can be pulled into the integral and directly applied to the Lagrangian. Then, only the definition needs to be applied. For this, we treat the variation as an infinitesimal derivative. From this, it follows that

It's now handy to inspect that second variation in the sum, to maybe get rid of it and find easier terms to express it in. The best way to do that will end us up with a total derivative with respect to time.

This would cancel with the integral and remove the second part of the sum from the integral. Taking the total time derivative of the entire expression (which should still be zero) then gives the second Euler-Lagrange equation. Below the computation in detail.

One of the chief strengths of Lagrangian (and later Hamiltonian) mechanics is their operation through generalized quantities. Newtonian mechanics is usually done within the confines of cartesian coordinates (though it doesn't have to be), but it helps to formulate quantities like coordinates in a generalized form so to not have to worry about appropriate transformations until some freak occurrence forces us to.

As should have become clear already, the generalized coordinates are denoted by the various q's, and their velocities with their time derivatives. This is just notation, which is fine enough. Keep in mind that in general, we assume Einstein convention and so we omit the sum and indices to keep our equations nice and legible.

Since there's usually more than one coordinate axis in play in most systems, we like to have a few restrictions to keep things simple. One such restriction is for the coordinates be pairwise independent. You'll want this to be true for Einstein convention to make sense, for example, and to not get mixed terms in derivation, which will blow up in your face during application.

Ultimately, the Lagrangian has two components, which are always separable. One is the kinetic term T and one is the potential term V. That makes sense intuitively, through the definition of the action, we should know that it's an Energy term, and any physical system in mechanics has a potential term (or rather, all physical systems have one) and since we expect this system to move, there will be a kinetic term as well. Further, we're mainly interested in the motion part. Remember, action is only really interested in motion, so we'll want to subtract the potential energy from our considerations.

Knowing this, it makes sense to look at how these two look in terms of generalized coordinates. The potential is very dependent on the system, so we can't make any useful statements about that quite yet. However, what we can do is use the velocities of our generalized coordinates to express the kinetic term. Kinetic energy has a set definition, being

where r is the coordinate vector. In generalized coordinates, this is made relatively easy then, by utilizing the Einstein convention.

How this looks in detail, we'll have to be flexible about, because in the end we'll want to find convenient coordinates anyway, and that might include transformations. I don't think it'll be too interesting to go through that here, so I'll leave that until we get to that example all the way down at the bottom. Suffice it to say, that coordinate transformations from one coordinate system to the next produces some factor

where r is the old coordinate, q the new one. Generally then, assuming we know the old Forces (F), we can translate them to a general one (Q).

For some generalized potential, there is a handy relation that is usually used for conservative systems. Going by the rigorous proof, one would first have to receive the different parts of the second Euler-Lagrange, conveniently split into the potential part (in conservative systems) and kinetic part (in non-conservative systems). Both are equated to the generalized force.

Euler's Equation

I've been mentioning Euler's equation a lot before and it's probably time to write it down, so we know what it does and why it's so ubiquitous around this topic. For some function f(x,y) where x and y have some dependence with one another, the following is true

This looks really familiar, doesn't it? Why we like to apply this to the Lagrangian, is that for each coordinate q, we have a dependency of a time derivative of q, and generally a time dependency of the Lagrangian. In a way, one could holistically apply Euler's equation to the Lagrangian without going via the action functional or the generalized forces, but this is not really something I like to do as a way to arrive at the Euler-Lagrange equation II, because it's a little bit fumbly and not very concise. Still, it's pretty good to have handy whenever you forget the second Lagrangian and need to get there fast.

Where's the First?

No, that's not me butchering the Abbott & Costello Who's on First bit. This is a genuine question here. We've arrived at the second Euler-Lagrange equation relatively painlessly, right? But if that's the second Euler-Lagrange, what's the first one?

Well, I'm going to be frank and tell you that I've had difficulties applying this guy correctly, but that makes it all the more important to do this write-up here. It's good to remember in what case this is even useful. Using the second Euler-Lagrange presupposes that we either know the Energies present in the system, or the Lagrangian directly. If we can't construct that directly though, we have to go back to basics, as it were.

Non-free systems have some geometric constraints f, written in terms of coordinates and derivatives, along with the occasional definition for constants. These can be written as an expression evaluating to zero. Now, we could hypothetically use the second Euler-Lagrange in the form where it evaluates to zero and equate it to the sum of those constraints. Then, since we would like for the constraints to remain intact under some of the derivations, we add what we call a Lagrange Multiplier to the front of the constraint. It will multiply with zero, so it doesn't actually change anything.

with various restraints f. If we don't know the right side of the equation it makes sense to just set it to zero and proceed from there. What we do know, from the fact that it's the Euler-Lagrange on the right, is that the left side should have the same dimensions for the equation to make sense. The constraints may be heterogeneous in dimension, so the Lagrange multipliers will do the work for us there. In the end, the sum will have to be some kind of force. We call that a constraint force, which is a bit misleading, since it's not a real force and more just a happy coincidence. However, we will treat it as if it were a real force, even though it can't ever do any actual work, and equate it with Newton's equation for force: F = ma. Split into coordinates, this will give a system of equations that will suffice to get to the equations of motion.

Momentum Conservation

There's been a lot of talk about the Lagrangian now, and that's nice to have and all. Equations of motion are good descriptors, but the Lagrangian can do another fun little thing that makes handling it a joy to the more lazy-minded (like me). Since the Lagrangian has dependencies of coordinates and velocities, one could also say it has dependencies of coordinates and their momenta, since p = mv. Through the explicit use of the Lagrangian as a quantity, one can thus define a generalized momentum.

Now, indulge me and let's assume this evaluates to zero. Then, we automatically get

This tells us that the Lagrangian does not depend on the coordinate q at all, and which would make p a constant. This is equivalent to momentum conservation for p within the system, which is a good news for us, considering momentum need not always be conserved.

Harmonic Oscillator

Assume some harmonic oscillator. Knowing about the potential of the general harmonic oscillator makes construction of its Lagrangian relatively easy.

Now, using the second Euler-Lagrange, one can receive a differential equation which is quickly solved by an educated guess, utilizing our knowledge that an oscillator better be periodical in some way.

This is good enough to arrive at concrete solutions given 2 starting conditions: One to identify each of the constants.

Previous
Previous

Concept Deep Dive: Hamiltonian Mechanics