A rope of mass M and length L is hanging between two endpoints, A(x_1, y_1) and B(x_2, y_2). The gravity is along -y direction. The rope is fully flexible and can take any shape. Use variation calculus to find the shape of the rope.
Hint: The system wants to minimize the gravitational potential energy V of the entire rope, which is an integral over all segments on the rope, dV = M/L*ydl.