So the problem deals with a chain at a fixed length, bends but does not stretch under gravity.
The total graviational potential energy is $$g\rho\int y\sqrt{1 + y^{'2}}dx$$
Where $g$ is gravity.
The problem has a picture of the chain on the xy plane
So what I want to know is how to derive the equation using the drawing. It's to my limited understanding that the square root $\sqrt{1 + y^{'2}}$ is describing a segment on the curve but what exactly is the $y$ representing in the picture? And how $mgh$ translates to the equation?
Also any help on arriving to the solution $y = coshx$ would be greatly appreciated but I am more interested on the equation right now.