The ODE for a bead sliding down a wire.
This note records a simple calculation in lagrangian mechanics that is useful when making 2D animations. We consider a curve given by the graph of a function u↦(u,f(u)) and a particle moving along the curve under the influence of a uniform downwards gravitational field.
PICTURE
Gravity Along a Curve
A particle moving along the graph of a function f under a uniform downwards gravitational field of strength g follows the trajectory
t↦(u(t),f(u(t))) determined by the following differential equation:
u¨=−fu(1+fu2)fuuu˙2+g
The Lagrangian
The kinetic energy of a particle is 21mv2, where in R2 the square velocity is given in coordinates by v2=x˙2+y˙2. Confined to the curve (u,f(u)) this becomes
K=2m(x˙2+y˙2)=2m(u˙2+[f(u)′]2)=2m(u˙2+[fuu˙]2)=2m(1+fu2)u˙2
Where we’ve written fu for the derivative. For a uniform gravitational field the potential is simply proportional to the height (by the constants g giving strength of gravity and m the particle’s mass). Thus we may take
V=my=mgf(u)
Putting these together gives the lagrangian for our system,
L=K−V=2m(1+fu2)u˙2−mgf
The Calculus of Variations
Let u(t) be the coordinate representation of a particle moving along this curve for t∈I. The action of such a trajectory is given by the functional
S[u]:=∫ILdt
The physical trajectory of the particle is that which minimizes the action, which we find using the Euler-Lagrange equation:
∂u∂L=dtd∂u˙∂L
Thus we need the derivatives of L with respect to u,u˙ to get started:
∂u∂L=∂u∂[2m(1+fu2)u˙2−mgf]=2m[2fufuu]u˙2−mgfu=mfu[fuuu˙2−g]
∂u˙∂L=∂u˙∂[2m(1+fu2)u˙2−mgf]=m(1+fu2)u˙
Next we need the total time derivative of this latter quantity:
dtd∂u˙∂L=dtdm(1+fu2)u˙=m[u˙dtd(1+fu2)+(1+fu2)dtdu˙]=m[u˙(2fufuuu˙)+(1+fu2)u¨]=m[2fufuuu˙2+(1+fu2)u¨]
Both sides of the Euler-Lagrange equation are proportional to m, which then drops out of the equation yielding
fu[fuuu˙2−g]=2fufuuu˙2+(1+fu2)u¨
To simplify, we solve for u¨:
(1+fu2)u¨=fu[fuuu˙2−g]−2fufuuu˙2=−(fufuuu˙2+gfu)
⟹u¨=−(1+fu2)fufuuu˙2+gfu
This proves the claimed theorem.