Homework Help: ODE Hooke's Law, V(x) instead of V(t)

1. Feb 11, 2013

blieveucanfly

1. The problem statement, all variables and given/known data
A 50kg mass is attached to a spring and hung from an overhead beam. The Force on the spring when extended 2 meters from rest is 50N. The resting length of the spring is 1m.

1) Obtain the ODE to solve for the velocity as a function of position (NOT time)

2) Solve the ODE if the spring is dropped from it's rest length of 1m

2. Relevant equations
F= -kx, F=ma, a(t) = dv/dt, v(t)=dx/dt, F(2) = -50N, V(x0) = 0, x = distance below the overhead beam)

3. The attempt at a solution

I am mostly having trouble coming up with an equation to solve. We are specifically forbidden from using second order methods to solve. I know logically that it's a periodic function since the spring oscillated up and down once released. I also know (as per my professor) that the solution v(x) will NOT be a periodic function.

My attempted equation is: dv/dx = -kx+mg

I was able to solve that (presumably incorrect) equation and get -k/2m x2 +gx +c

Am I on the right track or have I completely missed a key concept somewhere.
Thanks.

2. Feb 11, 2013

blieveucanfly

I think I may have figured it out: If my logic is correct dv/dt = dx/dt*dv/dx. Since I want a solution for v(x), I need to solve the differential with a dv/dx in it. I can get this by substituting v for dx/dt.

My new ODE looks like this: v * dv/dx = -k/m x +g
which I then solve by integrating both sides

3. Feb 11, 2013

SammyS

Staff Emeritus
Yes, integrate both sides with respect to x.

(dv/dx)dx = dv .

4. Feb 12, 2013

vela

Staff Emeritus
Yup, that's the chain rule applied to v(x(t)).