Categories: Classical mechanics, Physics.

Lagrangian mechanics

Lagrangian mechanics is a formulation of classical mechanics, which is equivalent to Newton’s laws, but offers some advantages. Its mathematical backbone is the calculus of variations, and hence it is built on the principle of least action, which states that the path taken by a system will be a minimum of the action (i.e. energy cost) of that path.

For a moving object with position x(t)x(t) and velocity x˙(t)\dot{x}(t), we define the Lagrangian LL as the difference between its kinetic and potential energies:

L(x,x˙,t)TV=12mx˙2V(x)\begin{aligned} \boxed{ L(x, \dot{x}, t) \equiv T - V = \frac{1}{2} m \dot{x}^2 - V(x) } \end{aligned}

From variational calculus we then get the Euler-Lagrange equation, which in this case turns out to just be Newton’s second law:

ddt(Lx˙)=Lx    mx¨=Vx=F\begin{aligned} \dv{}{t}\Big( \pdv{L}{\dot{x}} \Big) = \pdv{L}{x} \qquad \implies \qquad m \ddot{x} = - \pdv{V}{x} = F \end{aligned}

But compared to Newtonian mechanics, Lagrangian mechanics scales better for large systems. For example, to describe the dynamics of NN objects x1(t),...,xN(t)x_1(t), ..., x_N(t), we only need a single LL from which the equations of motion can easily be derived. Getting these equations directly from Newton’s laws could get messy.

At no point have we assumed Cartesian coordinates: the Euler-Lagrange equations keep their form for any independent coordinates q1(t),...,qN(t)q_1(t), ..., q_N(t):

ddt(Lq˙n)=Lqn\begin{aligned} \dv{}{t}\Big( \pdv{L}{\dot{q}_n} \Big) = \pdv{L}{q_n} \end{aligned}

We define the canonical momentum conjugate pn(t)p_n(t) and the generalized force conjugate Fn(t)F_n(t) as follows, such that we can always get Newton’s second law:

pnLq˙nFnLqn    dpndt=Fn\begin{aligned} \boxed{ p_n \equiv \pdv{L}{\dot{q}_n} \qquad F_n \equiv \pdv{L}{q_n} } \qquad \implies \qquad \dv{p_n}{t} = F_n \end{aligned}

But this is actually a bit misleading, since pnp_n need not be a momentum, nor FnF_n a force, although often they are. For example, pnp_n could be angular momentum, and FnF_n torque.

Another advantage of Lagrangian mechanics is that the conserved quantities can be extracted from LL using Noether’s theorem. In the simplest case, if LL does not depend on qnq_n (then known as a cyclic coordinate), then we know that the “momentum” pnp_n is a conserved quantity:

Fn=Lqn=0    dpndt=0\begin{aligned} F_n = \pdv{L}{q_n} = 0 \qquad \implies \qquad \dv{p_n}{t} = 0 \end{aligned}

Now, as the number of particles NN increases to infinity, variational calculus will give infinitely many coupled equations, which is obviously impractical.

Such a system can be regarded as continuous, so the NN functions qnq_n can be replaced by a single density function u(x,t)u(x,t). This approach can also be used for continuous fields, in which case the complex conjugate uu^* is often included. The Lagrangian LL then becomes:

L(u,u,ux,ux,ut,ut,x,t)=L(u,u,ux,ux,ut,ut,x,t)dx\begin{aligned} L(u, u^*, u_x, u_x^*, u_t, u_t^*, x, t) = \int_{-\infty}^\infty \mathcal{L}(u, u^*, u_x, u_x^*, u_t, u_t^*, x, t) \dd{x} \end{aligned}

Where L\mathcal{L} is known as the Lagrangian density. By inserting this into the functional JJ used for the derivation of the Euler-Lagrange equations, we get:

J[u]=t0t1Ldt=t0t1 ⁣Ldxdt\begin{aligned} J[u] = \int_{t_0}^{t_1} L \dd{t} = \int_{t_0}^{t_1} \! \int_{-\infty}^\infty \mathcal{L} \dd{x} \dd{t} \end{aligned}

This is simply 2D variational problem, so the Euler-Lagrange equations will be two PDEs:

0=Lux(Lux)t(Lut)0=Lux(Lux)t(Lut)\begin{aligned} 0 &= \pdv{\mathcal{L}}{u} - \pdv{}{x}\Big( \pdv{\mathcal{L}}{u_x} \Big) - \pdv{}{t}\Big( \pdv{\mathcal{L}}{u_t} \Big) \\ 0 &= \pdv{\mathcal{L}}{u^*} - \pdv{}{x}\Big( \pdv{\mathcal{L}}{u_x^*} \Big) - \pdv{}{t}\Big( \pdv{\mathcal{L}}{u_t^*} \Big) \end{aligned}

If L\mathcal{L} is real, then these two Euler-Lagrange equations will in fact be identical.

Finally, note that for abstract fields, the Lagrangian density L\mathcal{L} rarely has a physical interpretation, and is not unique. Instead, it must be reverse-engineered from a relevant equation.


  1. R. Shankar, Principles of quantum mechanics, 2nd edition, Springer.