To solve this problem, we can use the conservation of energy. Initially, the block is at rest and the spring is compressed by a distance of x, given by:
F = kx
where F is the force applied to the spring (20 N), k is the spring constant (500 N/m), and x is the distance the spring is compressed.
Solving for x, we get:
x = F/k = 20 N / 500 N/m = 0.04 m
The potential energy stored in the compressed spring is given by:
U = 1/2 k x^2
Substituting the values, we get:
U = 1/2 * 500 N/m * (0.04 m)^2 = 0.04 J
When the block is released, the potential energy stored in the spring is converted to kinetic energy as the block oscillates back and forth on the spring. At the maximum speed, all the potential energy is converted to kinetic energy, so we can equate the two:
U = K
where K is the kinetic energy of the block.
The kinetic energy is given by:
K = 1/2 mv^2
where m is the mass of the block and v is its velocity at the maximum speed.
Substituting the values and equating the two expressions for energy, we get:
1/2 mv^2 = 0.04 J
Solving for v, we get:
v = sqrt(2*0.04 J / 2 kg) = 0.2 m/s
Therefore, the maximum speed of the block as it oscillates back and forth on the spring is 0.2 m/s.