Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 19

Lagrangian Formulation with Generalized Coordinates

Recommended resources

Introduction

Welcome back! In our last lesson, you saw how the entirety of classical mechanics can be derived from a single, profound idea: the Principle of Stationary Action. By demanding that the "action" integral be stationary, we derived the Euler-Lagrange equation. However, we only applied it using standard Cartesian coordinates, which, as we saw, simply reproduced Newton's laws.

Today, we unlock the true potential of this framework. The real power of Lagrangian mechanics lies in its independence from any particular coordinate system. This lesson is dedicated to mastering the art of formulating the Lagrangian using generalized coordinates. These are coordinates tailored to the geometry of the problem, allowing us to describe complex systems like pendulums, rotating objects, and constrained particles with remarkable ease.

Our goal is to learn the systematic procedure for constructing the Lagrangian for any mechanical system, a crucial skill that transforms complicated vector-force problems into a straightforward, almost algorithmic process based on scalar energies.


1. From Cartesian Coordinates to Generalized Coordinates

The primary motivation for moving beyond Cartesian coordinates is to simplify the description of a system. For a simple pendulum, describing the motion with and is clumsy because you also need to enforce the constraint . It's far more natural to use a single angle, . This angle is an example of a generalized coordinate.

Generalized Coordinates for an Elastic Pendulum
This diagram shows an elastic pendulum. Its configuration can be described by Cartesian coordinates (x, y) along with a constraint, or more naturally by two generalized coordinates: the angle \(\theta\) and the spring's extension \(u\). The Lagrangian method allows us to work directly with these more convenient coordinates.

To formalize this, we need two key concepts:

  1. Degrees of Freedom (DoF): The number of independent variables required to completely specify the configuration of a system. A free particle in 3D has 3 DoF. A rigid dumbbell in 3D has 5 DoF (3 for position of center of mass, 2 for orientation).
  2. Constraints: Physical limitations on the motion of a system. A bead on a wire is constrained to move along the wire. A pendulum bob is constrained to maintain a fixed distance from its pivot. Each holonomic constraint (a constraint expressible as an algebraic equation relating coordinates, e.g., ) reduces the number of DoF by one.

Generalized Coordinates, denoted , are a set of independent variables, where is the number of DoF, that uniquely defines the state of the system. They can be lengths, angles, or any other convenient quantity.

The following video provides a rigorous discussion of these concepts, including how to determine the number of DoF for various systems.

Lagrange's Equations Intro, Generalized Coordinates, Constraints, Degrees of Freedom, Lecture 17

This lecture by Dr. Shane Ross offers a formal introduction to generalized coordinates, constraints, and degrees of freedom. It provides a systematic way to think about how many coordinates you need and the freedom you have in choosing them.

Watch the segments from 12:00 to 20:35 and 27:43 to 51:51. The first part formally defines generalized coordinates. The second, longer part is crucial: it explains how to calculate the number of degrees of freedom (DoF) for a system with N particles and k constraints (DoF = 3N - k) and works through several examples, such as a particle on a curve, a rigid rod, and a rigid body. This will build your intuition for analyzing new systems.


2. The Procedure for Formulating the Lagrangian

Now that we understand the concept of generalized coordinates, we can establish a universal recipe for writing down the Lagrangian of any mechanical system.

The General Steps:

  1. Analyze the System: Determine the number of particles (N) and identify all holonomic constraints (k). Calculate the number of degrees of freedom: (for 3D motion).
  2. Choose Generalized Coordinates: Select a set of independent coordinates that conveniently describe the system's configuration.
  3. Express Cartesian Positions: Write the Cartesian coordinates of each particle in the system as functions of your chosen generalized coordinates and time: , etc.
  4. Find Cartesian Velocities: Differentiate the position expressions with respect to time to find the velocity components in terms of the generalized coordinates and their time derivatives . This step usually involves the chain rule.
  5. Calculate Kinetic Energy (T): Form the total kinetic energy . Substitute the velocity expressions from Step 4. The result will be .
  6. Calculate Potential Energy (V): Form the total potential energy . Substitute the position expressions from Step 3. The result will be .
  7. Construct the Lagrangian: The Lagrangian is simply .

Let's illustrate this with the classic simple pendulum.

  • Step 1: 1 particle, 2 constraints (motion in a plane, say , and fixed length ). DoF = 3(1) - 2 = 1.
  • Step 2: Choose one generalized coordinate, the angle .
  • Step 3: Let the pivot be at the origin. , .
  • Step 4: , .
  • Step 5: .
  • Step 6: Using the pivot as the zero potential level, .
  • Step 7: .

This is the Lagrangian for a simple pendulum. Notice how the constraints are automatically satisfied by our choice of coordinate, and we are left with a simple expression involving only one variable. The following resource provides several more clean examples.

Lagrangian Dynamics

These notes from the University of Cambridge provide several excellent, concise examples of formulating the Lagrangian for systems with one or more degrees of freedom. We will focus on the clear examples for the pendulum and a particle in 2D.

Read sections 4.1.1 ('Simple pendulum') and 4.2.2 ('Particle in 2-D'). The pendulum example reinforces what we just did. The particle in 2-D is particularly insightful, as it derives the Lagrangian in both Cartesian and polar coordinates, showing how the form of T changes while the physics remains the same. This highlights the power and flexibility of the method.


3. A Complete Worked Example: The Cylindrical Pendulum

The procedure works just as well for more complex systems involving both translation and rotation. Let's walk through a complete derivation for a rigid cylinder suspended by a string, which can swing like a pendulum and also rotate about its own axis.

This video breaks down the process meticulously, from choosing coordinates to deriving the final Lagrangian.

Lagrangian Mechanics II: Degrees of freedom, generalized coordinates and a cylinder

The channel Physics Fluency provides a rigorous step-by-step derivation of the Lagrangian for a cylindrical pendulum. This is an excellent example of a system with multiple, coupled degrees of freedom.

Watch the video from the beginning (00:12) to 10:54. The first part (to 5:45) focuses on identifying the DoF and choosing the generalized coordinates ( heta_1 and heta_2). The second part (5:45 - 9:47) details the derivation of the kinetic energy, T, which includes both translational and rotational components. The third part (9:47 - 10:35) derives the potential energy, V. Finally, it combines them to give the full Lagrangian. Follow the mathematical steps closely; this is a perfect application of the general procedure we outlined.

Test your understanding!

A particle of mass is constrained to move on the surface of a cone with its vertex at the origin, its axis along the z-axis, and a constant half-angle . Gravity acts in the direction.

  1. Identify the number of degrees of freedom for the particle.
  2. Choose a set of generalized coordinates.
  3. Following the 7-step procedure, derive the Lagrangian for the system.

(Hint: Cylindrical coordinates are a good starting point, but they are not independent due to the constraint.)

Show answer
  1. DoF: The particle can move freely in 3D (3 DoF), but it has one constraint: it must stay on the cone's surface. So, DoF = 3 - 1 = 2.

  2. Generalized Coordinates: The particle's position on the cone can be uniquely specified by its distance from the z-axis, , and its azimuthal angle, . So we choose and .

  3. Derive Lagrangian:

    • Position: In cylindrical coordinates, the constraint equation is . The Cartesian positions are:
    • Velocity: Differentiate with respect to time (using the product rule):
    • Kinetic Energy (T): . Squaring and adding the velocity components:
      • So,
      • Using the identity , we get:
    • Potential Energy (V): .
    • Lagrangian (L): .

Conclusion

Today, we've taken the abstract formalism of the Euler-Lagrange equation and turned it into a concrete, powerful tool for analyzing physical systems. You now have a systematic method to tackle complex mechanics problems that might be intractable using Newtonian force analysis.

Key Takeaways:

  • Generalized Coordinates () are any set of independent variables, equal in number to the system's degrees of freedom, that uniquely specify its configuration.
  • The choice of coordinates is flexible; we choose them to simplify the problem and automatically satisfy constraints.
  • We have a 7-step procedure to derive the Lagrangian : choose coordinates, write Cartesian positions in terms of them, find velocities, and then assemble the kinetic and potential energies.
  • The resulting Lagrangian, , is a scalar function that contains all the dynamical information of the system.

Preview of the Next Lesson:
We have successfully mastered the art of formulating the Lagrangian. The next logical step is to use it. In our next lesson, we will take the Lagrangians we've learned to construct, plug them into the Euler-Lagrange equation , and derive the full equations of motion for these systems. This is where we will see the elegant mathematics translate into concrete predictions about how systems evolve in time.