Source: Principles of Physics
Problem Sets:
Problem
A uniform chain of total mass $m$ and length $L$ is held on a frictionless horizontal table. A fraction $1/n$ of the chain's length hangs over the edge.
The work done by the external pulling force is equal to the change in the system's gravitational potential energy, assuming the chain is pulled slowly (change in kinetic energy is zero). Let the potential energy be zero at the tabletop level ($y=0$).
The hanging part has a length $L_h = L/n$ and mass $m_h = m/n$. Its center of mass is located a distance $y_{cm}$ below the tabletop.
$$y_{cm} = \frac{L_h}{2} = \frac{L}{2n}$$The initial potential energy of the system is the potential energy of the hanging part.
$$U_i = -m_h g y_{cm} = -\left(\frac{m}{n}\right) g \left(\frac{L}{2n}\right) = -\frac{mgL}{2n^2}$$The final state is the entire chain on the table, so the final potential energy is zero.
$$U_f = 0$$The work required is the change in potential energy:
$$W = \Delta U = U_f - U_i = 0 - \left(-\frac{mgL}{2n^2}\right) = \frac{mgL}{2n^2}$$