Given data
*The given spring constant is k = 40 N/m
*The given compressed length is x = 0.1 m
*The given mass is m = 0.5 kg
(a)
The formula for the elastic potential energy stored in the spring is given as
[tex]U_p=\frac{1}{2}kx^2[/tex]Substitute the values in the above expression as
[tex]\begin{gathered} U_p=\frac{1}{2}(40)(0.1)^2 \\ =0.2\text{ J} \end{gathered}[/tex]Hence, the elastic potential energy stored in the spring is 0.2 J
(b)
The formula for the speed of the masses is given by the conservation of energy as
[tex]\begin{gathered} U_p=U_k \\ \frac{1}{2}kx^2=\frac{1}{2}mv^2 \\ v=x\sqrt[]{\frac{k}{m}} \end{gathered}[/tex]Substitute the values in the above expression as
[tex]\begin{gathered} v=(0.1)\sqrt[]{\frac{40}{0.5}} \\ =0.89\text{ m/s} \end{gathered}[/tex]Hence, the speed of the masses as it reaches the length of the spring is v = 0.89 m/s