Note: Gravity Along Curve

Steve Trettel
|
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\mapsto (u,f(u))$ and a particle moving along the curve under the influence of a uniform downwards gravitational field.
PICTURE
A particle moving along the graph of a function $f$ under a uniform downwards gravitational field of strength $g$ follows the trajectory $t\mapsto (u(t),f(u(t)))$ determined by the following differential equation:
$$\ddot{u}=-f_u\frac{f_{uu}\dot{u}^2+g}{(1+f_u^2)}$$The Lagrangian
The kinetic energy of a particle is $\frac{1}{2}mv^2$, where in $\mathbb{R}^2$ the square velocity is given in coordinates by $v^2=\dot{x}^2+\dot{y}^2$. Confined to the curve $(u,f(u))$ this becomes
$$\begin{align} K&=\frac{m}{2}\left(\dot{x}^2+\dot{y}^2\right)\\ &=\frac{m}{2}\left(\dot{u}^2+\left[f(u)^\prime\right]^2\right)\\ &=\frac{m}{2}\left(\dot{u}^2+[f_u\dot{u}]^2\right)\\ &=\frac{m}{2}(1+f_u^2)\dot{u}^2 \end{align}$$Where we’ve written $f_u$ 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,
$$\mathcal{L}=K-V=\frac{m}{2}\left(1+f_u^2\right)\dot{u}^2-mgf$$The Calculus of Variations
Let $u(t)$ be the coordinate representation of a particle moving along this curve for $t\in I$. The action of such a trajectory is given by the functional
$$S[u]:=\int_I \mathcal{L}\,dt$$The physical trajectory of the particle is that which minimizes the action, which we find using the Euler-Lagrange equation:
$$\frac{\partial\mathcal{L}}{\partial u}=\frac{d}{dt}\frac{\partial\mathcal{L}}{\partial\dot{u}}$$Thus we need the derivatives of $\mathcal{L}$ with respect to $u,\dot{u}$ to get started:
$$\begin{align} \frac{\partial\mathcal{L}}{\partial u}&=\frac{\partial}{\partial u}\left[\frac{m}{2}\left(1+f_u^2\right)\dot{u}^2-mgf\right]\\ &=\frac{m}{2}\left[2f_uf_{uu}\right]\dot{u}^2-mgf_u\\ &=mf_u\left[f_{uu}\dot{u}^2-g\right] \end{align}$$$$\begin{align} \frac{\partial\mathcal{L}}{\partial \dot{u}}&=\frac{\partial}{\partial \dot{u}}\left[\frac{m}{2}\left(1+f_u^2\right)\dot{u}^2-mgf\right]\\ &=m(1+f_u^2)\dot{u} \end{align}$$Next we need the total time derivative of this latter quantity:
$$\begin{align} \frac{d}{dt}\frac{\partial\mathcal{L}}{\partial\dot{u}}&=\frac{d}{dt}m(1+f_u^2)\dot{u}\\ &=m\left[\dot{u}\frac{d}{dt}(1+f_u^2) + (1+f_u^2)\frac{d}{dt}\dot{u}\right]\\ &= m\left[\dot{u}(2f_{u}f_{uu}\dot{u})+(1+f_u^2)\ddot{u}\right]\\ &= m\left[2f_uf_{uu}\dot{u}^2+(1+f_u^2)\ddot{u}\right] \end{align} $$Both sides of the Euler-Lagrange equation are proportional to $m$, which then drops out of the equation yielding
$$f_u\left[f_{uu}\dot{u}^2-g\right]=2f_uf_{uu}\dot{u}^2+(1+f_u^2)\ddot{u}$$To simplify, we solve for $\ddot{u}$:
$$\begin{align}(1+f_u^2)\ddot{u}&=f_u\left[f_{uu}\dot{u}^2-g\right]-2f_uf_{uu}\dot{u}^2\\ &=-(f_uf_{uu}\dot{u}^2+gf_u) \end{align}$$$$\implies \ddot{u}=-\frac{f_uf_{uu}\dot{u}^2+gf_u}{(1+f_u^2)}$$This proves the claimed theorem.