The energy stored in a spring is elastic potential energy. The formula for calculating the elastic potential energy is expressed as
elastic potential energy = 1/2kx^2
where
k represents spring constant
x represents the distance through which the spring was compressed
From the information given,
k = 150 N/m
x = 2cm
we would convert 2cm to m
recall, 100cm = 1 m
2 cm = 2/100 = 0.02 m
By substituting these values into the formula,
elastic potential energy = 1/2 x 150 x 0.02^2
elastic potential energy = 0.03 J