At point A, the block has kinetic energy and no potential energy. At point B, the block has both kinetic energy and potential energy stored in the spring. Therefore, we can write the conservation of energy as:
\[ \frac{1}{2} m v_A^2 = \frac{1}{2} m v_B^2 +
Show more…