# Hooke's law and spring

1. Oct 18, 2004

### daveed

allright, here is something i havent been able to understand with just hooke's law

if i have an object traveling at velocity v, lets say, 4m/s , and hits a spring at, i dont know, k=2? so then we know how far the spring compresses and all because you just need to set the work done and kinetic energy equal, but what i have not been able to get is how long does it take for it to compress? because with a changing force(and so a changing acceleration), i dont understand how to find the time it takes to stop the thing

also, when your talking about a ball bouncing up and hitting a spring, the compression would not be the same as if it had happened on a horizontal surface, because gravity would also be doing work on the ball too, right?

2. Oct 18, 2004

### spacetime

3. Oct 19, 2004

### daveed

if the object comes and hits the spring again(after being pulled down by gravity) and hits the spring out of phase, will you still need to take the work done by the spring? also, what if it- lets take this with a spring vibrating up and down now- hits the spring above the equillibrium point, where the force on the end of the spring is downwards? how does the object behave then?

4. Nov 5, 2004

### pmrazavi

YES, of course the compression will be diffrent because of the gravity's force...
In this situation you don't only have kinetic energy but you have the gravity potential energy as well. The equation will be this then .5kx^2=.5mV2+mgh (in the vertical bouncing)...
but if it ball is traveling a horizontal distance you don't have gravity's potential energy hence the x would be less...

I hope I realized your question correctly..

5. Nov 6, 2004

### da_willem

$$F=-kx(t)=m\frac{d^2x(t)}{dt^2}$$ (Newtons second law F=ma)

This is a differential equation with the general solution:
$$x(t)=Asin(\omega t)+Bcos(\omega t)$$

With [itex]\omega=\sqrt{k/m}[/tex]. Applying initial conditions; say x(t=0)=0
$$x(t)=Asin(\omega t)$$

The spring is totally compressed when:
$$sin(\omega t)=1$$ so $$t=\frac{\pi}{2 \omega}=\frac{\pi}{2} \sqrt{m/k}$$

And thus depends only on the mass of the object and the spring constant and not on the initial velocity of the object!