Final answer:
The work done to stretch or compress a spring can be calculated using the formula (1/2)kx^2, where k is the force constant of the spring and x is the displacement. For an initial displacement of 0.030 m, the work done would be 18 J.
Step-by-step explanation:
To calculate the work done to stretch or compress a spring, we can use the formula:
Work = (1/2)kx^2
where k is the force constant of the spring and x is the displacement from the equilibrium position.
For stretching the spring by 0.030 m, the work can be calculated as:
Work = (1/2)(4.0×10^4 N/m)(0.030m)^2 = 18 J
For compressing the spring by 0.030 m, the work would also be 18 J since the formula only depends on the displacement and the force constant and is independent of the direction of displacement.