Why Aren't Generalized Coordinates Treated as Functions of Time?

How partial derivatives of a Lagrangian differ from differentiation along a time-dependent trajectory.

Generalized coordinates are functions of time along a motion. In the Euler–Lagrange equations, however, we first differentiate a function whose arguments are position, velocity, and time, and then evaluate those derivatives along the motion. These are different operations.

This note revises my original Chinese answer.

The function and the path through its domain

In local coordinates, write the Lagrangian as

L(q1,,qn,v1,,vn,t).L(q^1,\ldots,q^n,v^1,\ldots,v^n,t).

Here qiq^i, viv^i, and tt are independent input coordinates of the function's domain. Geometrically, the domain is the tangent bundle of configuration space, together with time. Independence of these input coordinates does not mean that their geometric directions are orthogonal.

A sufficiently smooth motion q(t)q(t) defines a path through that domain:

γ(t)=(q(t),q˙(t),t).\gamma(t)=(q(t),\dot q(t),t).

The velocity input becomes v=q˙(t)v=\dot q(t) when we evaluate LL on this path. Thus LγL\circ\gamma is a function of time, even though LL itself has several arguments.

Partial derivatives and the chain rule

The notation L/qi\partial L/\partial q^i means: vary the input qiq^i while holding the other inputs, including vv and tt, fixed. This defines a new function on the same domain. We can then evaluate it at γ(t)\gamma(t).

By contrast, differentiating the composition gives

ddtL(q(t),q˙(t),t)=i=1nLqiq˙i+i=1nLviq¨i+Lt,\frac{d}{dt}L(q(t),\dot q(t),t) =\sum_{i=1}^{n}\frac{\partial L}{\partial q^i}\dot q^i +\sum_{i=1}^{n}\frac{\partial L}{\partial v^i}\ddot q^i +\frac{\partial L}{\partial t},

with every partial derivative on the right evaluated along γ\gamma. This is the ordinary multivariable chain rule. More generally, the derivative of a multivariable function is a linear map; a derivative need not belong to a function with only one input.

A simpler example makes the distinction visible. If F(q,t)=qtF(q,t)=qt, then Fq=tF_q=t and Ft=qF_t=q. Along q=q(t)q=q(t),

ddtF(q(t),t)=tq˙(t)+q(t).\frac{d}{dt}F(q(t),t)=t\dot q(t)+q(t).

Taking FtF_t does not “forget” a time dependence. It differentiates a different function from the composition tF(q(t),t)t\mapsto F(q(t),t).

Reading the Euler–Lagrange equation

For an unconstrained coordinate description with no additional generalized forces, the equation is

ddt[Lvi(q(t),q˙(t),t)]Lqi(q(t),q˙(t),t)=0.\frac{d}{dt}\left[\frac{\partial L}{\partial v^i} (q(t),\dot q(t),t)\right] -\frac{\partial L}{\partial q^i}(q(t),\dot q(t),t)=0.

The usual notation replaces viv^i by q˙i\dot q^i even inside LL and its partial derivatives. That is convenient, but it can conceal the order of operations.

For L(q,v)=mv2/2V(q)L(q,v)=mv^2/2-V(q),

Lq=V(q),Lv=mv.L_q=-V'(q),\qquad L_v=mv.

After evaluation on a trajectory, d(Lv)/dt=mq¨d(L_v)/dt=m\ddot q, so the equation becomes mq¨=V(q)m\ddot q=-V'(q). Meanwhile, the total derivative of LL is mq˙q¨V(q)q˙m\dot q\ddot q-V'(q)\dot q, a different quantity.

Why this also works in the variational derivation

For a variation qε(t)=q(t)+εη(t)q_\varepsilon(t)=q(t)+\varepsilon\eta(t), the velocity varies as q˙ε=q˙+εη˙\dot q_\varepsilon=\dot q+\varepsilon\dot\eta. Position and velocity variations along a path are therefore related. Nevertheless, the chain rule uses the independently defined partial derivatives of LL:

δS=t0t1i(Lqiηi+Lviη˙i)dt.\delta S=\int_{t_0}^{t_1}\sum_i \left(L_{q^i}\eta^i+L_{v^i}\dot\eta^i\right)dt.

For variations vanishing at both endpoints, integration by parts gives the Euler–Lagrange equations. We never need to assert that a trajectory's position and velocity can vary independently at all times. See Tong's classical dynamics notes for the variational derivation.