# Lagrangian Dynamics

Lagrangian dynamics are an alternative to Newtonian mechanics. Lagrangian dynamics are particularly useful in solving for the equations of a motion of a system operating under constraints. Often it is possible, using Lagrangian dynamics, to solve for the equations of motion for a system without needing to solve for the constraint forces, which is why they are often preferred over Newtonian mechanics for these types of problems. It is important to note that both methods will yield the same end result, the only thing that changes is the method of arriving at the end result.

One form of the Lagrangian equation is as follows:

$\frac{\partial}{\partial t}({\partial L }/ {\partial \dot q}) - {\partial L} /{\partial q} = Q$

Where: L, the Lagrangian function, is defined as L = T - V, where T is the total kinetic energy of the system and V is the total potential energy of the system, q is the generalized coordinate, and Q is the generalized force. ${\partial L }/ {\partial \dot q}$ is known as the generalized momentum.

### Example

Consider a mass m attached a spring with spring constant k. The system has a single degree of freedom: x, the displacement of the mass from its equilibrium position. Then,

$T=\frac{1}{2}m\dot x^2$

$V=\frac{1}{2}kx^2$

Thus,

${\partial L }/ {\partial \dot x} = m\dot x$

${\partial L}/{\partial x} = -kx$

(Note that the generalized momentum is the same as the "normal" Newtonian momentum of mass times velocity in this problem.) Q = 0 for this simple problem, and so the equation of motion is

$m\ddot x = -kx$

which is the same as the result one arrives at by just considering the forces acting on the mass in Newtonian mechanics.