The Lagrangian for a system of particles

We consider a system of particles. These particles can interact between them, but not with other particles that don't belong to this system. This is a closed system, or isolated system.

We know that, since they are interacting, we cannot express the L for the whole system as the sum of L's of the individual free particles. To this sum we must add a contribution that accounts for the interactions.

The way of doing this is through a potential energy U that only depends on the coordinates of the particles (and not on the velocities). So the total Lagrangian is

L = ∑(mₐ/2)vₐ²  -  U(|r₁>,|r₂>, ...).

As we see, L has two terms. The first term is the sum of the Lagrangians of each particle as if they were free particles, while the second term accounts for the interaction of the particles.

The first term can be considered the sum of the *kinetic energy* Tₐ of each particle, or as the total kinetic energy T of the system. The second term is NOT a sum. There is not a U for each particle. The potential term is a single term for all the system.

Since the interaction is described through U and since U only depends on the positions of the particles, a change in position in one particle is immediately felt by this term, which implies that the interaction travels at infinite speed. This is closely related to how Galileo's relativity principle deals with time, considering it as absolute.

If the speed of propagation of interaction were not infinite, following Galileo's transformations, such propagation would have different speeds in different frames. Then, laws of motion would be different in different inertial frames, something that would contradict the relativity principle.

We promised before to discuss the isotropy of time. Being time a one-dimensional variable, there are only two possible directions to consider: forward and backward in time. Are the laws of mechanics isotropic in time? This is equivalent to ask: are the laws of mechanics invariant if we revert the direction of time? If we take a look at the Lagrangian written above, we see that time does not appear in U. In the kinetic term it appears only through v²=dl²/dt², but, since it appears squared, it does not matter whether we use dt or -dt. Conclusion: time is isotropic according to this Lagrangian. This means that every motion we observer, as a succession of states, is possible to be observed in reverse order! All motions obeying the laws of classical mechanics are reversible.

Since we know the Lagrangian, we can apply E-L equations to know the equations of motion. ∂L/∂|vₐ> gives |vₐ>, so we get

mₐ|v̇ₐ> = -∂U/∂|rₐ> = -|∇>U.

These are Newton's equations. The right hand side is the (net) force acting on particle a

|F> = -|∇>U. 

The force, like the potential, depends only on coordinates, and not on velocities. Then, the acceleration, |a>=|v̇>, does not depend on velocities either. Using a and F we can write the famous

mₐ|aₐ> = |Fₐ>. 

The potential energy U does not care if you add to it an arbitrary constant: the equations of motion will not be affected by that, since applying |∇> to it, any constant will disappear.

In classical mechanics, we usually define the constant so that U=0 for when particles are infinitely separated, so that the interaction between them is negligible. It makes sense to define U=0 for when there is no interaction.

What if, instead of using Cartesian coordinates, we use generalised coordinates? If we transform from Cartesian to generalised with the transformation functions fₐ,

xₐ = fₐ(q₁, q₂, ..., qₛ),

then, the transformation for velocities is the expansion of the total time derivative for each f,

ẋₐ = ∑{k} (∂fₐ/∂qₖ)·q̇ₖ,

where ∑{k} means "sum over k".

We must substitute these expressions into our L = ∑(mₐ/2)(ẋₐ²+ẏₐ²+żₐ²)-U, which is not a simple calculation. We can write, in a simplified way,

L = (1/2) ∑{i,k} aᵢₖ(q)·q̇ᵢq̇ₖ - U(q).

We see how the functions aᵢₖ are only functions of coordinates. We also see that although the kinetic energy term is still a quadratic function of the velocities, now it depends on coordinates, unlike with Cartesian coordinates. In order to understand this better we may wait for some examples at the end of the chapter, where we will write some Lagrangians in coordinates that are not Cartesian.

What if we have a system A that is now allowed to interact with another system B? We say that the system A moves in an *external field* produced B, and vice versa. But we want to calculate the equations of motion for A, so what do we do? Which is the Lagrangian we are going to use?

Recall that the equations of motion are obtained by performing independent variations on each coordinate. This is equivalent to say that we interpret the rest of the quantities as given. So one approach to get the equations of motion for A is to use the Lagrangian L of the whole A+B but instead of using the coordinates of B as unknowns, we place them as given functions of time qB(t).

We assume that the system A+B is closed. Then we have L = T_A(q_A,q̇_A) + T_B(q_B,q̇_B) - U(q_A,q_B). Here we use _A as "subscript A". Were you tempted to write the potential energy part as -U(q_A) - U(q_B)? That would be correct only if particles from A would not interact with particles from B!

Now we substitute the variables q_B by known functions of time q_B(t). This changes the dependence. What before depended on q_B now depends on time only. And when a function depends only on time, it can always be expressed as a total derivative of time, which means we can ignore the term T_B(q_B,q̇_B) since it will not contribute to the equations of motion!

We get L_A = T_A(q_A,q̇_A) - U(q_A,q_B(t)), where by L_A we mean the Lagrangian of system A under the external field of B.

The difference wrt to our previous L_A is that now U explicitly depends on time (through q_B(t)).

For a single particle moving under an external field, we can write L = (m/2)v² - U(|r>,t). And the equation of motion is m|v̇> = -|∇>U or = -∂U/∂|r>. See how |U> does not operate on the t dependence of U.

If the force |F> felt by the particle due to a field is the same everywhere, we say that the field is *uniform*. For example, the gravitational field on the surface of Earth is, to an excellent approximation, a uniform field. Then, in this case, as -|∇>U = |F> = |constant>, U must be U = -<F|r>, since |∇> will operate on <F|r> by killing |r> and leaving <F| alone.

In practical applications, mechanical systems are comprised of many bodies which are connected by *constraints* (restrictions of motion). A constraint can restrict one or several degrees of freedom. This is so important that many engineering courses of mechanics are mainly based in the study of such constrained systems, with pulls, strings, hinges, etc.

If these constraints introduce *friction*, then the problem ceases to be a problem of pure mechanics. If, however, we consider idealised constraints, with no friction, the effect of such constraints is simply the reduction of degrees of freedom of the system.

Let's practise the writing of the Lagrangian for several mechanical systems. In each problem, what we are asked is to find the Lagrangian when the system is under a uniform gravitational field with acceleration g.

Problem 1: coplanar double pendulum

Two masses m₁ and m₂ hang from two strings of lengths l₁ and l₂ as shown in the figure. They hang from a fixed ceiling and the strings have negligible masses. The angles are taken wrt to the vertical direction. The hinge at the ceiling is the origin of coordinates O and the positive y axis goes down.

-------O----------------------------- x
       |\
       | \
       |__\ 
       | ϕ₁\ l₁
       |    \
       |     \
       |      ⚫ m₁
       |      ·`.
       |      ·__`.  l₂
       |      · ϕ₂ `. 
       |      ·      `.
       |      ·        `.
       |      ·          ⚫ m₂
       |
       |
       y

Our choice for coordinates is the set of angles ϕ₁ and ϕ₂. They are independent quantities and they are enough to establish the mechanical position of the system.

The speed of m₁ is v₁=l₁[ϕ₁·], so the kinetic energy T₁ = (m₁/2)l₁²[ϕ₁·]².

The two particles are not interacting through a field, so we can split U into U₁ and U₂.

The potential energy for 1 is U₁ = -m₁·g·l₁·cosϕ₁.

The potential energy for 2 is U₂ = -m₂·g·[l₁·cosϕ₁+l₂·cosϕ₂].

The most difficult part is to calculate the speed v₂. In Cartesian coordinates, v₂² = ẋ₂²+ẏ₂².

We already know y₂ = l₁cosϕ₁+l₂cosϕ₂, so ẏ₂=-l₁[ϕ₁·]sinϕ₁-l₂[ϕ₂·]sinϕ₂. The

Similarly, x₂ = l₁sinϕ₁+ l₂sinϕ₂, so ẋ₂=l₁[ϕ₁·]cosϕ₁+l₂[ϕ₂·]cosϕ₂.

We need to add the squares ẋ₂² + ẏ₂² now, and multiply the result by m₂/2 to give T₂:

T₂ = (m₂/2)·( l₁²[ϕ₁·]² + l₂²[ϕ₂·]² + 2l₁l₂[ϕ₁·][ϕ₂·](cosϕ₁cosϕ₂+sinϕ₁sinϕ₂) ).

We can simplify the last term a bit. Recall that

exp(i·ϕ₁)·exp(±i·ϕ₂) = exp[i·(ϕ₁±ϕ₂)].

From here, we can write

[cosϕ₁+i·sinϕ₁][cosϕ₂±i·sinϕ₂] = cos(ϕ₁±ϕ₂)+i·sin(ϕ₁±ϕ₂).

By taking the real part, we can see that

cosϕ₁cosϕ₂ ∓ sinϕ₁sinϕ₂ = cos(ϕ₁±ϕ₂).

We have done this in order to illustrate that there is no need to either memorise or use trigonometric tables.

Conclusion, the kinetic energy for 2 is

T₂ = (m₂/2)·( l₁²[ϕ₁·]² + l₂²[ϕ₂·]² + 2l₁l₂[ϕ₁·][ϕ₂·]cos(ϕ₁-ϕ₂) ).

We can now recollect L = T₁ + T₂ - U₁ - U₂.

Problem 2: sliding simple pendulum

A simple pendulum (meaning its string has no mass) of mass m₂ is hinged at the ceiling through a mass m₁ that can freely slide (no friction) along the x axis.

 <--x₁-> m₁
-O-----⚫----------------------------- x
 |     ·\
 |     · \
 |     ·__\ 
 |     · ϕ \ l
 |     ·    \
 |     ·     \
 |     ·      ⚫ m₂
 |     ·         
 |     ·
 y     

Clearly, the two best coordinates are x for m₁ and ϕ for m₂.

Again, L = T₁ + T₂ - U₁ - U₂.

You may think that m₁ and m₂ are interacting through the string, so that the total potential energy cannot be split. But while it is true that they are interacting, they are doing it through a constraint instead of a field, so that we can consider the two particles as non-interacting, but where the degrees of freedom are reduced. For example, the vertical translation of 1 is blocked, and the two translation dof of 2 are reduced to 1, since its radius wrt 1 is fixed.

We define the 0 of the potential energy at y=0, so U₁=0. And U₂=m₂·g·l·cosϕ.

The kinetic energy of 1 is T₁ = (m₁/2)·ẋ₁².

The most difficult part is T₂. We see that y₂ = lcosϕ and x₂ = x₁ + lsinϕ. Mind the sign of ϕ!

We compute the fluxions ẏ₂=-l[ϕ·]sinϕ and ẋ₂=ẋ₁+l[ϕ·]cosϕ.

Finally, T₂=(m₂/2)·( l²[ϕ·]² + ẋ₁² + 2ẋ₁l[ϕ·]cosϕ ).

Problem 3: simple pendulum with 3 types of support

Let's have a simple pendulum of mass m and length l. Now let's calculate L for three different types of point of support.

a) it moves uniformly on a vertical circle centred at the origin and of radius a with constant frequency γ.

         ,,-''''`-..
      ,-'         ' `._
     /         a '     \
    /           '       \
   |           '         |
   |          O------------------------ x
   ·          |          /
    \         |         /
     \        |        /
      `.      |      ,x
        `-._  |  _,-' ·\
            `'|''     · \
              |       ·__\ l
              |       · ϕ \
              |       ·    \
              |       ·     ⚫m₁
              y

Our coordinates are ϕ and t in this case. Given t and ϕ we can perfectly determine the position of the system.

The coordinates of the mass m are x=a·cos(γt)+lsinϕ and y=-a·sin(γt)+lcosϕ (remember positive y's look down).

Then, L = T - U where U = -m₁·g·a·sin(γt) + m₁·g·lcosϕ but the 1st term here is a function only of time, so we can omit it and take U = m₁glcosϕ.

For the kinetic energy we must do the fluxions of x and y.

We have ẋ = -aγsin(γt) + l[ϕ·]cosϕ and ẏ = -aγcos(γt) - l[ϕ·]sinϕ.

We now square them and add them to produce the kinetic energy. Every time we find a term that only depends on t we don't even bother writing it. If term is constant, then we also ignore it.

T = (m₁/2)·( l²[ϕ·]² - 2aγl[ϕ·](sin(γt)cosϕ - cos(γt)sinϕ) ).

The trigonometric term in parentheses can be simplified. But don't go to the tables yet! Remember the calculation we did before, where we only took the real part of

[cosϕ₁+i·sinϕ₁][cosϕ₂±i·sinϕ₂] = cos(ϕ₁±ϕ₂)+i·sin(ϕ₁±ϕ₂).

Now we can take only the imaginary part, which leads to

sinϕ₁cosϕ₂ ± cosϕ₁sinϕ₂ = sin(ϕ₁±ϕ₂).

This gives us

T = (m₁/2)·( l²[ϕ·]² - 2aγl[ϕ·]sin(γt-ϕ) )

T = (m₁/2)·( l²[ϕ·]² + 2aγl[ϕ·]sin(ϕ-γt) )

b) it oscillates horizontally in the plane of motion of the pendulum as x=a·cos(γt)

Here, the y₁ coordinate is lcosϕ, so U = m₁·g·l·cosϕ.

The x coordinate is x₁ = a·cos(γt) + l·sinϕ.

The fluxions are ẋ₁=-aγsin(γt) + l[ϕ·]cosϕ and ẏ₁=-l[ϕ·]sinϕ.

The kinetic energy is T = (m₁/2)·( l²[ϕ·]² - alγ[ϕ·]sin(γt)cosϕ ).

c) it oscillates vertically according to y = a·cos(γt).

The coordinates are x₁ = lsinϕ and y₁ = a·cos(γt) + lcosϕ, so U = m₁·g·(a·cos(γt)+lcosϕ). But we will omit the first term here.

The fluxions are ẋ₁ = -l[ϕ·]cosϕ and ẏ₂ = -aγsin(γt) - l[ϕ·]sinϕ.

The kinetic energy is T = (m₁/2)·( l²[ϕ·]² + 2alγ[ϕ·]sin(γt)sinϕ.

Problem 4:

As seen in the figure, m₂ moves constrained along the vertical axis and the whole system rotates around such axis with constant angular velocity Ω. Notice there are four rods of length l and that there are two masses m₁.

                    A
                   /|\
                  / | \
                 /  |  \
                /   |   \
               /____|    \
              /  θ  |     \
             /      |      \
            /       |       \
        l  /        |        \
          /         |         \
         /          |          \
        /           |           \
       /            |            \
      /             |             \
     /              |              \
    /     __/,,.....|....../___     \
   /,.--''  \       |      \   `'--..\
  ⬛ m₁             |                '⬛ m₁
   ._                               _,/
   \ `--...___\           ___\,..--' /
    \         /`''''''''''   /      /
     \              |              /
      \             |             /
       \            |            /
        \           |           /
         \          |          /
          \         |         /
       l   \        |        /
            \       |       /
             \      |      /
              \     |     /
               \    |    /
                \   |   /
                 \  |  /
                  \ | /
                   ⚫
                    m₂

In this case, the coordinates are θ and the azimuthal angle ϕ, which must not appear in the Lagrangian because the system is symmetric along the A axis. Specifically, Ω = [ϕ·].

The potential energy, if we take the U=0 at A, is U = 2m₁glcosθ + 2m₂glcosθ = 2(m₁+m₂)glcosθ.

The kinetic energy of m₂ is 2m₂·l²·[θ·]²sin²θ.

For each of the m₁'s we need to take into account that this problem is in 3d. We can use spherical coordinates from the origin set at A and write, for each m₁, T₁ = (m₁/2)·(l²[θ·]²+l²Ω²sin²θ).