# Euler-Lagrange equation on Lagrangian in generalized coordinates

• zhaos
In summary, the conversation discusses a derivation involving the Lagrangian in generalized coordinates and its relation to the Cartesian coordinates. It then delves into the kinetic and potential energy equations in Cartesian and generalized coordinates and the substitution of the Lagrangian into the Euler-Lagrange equation. The conversation concludes with a discussion on the Hamiltonian in generalized coordinates and its equations of motion. There is also a mention of a correction to the original equation.

## Homework Statement

I need some help understanding a derivation in a textbook. It involves the Lagrangian in generalized coordinates.

## Homework Equations

The text states that generalized coordinates {q_1, ..., q_3N} are related to original Cartesian coordinates $$q_\alpha = f_\alpha(\mathbf r_1, ..., \mathbf r_N)$$
Makes sense to me...
Velocities in general coordinates are, by the chain rule,
$$\dot{\mathbf r_i} = \sum_{\alpha=1}^{3N} \frac{\partial \mathbf r_i}{\partial q_\alpha} \dot{q_\alpha}$$
Ok so then kinetic energy in cartesian is
$$K = \frac{1}{2} \sum_{i=1}^N m_i \dot{r_i}^2$$
So KE in new velocities is then
$$\tilde{K}(q, \dot{q}) = \frac{1}{2} \sum_{\alpha=1}^{3N} \sum_{\beta=1}^{3N}[\sum_{i=1}^{N} m_i \frac{\partial \mathbf r_i}{\partial q_\alpha}\cdot \frac{\partial \mathbf r_i}{\partial q_\beta}] \dot{q_\alpha} \dot{q_\beta}$$
$$= \frac{1}{2} \sum_{\alpha=1}^{3N} \sum_{\beta=1}^{3N} G_{\alpha\beta}(q_1, ..., q_3N) \dot{q_\alpha} \dot{q_\beta}$$
where the text calls the expression in brackets the mass metric tensor.

Ok, so then given this new KE, the Lagrangian (KE - PE) is
$$L = \frac{1}{2} \sum_{\alpha=1}^{3N} \sum_{\beta=1}^{3N} G_{\alpha}{\beta}(q_1,...,q_{3N})\dot{q_\alpha} \dot{q_\beta} - U(\mathbf r_1(q_1,...,q_{3N}), ..., \mathbf r_N(q_1, ... , q_{3N}))$$

All of the above makes sense to me, but then the text substitutes the lagrangian into the Euler-lagrange equation and gets the equation of motion for each $q_\gamma, \gamma = 1, ... 3N$
$$\sum_{\beta=1}^{3N} G_{\gamma\beta}(q_1,...,q_{3N})\ddot{q_\beta} + \sum_{\alpha=1}^{3N} \sum_{\beta=1}^{3N} [\frac{\partial G_{\gamma\beta}}{\partial q_\alpha} - \frac{\partial G_{\alpha\beta}}{\partial q_\gamma} ]\dot{q_\alpha}\dot{q_\beta} = -\frac{\partial U}{\partial q_\gamma}$$

(Euler-lagrange: $\frac{d}{dt}(\frac{\partial L}{\partial \dot{q_\gamma}}) - \frac{\partial L}{\partial q_\gamma} = 0$)

## The Attempt at a Solution

Ok, so I can see where the first and third term in the equation of motion are coming from. The first is a result of $\frac{d}{dt}(\frac{\partial L}{\partial \dot{q_\gamma}})$ acting on the kinetic energy part of the Lagrangian. The third term is the result of $\frac{\partial L}{\partial q_\gamma}$ acting on the potential energy part of the Lagrangian. The mass metric tensor is a function of the q's, so I feel like the second term is coming from $\frac{\partial L}{\partial q_\gamma}$ acting on the kinetic energy term, but that's where I'm stuck.

Where does $\frac{\partial G_{\gamma\alpha}}{\partial q_\alpha}$ come from?

Last edited:
It comes from the total derivative with respect to t. $$\frac{d}{dt}G(q_1,...,q_{3N})=\sum{\frac{\partial G}{\partial q_k}\dot q_k}$$

ehild

1 person
That was tricky to see because of the way the terms were grouped.
I worked it through, and now I get it. Thank you.

Ok, so it goes on though. This text develops the Hamiltonian in generalized coordinates:
$$H(q_1, ... , q_{3N}, p_1, ..., p_{3N}) = \frac{1}{2} \sum_{\alpha=1}^{3N} \sum_{\beta=1}^{3N}p_\alpha G^{-1}_{\alpha\beta}(q_1,...,q_{3N}) p_\beta + U(\mathbf r_1(q1,...,q_{3N}),...,.\mathbf r_N(q1,...,q_{3N}))$$

And says Hamilton's equations of motion are
$$\dot{q}_\alpha = \frac{\partial H}{\partial p_\alpha},\ \ \ \dot{p}_\alpha = -\frac{\partial H}{\partial q_\alpha}$$

And how did they do that?!? This text is going to take me a while to get through if unless my math improves all of a sudden.

I tried $\frac{\partial H}{\partial p_\alpha}$, and I feel like it yields $\frac{1}{2} \sum_{\beta=1}^{3N} G^{-1}_{\alpha\beta}(q_1,...,q_{3N}) p_\beta = \frac{1}{2} \dot{q}_\alpha$. This equivalency was defined a bit before in the text, and I guess it makes sense. Partial derivative of H with respect to p_alpha should zero out everything except for the terms with p_alpha. But the factor of 1/2 remains.

I don't even know how to begin to obtain the second equation of motion.I was wondering if a book like this one, https://www.amazon.com/dp/0471198269/?tag=pfamazon01-20, would benefit me?

In my book, he derivation of the Hamilton function starts with defining the generalized momenta, as

$$p_i = \frac{\partial L}{\partial \dot q_i}$$.

With that definition, the Euler-Lagrange equations become

$$\dot p_i = \frac{\partial L}{\partial q_i}$$

Now you write up dL if t, qi and dot qi change by dt, dqi and d(dot qi). Using
$$p_i d \dot q_i = d ( p_i \dot q_i )-\dot q_i d p_i$$
And defining H as

$$H=\sum{p_i \dot q_i}-L$$.

The total derivative of H is

$$dH=-\frac{\partial L}{\partial t}dt - \sum{ \left (\dot p_id q_i - \dot q_i dp_i \right )}$$.

H is function of time t, and of the generalized coordinates qi and momenta pi. Compared with

$$dH=\frac{\partial H}{\partial t}dt+ \sum{ \left (\frac{\partial H}{\partial q_i} dq_i+\frac{\partial H}{\partial p_i}dp_i \right )}$$

you get the equations

$$\frac{\partial H}{\partial t}= -\frac{\partial L}{\partial t}$$

$$\dot q_i= \frac{\partial H}{\partial p_i}$$ and $$\dot p_i=-\frac{\partial H}{\partial q_i}$$

For conservative and scleronomic systems, H=T+V.

Last edited:
1 person
Hi there,
thanks for you reply. I was able to understand your derivation after some studying of it. It does seem that my book offered no indication of this sort of derivation though, which disappoints me.

Note. I wrote above that the Euler-Lagrange in generalized coordinates is:
$$\sum_{\beta=1}^{3N} G_{\gamma\beta}(q_1,...,q_{3N})\ddot{q_\beta} + \sum_{\alpha=1}^{3N} \sum_{\beta=1}^{3N} [\frac{\partial G_{\gamma\beta}}{\partial q_\alpha} - \frac{\partial G_{\alpha\beta}}{\partial q_\gamma} ]\dot{q_\alpha}\dot{q_\beta} = -\frac{\partial U}{\partial q_\gamma}$$
Which is verbatim from the text.
But it is actually,
$$\sum_{\beta=1}^{3N} G_{\gamma\beta}(q_1,...,q_{3N})\ddot{q_\beta} + \sum_{\alpha=1}^{3N} \sum_{\beta=1}^{3N} [\frac{\partial G_{\gamma\beta}}{\partial q_\alpha} - \frac{1}{2}\frac{\partial G_{\alpha\beta}}{\partial q_\gamma} ]\dot{q_\alpha}\dot{q_\beta} = -\frac{\partial U}{\partial q_\gamma}$$
Correction as seen here: http://www.nyu.edu/classes/tuckerman/stat.mechII/StatMech_errata_2nd.pdf

I was too busy reasoning out how the 1/2 term is not present for the first and second terms of the equation that I didn't realize that it was missing in the third term.

zhaos said:
(Euler-lagrange: ##\frac{d}{dt}(\frac{\partial L}{\partial \dot{q_\gamma}}) - \frac{\partial L}{\partial q_\gamma} = 0##)

How did you come to this equation? I derived Euler-Lagrange with Cartesian coordinates (i.e. ##\vec{r_i}##, ##\vec{v_i}##, as showed in that textbook) but there is no clue it should be valid for generalized coordinates ##q_{\gamma}, \dot{q_{\gamma}}##.

## 1. What is the Euler-Lagrange equation?

The Euler-Lagrange equation is a mathematical equation that describes the motion of a physical system in terms of its Lagrangian, which is a function that takes into account the system's kinetic and potential energies.

## 2. What are generalized coordinates?

Generalized coordinates are a set of independent parameters that describe the configuration of a physical system. They can be used instead of traditional Cartesian coordinates to simplify the mathematical description of a system's motion.

## 3. How is the Lagrangian expressed in terms of generalized coordinates?

The Lagrangian is expressed as a function of the generalized coordinates and their corresponding time derivatives, also known as generalized velocities. This allows for a more concise and elegant formulation of the equations of motion for a system.

## 4. How is the Euler-Lagrange equation derived?

The Euler-Lagrange equation is derived from the principle of least action, which states that the path taken by a system between two points in time is the one that minimizes the action, a quantity that is related to the system's total energy. By varying the action with respect to the system's generalized coordinates, the Euler-Lagrange equation is obtained.

## 5. What are the applications of the Euler-Lagrange equation?

The Euler-Lagrange equation has numerous applications in physics and engineering, particularly in the fields of classical mechanics, optics, and electromagnetism. It is a fundamental tool for solving problems involving the motion of particles and systems, and it also has applications in the study of fluid dynamics and quantum mechanics.