(a) As it gets compressed by a distance <em>x</em>, the spring does
<em>W</em> = - 1/2 (52.1 N/m) <em>x</em> ²
of work on the object (negative because the restoring force exerted by the spring points in the opposite direction to the object's displacement). By the work-energy theorem, this work is equal to the change in the object's kinetic energy. At maximum compression <em>x</em>, the object's kinetic energy is zero, so
<em>W</em> = ∆<em>K</em>
- 1/2 (52.1 N/m) <em>x</em> ² = 0 - 1/2 (0.250 kg) (1.70 m/s)²
==> <em>x</em> ≈ 0.118 m
(b) Taking friction into account, the only difference is that more work is done on the object.
By Newton's second law, the net vertical force on the object is
∑ <em>F</em> = <em>n</em> - <em>mg</em> = 0
where <em>n</em> is the magnitude of the normal force of the track pushing up on the object. Solving for <em>n</em> gives
<em>n</em> = <em>mg</em> = 2.45 N
and from this we get the magnitude of kinetic friction,
<em>f</em> = <em>µn</em> = 0.120 (2.45 N) = 0.294 N
Now as the spring gets compressed, the frictional force points in the same direction as the restoring force, so it also does negative work on the object:
<em>W</em> (friction) = - (0.294 N) <em>x</em>
<em>W</em> (spring) = - 1/2 (52.1 N/m) <em>x</em> ²
==> <em>W</em> (total) = <em>W</em> (friction) + <em>W</em> (spring)
Solve for <em>x</em> :
- (0.294 N) <em>x </em>- 1/2 (52.1 N/m) <em>x</em> ² = 0 - 1/2 (0.250 kg) (1.70 m/s)²
==> <em>x</em> ≈ 0.112 m