Lagrangian Mechanics Made Simple
Part 1

Ron Steinke <>

Lagrangian mechanics is mathematically equivalent to the usual Newtonian approach of "apply forces to things and see how they move." Instead of examining the forces on a body directly, it looks at the kinetic and potential energies of a system of objects. This approach simplifies many complicated problems, including things like waves in continuous media and orbital mechanics.

Since this series is meant to be of interest to game designers, we will initially focus on orbital mechanics. Later installments in this series will discuss motion in a rotating coordinate system, the Coriolis force, Kepler's equation for planetary orbits, and the stability of objects at the fourth and fifth Lagrange points. If there is sufficient interest, the series may be expanded to include other topics.

Basics and Notation

The reader is assumed to have some grasp of calculus, and at least a passing knowledge of what is meant by such quantities as velocity, acceleration, momentum, and kinetic and potential energy.

We adopt the usual physics convention of using a "dot" to represent a time derivative. That is, instead of writing

v = \frac{dx}{dt}
\end{displaymath} (1)

to indicate that the velocity is the derivative of the position with respect to time, we write
v = \dot x \,.
\end{displaymath} (2)

A second derivative is indicated by two dots, so the acceleration is
a = \frac{d^2x}{dt^2} = \ddot x \,.
\end{displaymath} (3)

Since we will be dealing with multiple variables, we also use partial derivatives,

\frac{\partial f(a, b)}{\partial a} \,.
\end{displaymath} (4)

This is merely a tricky way of saying "take the derivative of $f$ with respect to $a$, treating $b$ like a constant."

Lagrange's Equation

The core of Lagrangian mechanics is a quantity called the Lagrangian. Consider a system with one possible direction of motion, denoted by the position variable $x$. The kinetic energy may, depending on the coordinate system used, depend on both the position and velocity of the object, so we write it as $T(x, \dot x)$. Similarly, we write the potential energy of the system as $U(x, \dot x)$. The Lagrangian is given by the equation

L(x, \dot x) = T(x, \dot x) - U (x, \dot x) \,.
\end{displaymath} (5)

The dynamics of the system are determined by an "equation of motion." This is given by Lagrange's equation,
\frac{d}{dt} \frac{\partial L}{\partial \dot x} = \frac{\partial L}{\partial x}
\end{displaymath} (6)

Some Simple Examples

To get some idea of what this means, consider the case of an object with height $x$ falling under the influence of gravity. The kinetic energy of the object only depends on the velocity $\dot x$,

T(\dot x) = \frac{1}{2} m \dot x^2 \,,
\end{displaymath} (7)

while the potential energy only depends on the height $x$,
U(x) = mgx \,.
\end{displaymath} (8)

Lagrange's equation (6) contains partial derivatives of the Lagrangian with respect to the position and velocity of the object. Since the potential energy is independent of the velocity, the derivate of $L$ with respect to $\dot x$ reduces to the derivative of the kinetic energy,
\frac{\partial L}{\partial \dot x} = \frac{dT}{d \dot x} = m \dot x \,.
\end{displaymath} (9)

Similarly, the derivative of the Lagrangian with respect to the position $x$ is
\frac{\partial L}{\partial x} = -\frac{dU}{dx} = -mg \,.
\end{displaymath} (10)

Plugging these quantities into Eq. (6) gives
m \ddot x = -m g \,,
\end{displaymath} (11)

which shows that the object is falling with acceleration $g$. The minus sign indicates that the object is falling down, instead of up.

The above example can be generalized to motion in an arbitrary potential $U(x)$. In this more general case, the equation of motion (11) is replaced by the more general

m \ddot x = - \frac{dU}{dx} \,.
\end{displaymath} (12)

The derivative $- \frac{dU}{dx}$ is the force on the object, the minus sign indicating that the force points away from regions of higher potential energy. This is Newton's classic equation $F=ma$1

These examples are fairly basic, and don't really reveal the full power of the Lagrangian. We'll examine some more interesting cases in the next installment.