A spring gun is made by compressing a spring in a tube and then latching the spring at the compressed position. A 4.97-g pellet is placed against the compressed and latched spring. The spring latches at a compression of 3.92 cm and it takes a force of 9.12 N to compress the spring to that point.

If the gun is fired vertically, how fast (m/s) is the pellet moving when it loses contact with the spring?

2 answers

The spring constant is
k = 9.12/0.0392 = 232.7 newtons/meter

The potential energy stored in the compressed spring, when compressed a distance X is
(1/2)kX^2 = 0.1788 newtons

When fired vertically, the spring stops exerting a force on the spring when the compression force equals M g. (After that, contact is lost). Call the that position X'

kX' = M g ; so X' = 0.0021 m

At that point,
Pellet kinetic energy + pellet gravitational energy change = spring potentialo energy change

(1/2) M V^2 + Mg(X - X') = (1/2) k [X^2 - X'^2]

Solve for V; check my thinking
The first minus sign on the left should be a plus.