Skip to main content
Physics LibreTexts

4.8: Lagrange’s Equations from Hamilton’s Principle Using Calculus of Variations

  • Page ID
    29550
  • \( \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}}\)

    We started with Newton’s equations of motion, expressed in Cartesian coordinates of particle positions. For many systems, these equations are mathematically intractable. Running the calculus of variations argument in reverse, we established Hamilton’s principle: the system moves along the path through configuration space for which the action integral, with integrand the Lagrangian \(\begin{equation}
    L=T-U
    \end{equation}\), is a minimum.

    We’re now free to begin from Hamilton’s principle, expressing the Lagrangian in variables that more naturally describe the system, taking advantage of any symmetries (such as using angle variables for rotationally invariant systems). Also, some forces do not need to be included in the description of the system: a simple pendulum is fully specified by its position and velocity, we do not need to know the tension in the string, although that would appear in a Newtonian analysis. The greater efficiency (and elegance) of the Lagrangian method, for most problems, will become evident on working through actual examples.

    We’ll define a set of generalized coordinates \(\begin{equation}
    q=\left(q_{1}, \ldots q_{n}\right)
    \end{equation}\) by requiring that they give a complete description of the configuration of the system (where everything is in space). The state of the system is specified by this set plus the corresponding velocities \(\begin{equation}
    \dot{q}=\left(\dot{q}_{1}, \ldots \dot{q}_{n}\right)
    \end{equation}\)

    For example, the x -coordinate of a particular particle a is given by some function of the \(\begin{equation}
    q_{i} \text { 's, }
    \end{equation}\)

    \(\begin{equation}
    x_{a}=f_{x_{a}}\left(q_{1}, \ldots q_{n}\right)
    \end{equation}\), and the corresponding velocity component \(\begin{equation}
    \dot{x}_{a}=\sum_{k} \frac{\partial f_{x_{a}}}{\partial q_{k}} \dot{q}_{k}
    \end{equation}\)

    The Lagrangian will depend on all these variables in general, and also possibly on time explicitly, for example if there is a time-dependent external potential. (But usually that isn’t the case.)

    Hamilton’s principle gives

    \begin{equation}
    \delta S=\delta \int_{t_{1}}^{t_{2}} L\left(q_{i}, \dot{q}_{i}, t\right) d t=0
    \end{equation}

    that is,

    \begin{equation}
    \int_{t_{1}}^{t_{2}} \sum_{i}\left(\frac{\partial L}{\partial q_{i}} \delta q_{i}+\frac{\partial L}{\partial \dot{q}_{i}} \delta \dot{q}_{i}\right) d t=0
    \end{equation}

    Integrating by parts,

    \begin{equation}
    \delta S=\left[\sum_{i} \frac{\partial L}{\partial \dot{q}_{i}} \delta q_{i}\right]_{t_{1}}^{t_{2}}+\int_{t_{1}}^{t_{2}} \sum_{i}\left(\frac{\partial L}{\partial q_{i}}-\frac{d}{d t}\left(\frac{\partial L}{\partial \dot{q}_{i}}\right)\right) \delta q_{i} d t=0
    \end{equation}

    Requiring the path deviation to be zero at the endpoints gives Lagrange’s equations:

    \begin{equation}
    \frac{d}{d t}\left(\frac{\partial L}{\partial \dot{q}_{i}}\right)-\frac{\partial L}{\partial q_{i}}=0
    \end{equation}


    This page titled 4.8: Lagrange’s Equations from Hamilton’s Principle Using Calculus of Variations is shared under a not declared license and was authored, remixed, and/or curated by Michael Fowler.

    • Was this article helpful?