We know that a stretched spring obeys Hooke's law, such that
We can find the potential energy of stretching/compressing this spring by x, given by :
Setting as reference, we have
However, this is also sometimes described as the work done by the spring.
Shouldn't the work done W be given by , such that in this case ?
Isn't the work done by the spring negative ?
Also, in this case the potential energy comes to be negative.. In general, can we set any point as reference and set it to be 0 and perform the integral between any two limits, to get either a positive or a negative U ?
For example, in forces of the nature we usually take the reference at and integrate from to some point r. In case of forces of the nature , we usually take 0 as the reference and integrate from 0 to some r. In general, we are free to choose any reference and any limit, even though some are much more convenient, right ? In theory, we can choose any point, right ?
As long as we have :
we can choose any a and b, and set either of or to be the reference and equal to 0, right ?