Chain sliding over a table edge (source code)

= Chain sliding over a table edge
{title2=$(M+m+\rho L)\ddot x=g(M+\rho x)$}

An inextensible uniform chain of length L and <linear mass density> $\rho$ links a <mass> m sliding on a frictionless table to a hanging <mass> M. If the initial hanging chain length is zero and x is its subsequent hanging length, all moving material has speed $\dot x$. The <kinetic energy> is $(M+m+\rho L)\dot x^2/2$, while the <gravitational potential energy> is $-Mgx-\rho gx^2/2$. The <Euler-Lagrange equation> gives the displayed equation until a mass hits the floor or reaches the edge. Increasing hanging chain weight produces a <hyperbolic cosine> displacement from rest, rather than uniform acceleration.