Trying to figure out the potential energy of a hanging rope 
I was trying to figure out the potential energy of a hanging rope. The rope is hanging from a fixed support. The mass of the rope is $m$. And the length of the rope is $\ell$. The rope has a uniform linear mass density.
Consider the gravitational acceleration $g$ as constant over the total length of the rope.
Considering the the horizontal line passing through the fixed support as the level of $0$ potential energy.

Now I consider a function $U(x)$ which gives us the total potential energy of '$x$' length of the rope. Where '$x$' is measured from the fixed support downwards along the rope.
Now if we consider a small length $\Delta x$ after the length '$x$' and try to figure out the corresponding change in potential energy due to this '$\Delta x$' length,
then the quantity $\frac{\Delta U}{\Delta x}$ is getting approximately equal to $(m/l)\cdot g \cdot x$
And by visualising a bit the difference  between these two quantities seems to get more and more negligible as '$\Delta x$' approaches $0$. Now from this visualisation can it be claimed that;
'$dU(x)/dx = (m/l)\cdot g\cdot x$'?
The problem will get solved if that claim is true since it is a pretty easy task to figure out an antiderivative for the RHS term.
So please let me know can it be claimed so? And if it can be then what will be the mathematical point of view behind such a claim? I want to know the mathematical point of view because I think just by a visualisation such a mathematical statement can't be considered as true.
 A: Well, yes, your claim is fairly substantiated by mere visualisation. For instance, if you remove every piece of rope except the element $dx$, then, the element $dx$ can be approximated as a pint mass. The expression that you visualized will be obtained if you find the Gravitational Potential energy for a point mass at a distance x, which is a standard result.
Now, coming to it's mathematical implication, the total potential energy of the rope is not immediately visible from any of the standard results. But for a point mass, we have one, and finding the antiderivative is kind of like summing up the result of infinite individual interconnected points to arrive at one suitable for an extended body. 
A: One can find the gravitational potential energy of an object by assuming that all of the mass is concentrated at the center of gravity.  Or, you can divide your rope into tiny segments each of length d$x$.  With the zero of potential chosen at the top, and $x$ measured positive down from there,  the potential of each segment is $-g(m/L)x(\text{d}x)$.  Integrate that from $0$ to $L$.
