Suppose I have a particle with mass $m$ situated on a frictionless line which we can model using $\mathbb{R}$. Suppose that we supply/push the particle $m$ with a force $f(t)$. Let the position of this mass be denoted as $p$. The particle moves horizontally along the line.

I wish to derive the equation $m \ddot p(t) = f(t)$ using Lagrangian mechanics.

To do this, I need to identify the kinetic and potential energy, and then substitute the Lagrangian into the Euler-Lagrange equation, which are from these slides on page 3: https://publish.illinois.edu/ece470-intro-robotics/files/2021/10/ECE470FA21Lec16.pdf

$$f= \dfrac{d}{dt} \dfrac{\partial L}{\partial \dot q}- \dfrac{\partial L}{\partial q}$$ where $f$ is the external force, $L$ is the Lagrangian, and $q$ is the generalized variable.

The kinetic energy is simple: $T = \dfrac{1}{2}m \dot p^2$. The external force is $f(t)$, which appears at the left-hand-side of my equation. However, I cannot figure out what is the potential energy $P$ in order to form $L$.

Please assist!

  • $\begingroup$ The particle moves horizontally along the line. $\endgroup$
    – Cesareo
    Jan 26 at 16:23

1 Answer 1


well it depends on whether that force is conservative or not. However, in both cases the result is the same. I will change your notation and use $q$ as coordinate.

a) Conservative force: In this case $f := -\partial P(q) / \partial q $. Thus applying the Euler-Lagrange equation to $L=T-P$, you obtain the result.

b) Non-conservative force: In this case $f := d(\partial L / \partial \dot{q}) /d{t} - \partial L / \partial q$ and $P:=0$ which implies $L=T$.

Note that the only different thing is how you interpret the origin of $f$ but the computations are the same. In general, a generalized force $f(q,\dot{q},t)$ can be written as $$ f(q,\dot{q},t) := d(\partial L / \partial \dot{q}) /d{t} - \partial L / \partial q, $$ which of course, includes conservative forces.

  • $\begingroup$ Thanks! I don't know too much about conservative force and non-conservative force. Can you provide some intuition how they differ in practice? $\endgroup$
    – Olórin
    Jan 26 at 16:38
  • 1
    $\begingroup$ Conservative forces are those who preserve energy and non-conservative allow for things like dissipation. An example of conservative force is the elastic force caused by a spring on a punctual mass. In this case $P(q)=q^2/2$ and the force is just $f=-q$. A standard example of non-conservative force is that produced by viscous friction. This force can be modelled as $f=-\dot{q}$ and cannot be derived from a potential $P(q)$. More generally, conservative forces can be derived from a generalized potential $P(q,\dot{q},t)$ applying $f=d(\partial P /\partial \dot{q}) /dt- \partial P / \partial q$. $\endgroup$ Jan 26 at 16:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .