# Lagrangian mechanics

**Lagrangian mechanics** is a re-formulation of classical mechanics introduced by Joseph Louis Lagrange in 1788. In Lagrangian mechanics, the trajectory of an object is derived by finding the path which minimizes the action, a quantity which is the integral of the Lagrangian over time. The Lagrangian for classical mechanics is taken to be the difference between the kinetic energy and the potential energy.

This considerably simplifies many physical problems. For example, consider a bead on a hoop. If one were to calculate the motion of the bead using Newtonian mechanics, one would have a complicated set of equations which would take into account the forces that the hoop exerts on the bead at each moment.

The same problem using Lagrangian mechanics is much simpler. One looks at all the possible motions that the bead could take on the hoop and mathematically finds the one which minimizes the action. There are fewer equations since one is not directly calculating the influence of the hoop on the bead at a given moment.

## Contents

## Lagrange's equations

The equations of motion in Lagrangian mechanics are *Lagrange's equations*, also known as *Euler-Lagrange equations*. Below, we sketch out the derivation of Lagrange's equation from Newton's laws of motion. See the references for more detailed and more general derivations.

Consider a single particle with mass *m* and position vector **r**. The applied force, **F**, can be expressed as the gradient of a scalar potential energy function *V*(**r**, *t*):

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mathbf{F} = - \nabla V.}**

Such a force is independent of third- or higher-order derivatives of **r**, so Newton's second law forms a set of 3 second-order ordinary differential equations. Therefore, the motion of the particle can be completely described by 6 independent variables, or *degrees of freedom*. An obvious set of variables is { *r*_{j}, *r*′_{j} | *j* = 1, 2, 3}, the Cartesian components of **r** and their time derivatives, at a given instant of time (ie. position (x,y,z) and velocity (*v*_{x},*v*_{y},*v*_{z} ) ).

More generally, we can work with a set of **generalized coordinates**, *q*_{j}, and their time derivatives, the **generalized velocities**, *q*′_{j}. The position vector, **r**, is related to the generalized coordinates by some *transformation equation*:

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mathbf{r} = \mathbf{r}(q_i , q_j , q_k, t).}**

For example, for a simple pendulum of length *l*, a logical choice for a generalized coordinate is the angle of the pendulum from vertical, θ, for which the transformation equation would be

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mathbf{r}(\theta, \theta ', t) = (l \sin \theta, l \cos \theta)}**.

The term "generalized coordinates" is really a leftover from the period when Cartesian coordinates were the default coordinate system.

Consider an arbitrary displacement δ**r** of the particle. The work done by the applied force **F** is δW = **F** · δ**r**. Using Newton's second law, we write:

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{matrix} \mathbf{F} \cdot \delta \mathbf{r} & = & m\mathbf{r}'' \cdot \delta \mathbf{r}. \end{matrix}}**

Since work is a physical scalar quantity, we should be able to rewrite this equation in terms of the generalized coordinates and velocities. On the left hand side,

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{matrix} \mathbf{F} \cdot \delta \mathbf{r} & = & - \nabla V \cdot \sum_i {\partial \mathbf{r} \over \partial q_i} \delta q_i \\ \\ & = & - \sum_{i,j} {\partial V \over \partial r_j} {\partial r_j \over \partial q_i} \delta q_i \\ \\ & = & - \sum_i {\partial V \over \partial q_i} \delta q_i. \\ \end{matrix} }**

The right hand side is more difficult, but after some shuffling we obtain:

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle m \mathbf{r''} \cdot \delta \mathbf{r} = \sum_i \left[{d \over dt}{\partial T \over \partial q'_i}-{\partial T \over \partial q_i}\right]\delta q_i }**

where *T* = 1/2 *m* r′ ^{2} is the kinetic energy of the particle. Our equation for the work done becomes

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \sum_i \left[{d\over dt}{\partial{T}\over \partial{q'_i}}-{\partial{(T-V)}\over \partial q_i}\right] \delta q_i = 0. }**

However, this must be true for *any* set of generalized displacements δ*q*_{i}, so we must have

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \left[ {d\over dt}{\partial{T}\over \partial{q'_i}}-{\partial{(T-V)}\over \partial q_i}\right] = 0 }**

for *each* generalized coordinate δ*q*_{i}. We can further simplify this by noting that *V* is a function solely of **r** and *t*, and **r** is a function of the generalized coordinates and *t*. Therefore, *V* is independent of the generalized velocities:

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle {d\over dt}{\partial{V}\over \partial{q'_i}} = 0. }**

Inserting this into the preceding equation and substituting *L* = *T* - *V*, we obtain Lagrange's equations:

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle {\partial{L}\over \partial q_i} = {d\over dt}{\partial{L}\over \partial{q'_i}}. }**

There is one Lagrange equation for each generalized coordinate q_{i}. When q_{i} = r_{i} (i.e. the generalized coordinates are simply the Cartesian coordinates), it is straightforward to check that Lagrange's equations reduce to Newton's
second law.

The above derivation can be generalized to a system of *N* particles. There will be 6*N* generalized coordinates, related to the position coordinates by 3*N* transformation equations. In each of the 3*N* Lagrange equations, *T* is the total kinetic energy of
the system, and *V* the total potential energy.

In practice, it is often easier to solve a problem using the Euler-Lagrange equations than Newton's laws. This is because appropriate generalized coordinates *q*_{i} may be chosen to exploit symmetries in the system.

### Hamilton's principle

The action, denoted by *S*, is the time integral of the Lagrangian:

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle S = \int L\,dt.}**

Let *q _{0}* and

*q*be the coordinates at respective initial and final times

_{1}*t*and

_{0}*t*. Using the calculus of variations, it can be shown the Lagrange's equations are equivalent to

_{1}*Hamilton's principle*:

*The system undergoes the trajectory between t*_{0}and t_{1}whose action has a stationary value.

By *stationary*, we mean that the action does not vary to first-order for infinitesimal deformations of the trajectory, with the end-points (*q _{0}*,

*t*) and (

_{0}*q*,

_{1}*t*) fixed. Hamilton's principle can be written as:

_{1}**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \delta S = 0. \,\!}**

Thus, instead of thinking about particles accelerating in response to applied forces, one might think of them picking out the path with a stationary action.

Hamilton's principle is sometimes referred to as the *principle of least action*. However, this is a misnomer: the action only needs to be stationary, and the correct trajectory could be produced by a maximum, saddle point, or minimum in the action.

### Extensions of Lagrangian mechanics

The Hamiltonian, denoted by *H*, is obtained by performing a Legendre transformation on the Lagrangian. The Hamiltonian is the basis for an alternative formulation of classical mechanics known as Hamiltonian mechanics. It is a particularly ubiquitous quantity in quantum mechanics (see Hamiltonian (quantum mechanics)).

In 1948, Feynman invented the path integral formulation extending the principle of least action to quantum mechanics. In this formulation, particles travel every possible path between the initial and final states; the probability of a specific final state is obtained by summing over all possible trajectories leading to it. In the classical regime, the path integral formulation cleanly reproduces Hamilton's principle.

## See also

- Hamiltonian mechanics
- Functional derivative
- Nielsen form
- Canonical coordinates
- Generalized coordinates

## References

- Goldstein, H.
*Classical Mechanics,*second edition, pp.16 (Addison-Wesley, 1980)

- Moon, F. C.
*Applied Dynamics With Applications to Multibody and Mechatronic Systems*, pp. 103-168 (Wiley, 1998).

## External links

- Rychlik, Marek, "
*Lagrangian and Hamiltonian mechanics - A short introduction*" - Tong, David, Classical Dynamics Cambridge lecture notes

ca:Formulació lagrangiana de:Lagrange-Formalismus es:Mecánica lagrangiana fr:Équations de Lagrange id:Mekanika Lagrangian it:Meccanica lagrangiana ja:ラグランジュ力学 sl:Lagrangeeva formulacija gibalnih enačb zh:拉格朗日力学