Source: Principles of Physics
Problem
A uniform cord of length $L$ and mass $M$ is initially stuck horizontally to a ceiling. Later, it hangs vertically from the ceiling with one end still stuck.
[Q1] $\Delta U_g = -\frac{1}{2}MgL$
The change in gravitational potential energy $\Delta U_g$ of an object depends on the change in the vertical position of its center of mass, $\Delta h_{cm}$.
$$\Delta U_g = M g \Delta h_{cm}$$Let the ceiling be the reference level $y=0$.
Initial state: The cord is horizontal at $y=0$. The center of mass of the uniform cord is at its midpoint, so its initial vertical position is $h_{cm,i} = 0$.
Final state: The cord hangs vertically from the ceiling. The center of mass is at its midpoint, which is a distance $L/2$ below the ceiling. Its final vertical position is $h_{cm,f} = -L/2$.
The change in the vertical position of the center of mass is:
$$\Delta h_{cm} = h_{cm,f} - h_{cm,i} = -L/2 - 0 = -L/2$$The change in potential energy is therefore:
$$\Delta U_g = Mg(-\frac{L}{2}) = -\frac{1}{2}MgL$$The potential energy decreases.