Skip to main content
Chemistry LibreTexts

17.2: Lagrangian Formulation

  • Page ID
    416080
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    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} \]

    clipboard_ebea6b1fbc52d55d1b0315a4e83c9654b.png
    Figure \(\PageIndex{1}\): Principle of least action: As the system evolves, q traces a path through configuration space (only some are shown). The path taken by the system (red) has a stationary action under small changes in the configuration of the system.
    Example \(\PageIndex{1}\)

    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.


    1. Sometimes also called principle of stationary action, or variational principle, or Hamilton’s principle.︎
    2. This diagram is taken from Wikipedia by user Maschen, and distributed under CC0 license︎
    3. The mathematical derivation of the Euler—Lagrange equaiton is rather long and unimportant at this stage. For the curious, it can be found here.

    This page titled 17.2: Lagrangian Formulation is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Roberto Peverati.

    • Was this article helpful?