I cannot seem to find the answer for my question. I know that the formula for work is $W = FD$.
Given a mass that is attached to unstretched spring and is pushed by some force to stretch the spring, I need to calculate the work done by this force. The spring is fixed to a wall and attached to a mass.
The mass comes to a momentary stop after the mass moves $30\:\mathrm{cm}$.
So W (total) = change in kinetic energy
Change in kinetic energy will be equal to zero, since it starts from the rest and stops after $30\:\mathrm{cm}$
The work done by the force is $F \times 0.30\:\mathrm{m}$.
And the formula for the work done by a spring is $\frac{kx^2}{2}$.
I have two questions:
1) will the $x$ in the formula of work done by a spring be equal to the distance travelled by a mass? If the mass is attached to a spring, does that mean that the distance it will travel will be equal to this "x" in the formula $\frac{k x^2}{2}$?
2) If I want to find the work done by a spring, from the general formula $W = FD$
Will the work done by a spring be equal to $\frac{k x^2}{2} * 0.30\:\mathrm{m}$ (distance it will travel)?