I'm having trouble understanding why work done by a force is calculated in the way as described in the following problem.
I kind of get why the work done by W is just $mgh$:
$ work = U_{1-2} = \int \vec F \cdot d\vec r = \int_{\vec{r_1}}^{\vec{r_2}}(-W\vec j) \cdot (dx \vec i + dy \vec j + dz \vec k) = \int_{y_1}^{y_2}-Wdy = -W(y_2-y_1)$
So no matter the path, work done by gravity will only depend on the vertical displacement.
I assume that the work done by the cord is calculated the way it is due to a similar explanation, but the understanding sadly eludes me. Does anyone have a satisfying explanation for this?
Here is my "proof" for the straight part and how it is dependent on the change in length of the rope from the pulley to the point of contact with the collar.
I don't get why the textbook and seemingly everyone else just assumes this as a given without much proof or explanation behind it. Is there an intuitive explanation for it?
Any insights would be greatly appreciated, thank you.