Hellenica World

# Lagrangian mechanics

Lagrangian mechanics is a re-formulation of classical mechanics using Hamilton's Principle of stationary action.[1] Lagrangian mechanics applies to systems whether or not they conserve energy or momentum, and it provides conditions under which energy and/or momentum are conserved.[2] It was introduced by the Italian-French mathematician Joseph-Louis Lagrange in 1788.

In Lagrangian mechanics, the trajectory of a system of particles is derived by solving the Lagrange equations in one of two forms, either the Lagrange equations of the first kind,[3] which treat constraints explicitly as extra equations, often using Lagrange multipliers;[4][5] or the Lagrange equations of the second kind, which incorporate the constraints directly by judicious choice of generalized coordinates.[3][6] The fundamental lemma of the calculus of variations shows that solving the Lagrange equations is equivalent to finding the path for which the action functional is stationary, a quantity that is the integral of the Lagrangian over time.

The use of generalized coordinates may considerably simplify a system's analysis. For example, consider a small frictionless bead traveling in a groove. If one is tracking the bead as a particle, calculation of the motion of the bead using Newtonian mechanics would require solving for the time-varying constraint force required to keep the bead in the groove. For the same problem using Lagrangian mechanics, one looks at the path of the groove and chooses a set of independent generalized coordinates that completely characterize the possible motion of the bead. This choice eliminates the need for the constraint force to enter into the resultant system of equations. There are fewer equations since one is not directly calculating the influence of the groove on the bead at a given moment.

Conceptual framework
Lagrangian and action

The Lagrangian is defined by [7]

$\mathcal{L} = T - V \,$

where T is the total kinetic energy and V is the total potential energy of the system.

The action \mathcal{S} is defined as the time integral of the Lagrangian: [8]

$\mathcal{S} = \int \mathcal{L}\,\mathrm{d}t.$

Hamilton's principle of stationary action

Let q0 and q1 be the coordinates at respective initial and final times t0 and t1. Using the calculus of variations, it can be shown the Lagrange's equations are equivalent to Hamilton's principle:

The system undergoes the trajectory between t0 and t1 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 (q0, t0) and (q1,t1) fixed. Hamilton's principle can be written as:

$\delta \mathcal{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, with any variation h of the functional giving an increase in the functional integral of the action. This is not, as is frequently misstated, required to be a maximum or a minimum of the action functional.

We can use this principle instead of Newton's Laws as the fundamental principle of mechanics, this allows us to use an integral principle (Newton's Laws are based on differential equations so they are a differential principle) as the basis for mechanics. However it is not widely stated that Hamilton's principle is a variational principle only with holonomic constraints, if we are dealing with nonholonomic systems then the variational principle should be replaced with one involving d'Alembert principle of virtual work. Working only with holonomic constraints is the price we have to pay for using an elegant variational formulation of mechanics.
Euler-Lagrange equations
Illustration of a generalized coordinate q for one degree of freedom, of a particle moving in a complicated path. Four possibilies of q for the particle's path are shown. For more particles each with their own degrees of freedom, there are more coordinates.

The equations of motion in Lagrangian mechanics are the Lagrange equations, also known as the Euler–Lagrange equations: [9] [10]

$\frac {d}{d t} \left ( \frac {\partial \mathcal L}{\partial \dot{q}_j} \right ) = \frac {\partial \mathcal L}{\partial q_j}$

where j is an index number from 1 to m representing the jth degree of freedom, $q_j$are the generalized coordinates, and $\dot{q}_j$ are the generalized velocities.

The Euler-Lagrange equations follow directly from Hamilton's principle, and are mathematically equivalent.
Lagrange equations of the second kind

For any system with m degrees of freedom, the Lagrange equations include m generalized coordinates and m generalized velocities. Below, we sketch out the derivation of the Lagrange equations of the second kind. Please note that in this context, V is used rather than U for potential energy and T replaces K for kinetic energy. See the references for more detailed and more general derivations.
D'Alembert's principle

Start with D'Alembert's principle for the virtual work of applied forces, \mathbf{F}_i, and inertial forces on a three dimensional accelerating system of n particles, i, whose motion is consistent with its constraints,[11]:269

$\delta W = \sum_{i=1}^n ( \mathbf {F}_{i} - m_i \mathbf{a}_i )\cdot \delta \mathbf r_i = 0.$

where

$\delta W$ is the virtual work;
$\delta \mathbf r_i$ is the virtual displacement of the system, consistent with the constraints;
$m_i$ are the masses of the particles in the system;
\mathbf a_i are the accelerations of the particles in the system;
$m_i \mathbf a_i$ together as products represent the time derivatives of the system momenta, aka. inertial forces;
i is an integer used to indicate (via subscript) a variable corresponding to a particular particle; and
n is the number of particles under consideration.

Break out the two terms:

$\delta W = \sum_{i=1}^n \mathbf {F}_{i} \cdot \delta \mathbf r_i - \sum_{i=1}^n m_i \mathbf{a}_i \cdot \delta \mathbf r_i = 0.$

Generalized coordinates

Assume that the following transformation equations from m independent generalized coordinates, q_j, hold:[11]:260

$\begin{array}{r c l} \mathbf{r}_1 &=& \mathbf{r}_1(q_1, q_2, \dots, q_m, t) \\ \mathbf{r}_2 &=& \mathbf{r}_2(q_1, q_2, \dots, q_m, t) \\ & \vdots & \\ \mathbf{r}_n &=& \mathbf{r}_n(q_1, q_2, \dots, q_m, t) \end{array}$

where m (without a subscript) indicates the total number of generalized coordinates. An expression for the virtual displacement (differential), \delta \mathbf{r}_i of the system for time-independent constraints or "velocity-dependent constraints" is[11]:264

$\delta \mathbf{r}_i = \sum_{j=1}^m \frac {\partial \mathbf {r}_i} {\partial q_j} \delta q_j,$

where j is an integer used to indicate (via subscript) a variable corresponding to a generalized coordinate.
Generalized forces

The applied forces may be expressed in the generalized coordinates as generalized forces, Q_j:[11]:265

$Q_j = \sum_{i=1}^n \mathbf {F}_{i} \cdot \frac {\partial \mathbf {r}_i} {\partial q_j}.$

Combining the equations for \delta W, \delta \mathbf{r}_i, and Q_j yields the following result after pulling the sum out of the dot product in the second term:[11]:269

$\delta W = \sum_{j=1}^m Q_j \delta q_j - \sum_{j=1}^m \sum_{i=1}^n m_i \mathbf{a}_i \cdot \frac {\partial \mathbf {r}_i} {\partial q_j} \delta q_j = 0.$

Substituting in the result from the kinetic energy relations to change the inertial forces into a function of the kinetic energy leaves[11]:270

$\delta W = \sum_{j=1}^m Q_j \delta q_j - \sum_{j=1}^m \left ( \frac {d}{d t} \left ( \frac {\partial T}{\partial \dot{q}_j} \right ) - \frac {\partial T}{\partial q_j} \right ) \delta q_j = 0.$

In the above equation, \delta q_j is arbitrary, though it is by definition consistent with the constraints. So the relation must hold term-wise:[11]:270

$Q_j = \frac {d}{d t} \left ( \frac {\partial T}{\partial \dot{q}_j} \right ) - \frac {\partial T}{\partial q_j}.$

If the \mathbf F_i are conservative, they may be represented by a scalar potential field, V:[11]:266 & 270

$\mathbf F_i = - \nabla V \Rightarrow Q_j = - \sum_{i=1}^n \nabla V \cdot \frac {\partial \mathbf {r}_i} {\partial q_j} = - \frac {\partial V}{\partial q_j}.$

The previous result may be easier to see by recognizing that V is a function of the \mathbf {r}_i, which are in turn functions of q_j, and then applying the chain rule to the derivative of V with respect to q_j.
Lagrange's equations

Since the potential field is only a function of position, not velocity, Lagrange's equations are as follows (using the same definition of the lagrangian above):

$\frac {d}{d t} \left ( \frac {\partial \mathcal L}{\partial \dot{q}_j} \right ) - \frac {\partial \mathcal L}{\partial q_j} = \frac{d}{d t}\left ( \frac {\partial T}{\partial \dot{q}_j} \right ) - \frac {\partial T}{\partial q_j} + \frac {\partial V}{\partial q_j} = 0 .$

This is consistent with the results derived above and may be seen by differentiating the right side of the Lagrangian with respect to \dot{q}_j and time, and solely with respect to q_j, adding the results and associating terms with the equations for \mathbf{F}_i and Q_j.
Dissipation function

In a more general formulation, the forces could be both potential and viscous. If an appropriate transformation can be found from the \mathbf F_i, Rayleigh suggests using a dissipation function, D, of the following form:[11]:271

$D = \frac {1}{2} \sum_{j=1}^m \sum_{k=1}^m C_{j k} \dot{q}_j \dot{q}_k.$

where C_{j k} are constants that are related to the damping coefficients in the physical system, though not necessarily equal to them

If D is defined this way, then[11]:271

$Q_j = - \frac {\partial V}{\partial q_j} - \frac {\partial D}{\partial \dot{q}_j}$

and

$0 = \frac {d}{d t} \left ( \frac {\partial \mathcal L}{\partial \dot{q}_j} \right ) - \frac {\partial \mathcal L}{\partial q_j} + \frac {\partial D}{\partial \dot{q}_j}.$

Kinetic energy relations

The kinetic energy, T, for the system of particles is defined by[11]:269

$T = \frac {1}{2} \sum_{i=1}^n m_i \mathbf {v}_i \cdot \mathbf {v}_i.$

The partial derivative of T with respect to the time derivatives of the generalized coordinates, \dot{q}_j, is[11]:269

$\frac {\partial T}{\partial \dot{q}_j} = \sum_{i=1}^n m_i \mathbf {v}_i \cdot \frac {\partial \mathbf {v}_i} {\partial \dot{q}_j}.$

The previous result may be difficult to visualize. As a result of the product rule, the derivative of a general dot product is

$\frac{d}{dx} ( \mathbf{f}(x) \cdot \mathbf{g}(x) ) = \mathbf{f}(x) \cdot \frac{d}{dx} \mathbf{g}(x) + \mathbf{g}(x) \cdot \frac{d}{dx} \mathbf{f}(x).$

This general result may be seen by briefly stepping into a Cartesian coordinate system, recognizing that the dot product is (there) a term-by-term product sum, and also recognizing that the derivative of a sum is the sum of its derivatives. In our case, \mathbf{f} and $\mathbf{g}$ are equal to $\mathbf{v}$, which is why the factor of one half disappears.

According to the chain rule and the coordinate transformation equations given above for $\mathbf{r}$, its time derivative, $\mathbf{v}$ , is[11]:264

$\mathbf{v}_i = \sum_{k=1}^m \frac {\partial \mathbf{r}_i}{\partial q_k} \dot{q}_k + \frac {\partial \mathbf{r}_i}{\partial t}.$

Together, the definition of $\mathbf v_i$and the total differential, $d \mathbf {r}_i,$ suggest that[11]:269

$\frac {\partial \mathbf {v}_i}{\partial \dot{q}_j} = \frac {\partial \mathbf {r}_i}{\partial q_j}$

since

$\frac {\partial } {\partial {\dot{q}_k}} {A}{\dot{q}_k} = A$

and that in the sum, there is only one \dot{q}_j.

Substituting this relation back into the expression for the partial derivative of T gives[11]:269

$\frac {\partial T}{\partial \dot{q}_j} = \sum_{i=1}^n m_i \mathbf v_i \cdot \frac {\partial \mathbf {r}_i}{\partial q_j}.$

Taking the time derivative gives[11]:270

$\frac {d}{d t} \left ( \frac {\partial T}{\partial \dot{q}_j} \right ) = \sum_{i=1}^n \left [ m_i \mathbf a_i \cdot \frac {\partial \mathbf {r}_i}{\partial q_j} + m_i \mathbf {v}_i \cdot \frac {d}{d t} \left ( \frac {\partial \mathbf {r}_i}{\partial q_j} \right ) \right ].$

Using the chain rule on the last term gives[11]:270

$\frac {d}{d t} \left ( \frac {\partial \mathbf {r}_i}{\partial q_j} \right ) = \sum_{k=1}^m \frac {\partial^2 \mathbf r_i}{\partial q_j \partial q_k} \dot{q_k} + \frac {\partial^2 \mathbf r_i}{\partial q_j \partial t}.$

From the expression for \mathbf v_i, one sees that also[11]:270

$\frac {\partial \mathbf {v}_i}{\partial q_j} = \sum_{k=1}^m \frac {\partial^2 \mathbf r_i}{\partial q_j \partial q_k} \dot{q_k} + \frac {\partial^2 \mathbf r_i}{\partial q_j \partial t}.$

This allows simplification of the last term,[11]:270

$\frac {d}{d t} \left ( \frac {\partial T}{\partial \dot{q}_j} \right ) = \sum_{i=1}^n \left [ m_i \mathbf a_i \cdot \frac {\partial \mathbf {r}_i}{\partial q_j} + m_i \mathbf {v}_i \cdot \frac {\partial \mathbf {v}_i}{\partial q_j} \right ].$

The partial derivative of T with respect to the generalized coordinates, q_j, is[11]:270

$\frac {\partial T}{\partial q_j} = \sum_{i=1}^{n} \frac { \partial [ \frac{1}{2} m_i {v_i}^{2} ] }{\partial q_j} = \sum_{i=1}^{n} \frac { \partial [ \frac{1}{2} m_i \ ( \mathbf {v}_i \cdot \mathbf {v}_i ) ] }{\partial q_j} = \! \frac{1}{2} \sum_{i=1}^{n} \left[ m_i \mathbf {v}_i \cdot \frac {\partial \mathbf {v}_i}{\partial q_j} + m_i \mathbf {v}_i \cdot \frac {\partial \mathbf {v}_i} {\partial q_j} \right] = \sum_{i=1}^{n}m_i \mathbf {v}_i \cdot \frac {\partial \mathbf {v}_i}{\partial q_j}.$

This last result may be obtained by doing a partial differentiation directly on the kinetic energy definition represented by the first equation. The last two equations may be combined to give an expression for the inertial forces in terms of the kinetic energy:[11]:270

$\frac {d}{d t} \left ( \frac {\partial T}{\partial \dot{q}_j} \right ) - \frac {\partial T}{\partial q_j} = \sum_{i=1}^n m_i \mathbf a_i \cdot \frac {\partial \mathbf {r}_i}{\partial q_j}.$

Old Lagrange's equations

Consider a single particle with mass m and position vector \mathbf{r}, moving under an applied force, \mathbf{F}, which can be expressed as the gradient of a scalar potential energy function V ( \mathbf{r},t):

$\mathbf{F} = - \mathbf{\nabla} V. \,$

Such a force is independent of third- or higher-order derivatives of $\mathbf{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 $\{ \mathbf{r}_j, \dot{ \mathbf{r}}_j | j = 1, 2, 3\}$, the Cartesian components of \mathbf{r} and their time derivatives, at a given instant of time (i.e. 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, $\dot{q_j}.$ The position vector, \mathbf{r}, is related to the generalized coordinates by some transformation equation:

$\mathbf{r} = \mathbf{r}(q_i , q_j , q_k, t). \,$

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

$\mathbf{r}(\theta, \dot{\theta} , t) = (\ell \sin \theta, \ell \cos \theta).$

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

Consider an arbitrary displacement \delta \mathbf{r} of the particle. The work done by the applied force $\mathbf{F}$ is $W = \mathbf{F} \cdot \delta \mathbf{r}$. Using Newton's second law, we write:

$\mathbf{F} \cdot \delta \mathbf{r} = m\ddot{ \mathbf{r}} \cdot \delta \mathbf{r}.$

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,

\begin{align} \mathbf{F} \cdot \mathbf{\delta} \mathbf{r} & = - \mathbf{\nabla} V \cdot \displaystyle\sum_i {\partial \mathbf{r} \over \partial q_i} \delta q_i \\[8pt] & = - \displaystyle\sum_{i,j} {\partial V \over \partial r_j} {\partial r_j \over \partial q_i} \delta q_i \\[8pt] & = - \displaystyle\sum_i {\partial V \over \partial q_i} \delta q_i. \end{align}

On the right hand side, carrying out a change of coordinates to generalized coordinates, we obtain:

$m \ddot{ \mathbf{r}} \cdot \delta \mathbf{r} = m \sum_{i,j} \ddot{r_i} {\partial r_i \over \partial q_j} \delta q_j$

Rearranging slightly:

$m \ddot{ \mathbf{r}} \cdot \delta \mathbf{r} = m \sum_j \left[ \sum_i \ddot{r_i} {\partial r_i \over \partial q_j} \right] \delta q_j$

Now, by performing an "integration by parts" transformation, with respect to t:

$m \ddot{ \mathbf{r}} \cdot \delta \mathbf{r} = m \sum_j \left[ \sum_i \left[ {\mathrm{d} \over \mathrm{d}t} \left( \dot{r_i} {\partial r_i \over \partial q_j} \right) - \dot{r_i} {\mathrm{d} \over \mathrm{d}t}\left( {\partial r_i \over \partial q_j} \right) \right] \right] \delta q_j$

Recognizing that ${\mathrm{d} \over \mathrm{d}t}{\partial r_j \over \partial q_i} = {\partial \dot{r_j} \over \partial q_i} and {\partial r_j \over \partial q_i} = {\partial \dot{r_j} \over \partial \dot{q_i}}$, we obtain:

$m \ddot{ \mathbf{r}} \cdot \delta \mathbf{r} = m \sum_j \left[ \sum_i \left[ {\mathrm{d} \over \mathrm{d}t} \left( \dot{r_i} {\partial \dot{r_i} \over \partial \dot{q_j}} \right) - \dot{r_i} {\partial \dot{r_i} \over \partial q_j} \right] \right] \delta q_j$

Now, by changing the order of differentiation, we obtain:

$m \ddot{ \mathbf{r}} \cdot \delta \ \mathbf{r} = m \sum_j \left[ \sum_i \left[ {\mathrm{d} \over \mathrm{d}t} {\partial \over \partial \dot{q_j}} \left( \frac{1}{2} \dot{r_i}^2 \right) - {\partial \over \partial q_j} \left( \frac{1}{2} \dot{r_i}^2 \right) \right] \right] \delta q_j$

Finally, we change the order of summation:

$m \ddot{ \mathbf{r}} \cdot \delta \mathbf{r} = \sum_j \left[ {\mathrm{d} \over \mathrm{d}t} {\partial \over \partial \dot{q_j}} \left( \sum_i \frac{1}{2} m \dot{r_i}^2 \right) - {\partial \over \partial q_j} \left( \sum_i \frac{1}{2} m \dot{r_i}^2 \right) \right] \delta q_j$

Which is equivalent to:

$m \ddot{ \mathbf{r}} \cdot \delta \mathbf{r} = \sum_i \left[{\mathrm{d} \over \mathrm{d}t}{\partial T \over \partial \dot{q_i}}-{\partial T \over \partial q_i}\right]\delta q_i$

where $T=\frac{1}{2}m\dot{ \mathbf{r}}\cdot\dot{ \mathbf{r}}$ is the kinetic energy of the particle. Our equation for the work done becomes

$\sum_i \left[{\mathrm{d} \over \mathrm{d}t}{\partial{T}\over \partial{\dot{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 $\delta q_i$, so we must have

$\left[ {\mathrm{d} \over \mathrm{d}t}{\partial{T}\over \partial{\dot{q_i}}}-{\partial{(T-V)}\over \partial q_i}\right] = 0$

for each generalized coordinate $\delta 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:

${\mathrm{d} \over \mathrm{d}t}{\partial{V}\over \partial{\dot{q_i}}} = 0.$

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

${\partial{\mathcal{L}}\over \partial q_i} = {\mathrm{d} \over \mathrm{d}t}{\partial{\mathcal{L}}\over \partial{\dot{q_i}}}.$

There is one Lagrange equation for each generalized coordinate qi. When qi = ri (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 6N generalized coordinates, related to the position coordinates by 3N transformation equations. In each of the 3N 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 not only may more appropriate generalized coordinates qi be chosen to exploit symmetries in the system, but constraint forces are replaced with simpler relations.
Examples

In this section two examples are provided in which the above concepts are applied. The first example establishes that in a simple case, the Newtonian approach and the Lagrangian formalism agree. The second case illustrates the power of the above formalism, in a case which is hard to solve with Newton's laws.
Falling mass

Consider a point mass m falling freely from rest. By gravity a force F = mg is exerted on the mass (assuming g constant during the motion). Filling in the force in Newton's law, we find \ddot x = g from which the solution

$x(t) = \frac{1}{2} g t^2$

follows (choosing the origin at the starting point). This result can also be derived through the Lagrangian formalism. Take x to be the coordinate, which is 0 at the starting point. The kinetic energy is T = 1⁄2mv2 and the potential energy is V = −mgx; hence,

$\mathcal{L} = T - V = \frac{1}{2} m \dot{x}^2 + m g x..$

Then

$0 = \frac{\partial \mathcal{L}}{\partial x} - \frac{\mathrm{d}}{\mathrm{d}t} \frac{\partial \mathcal{L}}{\partial \dot x} = m g - m \frac{\mathrm{d} \dot x}{\mathrm{d} t}$

which can be rewritten as $\ddot x = g$, yielding the same result as earlier.
Pendulum on a movable support

Consider a pendulum of mass m and length ℓ, which is attached to a support with mass M which can move along a line in the x-direction. Let x be the coordinate along the line of the support, and let us denote the position of the pendulum by the angle θ from the vertical.
Sketch of the situation with definition of the coordinates (click to enlarge)

The kinetic energy can then be shown to be

\begin{align} T &= \frac{1}{2} M \dot{x}^2 + \frac{1}{2} m \left( \dot{x}_\mathrm{pend}^2 + \dot{y}_\mathrm{pend}^2 \right) \\ &= \frac{1}{2} M \dot{x}^2 + \frac{1}{2} m \left[ \left( \dot x + \ell \dot\theta \cos \theta \right)^2 + \left( \ell \dot\theta \sin \theta \right)^2 \right], \end{align}

and the potential energy of the system is

$V = m g \operatorname{y}_\mathrm{pend} = - m g \ell \cos \theta .$

The Lagrangian is therefore

\begin{align} \mathcal{L} &= T - V \\ &= \frac{1}{2} M \dot{x}^2 + \frac{1}{2} m \left[ \left( \dot x + \ell \dot\theta \cos \theta \right)^2 + \left( \ell \dot\theta \sin \theta \right)^2 \right] + m g \ell \cos \theta \\ &= \frac{1}{2} \left( M + m \right) \dot x^2 + m \dot x \ell \dot \theta \cos \theta + \frac{1}{2} m \ell^2 \dot \theta ^2 + m g \ell \cos \theta \end{align}

Now carrying out the differentiations gives for the support coordinate x

$\frac{\mathrm{d}}{\mathrm{d}t} \left[ (M + m) \dot x + m \ell \dot\theta \cos\theta \right] = 0,$

therefore:

$(M + m) \ddot x + m \ell \ddot\theta\cos\theta-m \ell \dot\theta ^2 \sin\theta = 0$

indicating the presence of a constant of motion. Performing the same procedure for the variable \theta yields:

$\frac{\mathrm{d}}{\mathrm{d}t}\left[ m( \dot x \ell \cos\theta + \ell^2 \dot\theta ) \right] + m (\dot x \ell \dot \theta + g \ell) \sin\theta = 0;$

therefore

$\ddot\theta + \frac{\ddot x}{\ell} \cos\theta + \frac{g}{\ell} \sin\theta = 0.\,$

These equations may look quite complicated, but finding them with Newton's laws would have required carefully identifying all forces, which would have been much harder and more prone to errors. By considering limit cases, the correctness of this system can be verified: For example, \ddot x \to 0 should give the equations of motion for a pendulum which is at rest in some inertial frame, while \ddot\theta \to 0 should give the equations for a pendulum in a constantly accelerating system, etc. Furthermore, it is trivial to obtain the results numerically, given suitable starting conditions and a chosen time step, by stepping through the results iteratively.
Two-body central force problem

The basic problem is that of two bodies in orbit about each other attracted by a central force. The Jacobi coordinates are introduced; namely, the location of the center of mass R and the separation of the bodies r (the relative position). The Lagrangian is then[12][13]

\begin{align} \mathcal{L} &= T-U = \frac {1}{2} M \dot{\mathbf{R}}^2 + \left( \frac {1}{2} \mu \dot{\mathbf{r}}^2 - U(r) \right) \\ &= \mathcal{L}_{\mathrm{cm}} + \mathcal{L}_{\mathrm{rel}} \end{align}

where M is the total mass, μ is the reduced mass, and U the potential of the radial force. The Lagrangian is divided into a center-of-mass term and a relative motion term. The R equation from the Euler-Lagrange system is simply:

$M\ddot{\mathbf{R}} = 0, \,$

resulting in simple motion of the center of mass in a straight line at constant velocity. The relative motion is expressed in polar coordinates (r, θ):

$\mathcal{L}=\frac{1}{2} \mu \left(\dot r ^2 +r^2 \dot \theta ^2 \right) - U(r),$

which does not depend upon θ, therefore an ignorable coordinate. The Lagrange equation for θ is then:

$\frac {\partial \mathcal{L}}{\partial \dot \theta} = \mu r^2 \dot \theta = \mathrm{constant} = \ell, \,$

where ℓ is the conserved angular momentum. The Lagrange equation for r is:

$\frac{\partial \mathcal{L}}{\partial r} = \frac{d}{dt} \frac{\partial\mathcal{L}}{\partial \dot r}, \,$

or:

$\mu r \dot \theta ^2 -\frac {dU}{dr} = \mu \ddot r. \,$

This equation is identical to the radial equation obtained using Newton's laws in a co-rotating reference frame, that is, a frame rotating with the reduced mass so it appears stationary. If the angular velocity is replaced by its value in terms of the angular momentum,

$\dot \theta = \frac {\ell}{\mu r^2}, \,$

$\mu \ddot r = -\frac{dU}{dr} + \frac{\ell^2}{\mu r^3}. \,$

which is the equation of motion for a one-dimensional problem in which a particle of mass μ is subjected to the inward central force −dU/dr and a second outward force, called in this context the centrifugal force:

$F_{\mathrm{cf}} = \mu r \dot \theta ^2 = \frac {\ell^2}{\mu r^3}. \,$

Of course, if one remains entirely within the one-dimensional formulation, ℓ enters only as some imposed parameter of the external outward force, and its interpretation as angular momentum depends upon the more general two-dimensional problem from which the one-dimensional problem originated.

If one arrives at this equation using Newtonian mechanics in a co-rotating frame, the interpretation is evident as the centrifugal force in that frame due to the rotation of the frame itself. If one arrives at this equation directly by using the generalized coordinates (r, θ) and simply following the Lagrangian formulation without thinking about frames at all, the interpretation is that the centrifugal force is an outgrowth of using polar coordinates. As Hildebrand says:[15] "Since such quantities are not true physical forces, they are often called inertia forces. Their presence or absence depends, not upon the particular problem at hand, but upon the coordinate system chosen." In particular, if Cartesian coordinates are chosen, the centrifugal force disappears, and the formulation involves only the central force itself, which provides the centripetal force for a curved motion.

This viewpoint, that fictitious forces originate in the choice of coordinates, often is expressed by users of the Lagrangian method. This view arises naturally in the Lagrangian approach, because the frame of reference is (possibly unconsciously) selected by the choice of coordinates.[16] Unfortunately, this usage of "inertial force" conflicts with the Newtonian idea of an inertial force. In the Newtonian view, an inertial force originates in the acceleration of the frame of observation (the fact that it is not an inertial frame of reference), not in the choice of coordinate system. To keep matters clear, it is safest to refer to the Lagrangian inertial forces as generalized inertial forces, to distinguish them from the Newtonian vector inertial forces. That is, one should avoid following Hildebrand when he says (p. 155) "we deal always with generalized forces, velocities accelerations, and momenta. For brevity, the adjective "generalized" frequently will be omitted."

It is known that the Lagrangian of a system is not unique. Within the Lagrangian formalism the Newtonian fictitious forces can be identified by the existence of alternative Lagrangians in which the fictitious forces disappear, sometimes found by exploiting the symmetry of the system.[17]
Extensions of Lagrangian mechanics

The Hamiltonian, denoted by H, is obtained by performing a Legendre transformation on the Lagrangian, which introduces new variables, canonically conjugate to the original variables. This doubles the number of variables, but makes differential equations first order. 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 discovered the path integral formulation extending the principle of least action to quantum mechanics for electrons and photons. 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, and Fermat's principle in optics.

Canonical coordinates
Functional derivative
Generalized coordinates
Hamiltonian mechanics
Hamiltonian optics
Lagrangian analysis (applications of Lagrangian mechanics)
Lagrangian point
Non-autonomous mechanics
Restricted three-body problem

References

^ Goldstein, H. (2001). Classical Mechanics (3rd ed.). Addison-Wesley. p. 35.
^ Goldstein, H. (2001). Classical Mechanics (3rd ed.). Addison-Wesley. p. 54.
^ a b R. Dvorak, Florian Freistetter (2005). "§ 3.2 Lagrange equations of the first kind". Chaos and stability in planetary systems. Birkhäuser. p. 24. ISBN 3540282084.
^ H Haken (2006). Information and self-organization (3rd ed.). Springer. p. 61. ISBN 3540330216.
^ Cornelius Lanczos (1986). "II §5 Auxiliary conditions: the Lagrangian λ-method". The variational principles of mechanics (Reprint of University of Toronto 1970 4th ed.). Courier Dover. p. 43. ISBN 0486650677.
^ Henry Zatzkis (1960). "§1.4 Lagrange equations of the second kind". In DH Menzel. Fundamental formulas of physics. 1 (2nd ed.). Courier Dover. p. 160. ISBN 0486605957.
^ Torby1984, p.270
^ Analytical Mechanics, L.N. Hand, J.D. Finch, Cambridge University Press, 2008, ISBN 978 0 521 57572 0
^ Analytical Mechanics, L.N. Hand, J.D. Finch, Cambridge University Press, 2008, ISBN 978 0 521 57572 0
^ The Road to Reality, Roger Penrose, Vintage books, 2007, ISBN 0-679-77631-1
^ a b c d e f g h i j k l m n o p q r s t u Torby, Bruce (1984). "Energy Methods". Advanced Dynamics for Engineers. HRW Series in Mechanical Engineering. United States of America: CBS College Publishing. ISBN 0-03-063366-4.
^ John Robert Taylor (2005). Classical mechanics. University Science Books. p. 297. ISBN 189138922X.
^ The Lagrangian also can be written explicitly for a rotating frame. See Thanu Padmanabhan (2000). "§2.3.2 Motion in a rotating frame". Theoretical Astrophysics: Astrophysical processes (3rd ed.). Cambridge University Press. p. 48. ISBN 0521566320.
^ Louis N. Hand, Janet D. Finch (1998). Analytical mechanics. Cambridge University Press. pp. 140–141. ISBN 0521575729.
^ Francis Begnaud Hildebrand (1992). Methods of applied mathematics (Reprint of Prentice-Hall 1965 2nd ed.). Courier Dover. p. 156. ISBN 0486670023.
^ For example, see Michail Zak, Joseph P. Zbilut, Ronald E. Meyers (1997). From instability to intelligence. Springer. p. 202. ISBN 3540630554. for a comparison of Lagrangians in an inertial and in a noninertial frame of reference. See also the discussion of "total" and "updated" Lagrangian formulations in Ahmed A. Shabana (2008). Computational continuum mechanics. Cambridge University Press. pp. 118–119. ISBN 0521885698.
^ Terry Gannon (2006). Moonshine beyond the monster: the bridge connecting algebra, modular forms and physics. Cambridge University Press. p. 267. ISBN 0521835313.