A block of mass 2 kg  attached to a spring lies on a flat surface.    When the block is pulled 5 cm to the right a force with a magnitude of 300 N is need to hold it in place.  What is the work done by the spring when the block moves from x = 10 cm to x = 12 cm.  Express your answer in joules.

k=300N/.05m=6000 N/m

work done= PEmax-PEmin
= 1/2 k (.12^2-.10^2)

To find the work done by the spring when the block moves from x = 10 cm to x = 12 cm, we first need to determine the spring constant (k) and the displacement of the block (delta x).

Given information:
- Mass of the block (m) = 2 kg
- Force required to hold the block in place (F) = 300 N
- Initial position (x1) = 10 cm
- Final position (x2) = 12 cm

To find the spring constant (k), we can use Hooke's Law, which states that the force exerted by a spring is directly proportional to the displacement of the spring from its equilibrium position:

F = -k * x

Rearranging the equation, we get:

k = -F / x

Substituting the given values, we find:

k = -300 N / 0.05 m (converting cm to meters)

k = -6000 N/m

Now that we know the spring constant, we can calculate the displacement of the block:

delta x = x2 - x1

delta x = 12 cm - 10 cm

delta x = 0.02 m (converting cm to meters)

Next, we can use the formula for work done by a spring:

Work = (1/2) * k * (delta x)^2

Substituting the values, we find:

Work = (1/2) * (-6000 N/m) * (0.02 m)^2

Work = -1.2 J

Therefore, the work done by the spring when the block moves from x = 10 cm to x = 12 cm is -1.2 Joules.