Let be the downward displacement of from its initial position just beyond the table edge. The smaller mass moves towards the edge by the same distance, and the hanging chain length is . All the chain and both endpoint masses move at speed , so their total moving mass is . The hanging chain's gravitational potential energy, relative to the initial configuration, is . Thus the Lagrangian for the chain sliding over a table edge isThe Euler-Lagrange equation gives . Put . With , the solution isThese are also the smaller mass's displacement and speed towards the edge. The formula applies until reaches the floor, at . Since , the smaller mass has not yet reached the edge during this interval. As , the result tends to , as expected for a massless connector.
Let the spring's spring constant be , and write its extension as , allowing for an initial extension . The new Lagrangian isThe specified equilibrium is , with . Put ; the equation becomesThe spring-stabilized chain over a table edge oscillates only when . More hanging chain increases its own gravitational pull, reducing the effective restoring stiffness. The equilibrium height alone does not determine without information about the spring's natural length or preload.
