17.2: Lagrangian Formulation
Another way to derive the equations of motion for classical mechanics is via the use of the Lagrangian and the principle of least action. The Lagrangian formulation is obtained by starting from the definition of the Lagrangian of the system:
\[ L = K - V, \label{18.2.1} \]
where \(K\) is the kinetic energy, and \(V\) is the potential energy. Both are expressed in terms of the coordinates \((q,\dot{q})\). Notice that for a fixed time, \(t\), \(q\) and \(\dot{q}\) are independent variables, since \(\dot{q}\) cannot be derived from \(q\) alone.
The time integral of the Lagrangian is called the action , and is defined as:
\[ S = \int_{t_1}^{t_2} L\, dt, \label{18.2.2} \]
which is a functional: it takes in the Lagrangian function for all times between \(t_1\) and \(t_2\) and returns a scalar value. The equations of motion can be derived from the principle of least action,\(^1\) which states that the true evolution of a system \(q(t)\) described by the coordinate \(q\) between two specified states \(q_1 = q(t_1)\) and \(q_2 = q(t_2)\) at two specified times \(t_1\) and \(t_2\) is a minimum of the action functional. For a minimum point:
\[ \delta S = \dfrac{dS}{dq}= 0 \label{18.2.3} \]
Requiring that the true trajectory \(q(t)\) minimizes the action functional \(S\), we obtain the equation of motion (Figure \(\PageIndex{1}\)).\(^2\) This can be achieved applying classical variational calculus to the variation of the action integral \(S\) under perturbations of the path \(q(t)\), Equation \ref{18.2.3}. The resulting equation of motion (or set of equations in the case of many dimensions) is sometimes also called the Euler—Lagrange equation:\(^3\)
\[ \dfrac{d}{dt}\left(\dfrac{\partial L}{\partial\dot q}\right)=\dfrac{\partial L}{\partial q}. \label{18.2.4} \]
Let’s apply the Lagrangian mechanics formulas to the same problem as in the previous Example.
Solution
The expression of the kinetic energy, the potential energy, and the Lagrangian for our system are:
\[ \begin{aligned} K &= \dfrac{1}{2}m\dot{q}^2 \\ V &= mGq \\ L &= K-V = \dfrac{1}{2}m\dot{q}^2 - mGq. \end{aligned} \nonumber \]
To get the equation of motion using Equation \ref{18.2.4}, we need to first take the partial derivative of \(L\) with respect to \(q\) (right hand side):
\[ \dfrac{\partial L}{\partial q}=-mG, \nonumber \]
and then we need the derivative with respect to \(t\) the derivative of the Lagrangian with respect to \(\dot{q}\) at the hand side:
\[ \dfrac{d}{dt}\dfrac{\partial L}{\partial \dot{q}} = \dfrac{d\left(\dfrac{1}{2}m\dot{q}^2 - mGq\right)}{dt}= m\ddot{q}. \nonumber \]
Putting this together, we get:
\[ \begin{aligned} m\ddot{q}&=-mG \\ \ddot{q} &= -G \\ \end{aligned} \nonumber \]
Which is the same result as obtained from the Newtonian method. Integrating twice, we get the exact same formulas that we can use the same way.
The advantage of Lagrangian mechanics is that it is not constrained to use a coordinate system. For example, if we have a bead moving along a wire, we can define the coordinate system as the distance along the wire, making the formulas much simpler than in Newtonian mechanics. Also, since the Lagrangian depends on kinetic and potential energy it does a much better job with constraint forces.
- Sometimes also called principle of stationary action, or variational principle, or Hamilton’s principle.︎
- This diagram is taken from Wikipedia by user Maschen, and distributed under CC0 license︎
- The mathematical derivation of the Euler—Lagrange equaiton is rather long and unimportant at this stage. For the curious, it can be found here.