Answer:
The same amount of energy is required to either stretch or compress the spring.
Explanation:
The amount of energy required to stretch or compress a spring is equal to the elastic potential energy stored by the spring:
[tex]U=\frac{1}{2}k (\Delta x)^2[/tex]
where
k is the spring constant
[tex]\Delta x[/tex] is the stretch/compression of the spring
In the first case, the spring is stretched from x=0 to x=d, so
[tex]\Delta x = d-0=d[/tex]
and the amount of energy required is
[tex]U=\frac{1}{2}k d^2[/tex]
In the second case, the spring is compressed from x=0 to x=-d, so
[tex]\Delta x = -d -0 = -d[/tex]
and the amount of energy required is
[tex]U=\frac{1}{2}k (-d)^2= \frac{1}{2}kd^2[/tex]
so we see that the amount of energy required is the same.