# Finding x value of Spring

An object is on a vertical spring that is currently unstretched. Using conservation of energy find how far it will stretch when it is first released?

m = 100g = 0.1 kg

k = 15.5 N/m

The answer is supposed to be 21.5 cm = 0.215 m

I first tried x = k/F where F is mgand got the answer: 0.063 m

I then tried F = ma where F is mg - kx and a is equals 9.8. mg - kx = ma but since one side would equal 0, the whole answer would end up being zero. Is there another force acting on the object that is messing up my answer?

Update I just did: Ek = Es and got the answer x = 0.787 m. If you subtract 0.787 from the meter you would get 21.3 which is pretty close to the answer. Is this correct?

$$mgx=\frac12 kx^2\implies x=\frac{2mg}{k}=0.126 m$$
Taking the initial position as the zero of the energy, with $x$ the stretching of the spring the energy is: $$E(x)=\frac{1}{2} \dot{x}^2-mgx +\frac{1}{2} k x^2$$ so $x$ is maximum for $-mg+\frac{1}{2} k x=0$ i.e: $$x=\frac{2 mg}{k}$$