The energy stored in a spring can be calculated using the formula:
E = (1/2)kx^2
where: E is the energy stored in the spring, k is the force constant (spring constant), and x is the displacement (compression or extension) of the spring.
In this case, the displacement of the spring (x) is given as 0.02 m, and the force constant (k) is given as 400 N/m.
Plugging these values into the formula, we have:
E = (1/2)(400 N/m)(0.02 m)^2 E = (1/2)(400 N/m)(0.0004 m^2) E = 0.08 J
Therefore, the energy stored in the spring is 0.08 joules.