(a) Due to the influence of the spring force, the mechanical energy of the system will not be conserved. However, we can analyze the energy at the moment the spring is released and at the moment the block reaches its maximum speed.
When the spring is released from a compression of \(2.0 \mathrm{~cm}\), the initial energy of the system is comprised entirely of potential energy stored in the spring, which is given by \(0.5kx^2 = 0.5 * 900 * (0.02)^2 = 0.18 \mathrm{~J}\).
When the block reaches its maximum speed, this energy has been converted into kinetic energy and work done against the friction. The potential energy stored in the spring at this moment is given by \(0.5kx'^2\), where \(x'\) is the new compression. The work done against the friction is \(Ff * x\), where \(Ff\) is the friction force and \(x\) is the distance moved, which in this case is \(\Delta x = x - x'\) since the block moves from \(x\) to \(x'\).
According to energy conservation \(\Delta E = E_f - E_i = 0\) and so we get
0.5kx^2 = 0.5kx'^2 + Ff * (x - x')
Solve for x':
0.5 * 900 * (0.02)^2 = 0.5 * 900 * x'^2 + 3.5 * (0.02 - x')
Due to the dimensions of the quantities, x' should be in meters as \(x = 0.02 \mathrm{~m}\). Solve the above equation gives:
x' ≈ 0.013 m or 1.3 cm
(b) The maximum speed of the block occurs when all the initial potential energy of the system is transferred into kinetic energy and work done by friction. So we can write this energy conservation as:
\(0.5kx^2 = 0.5mv^2 + Ff * (x' - x)\)
Rearranging for \(v\) (the maximum speed) we get:
\(v = sqrt{[(0.5kx^2 - Ff * (x - x')) / (0.5m)]} = sqrt{[(0.5 * 900 * (0.02)^2 - 3.5 * (0.02 - 0.013)) / (0.5*1.3)]} ≈ 0.51 \mathrm{ms^{-1}}\)
Therefore, the spring is compressed by 1.3 cm when the speed of the block is maximum and the maximum speed of the block is approximately 0.51 m/s using the given parameters.