# Mass on a spring non-homogeneous second order ODE

1. Aug 2, 2013

### flyinjoe

1. The problem statement, all variables and given/known data
A mass of 5kg stretches a spring 10cm. The mass is acted upon by an external force of 10sin(t/2) newtons and moves in a medium that imparts a viscous force of 2N when the speed of the mass is 4cm/sec. If the mass is set in motion from its equilibrium position with an initial velocity of 3 cm/sec, formulate and solve the initial value problem describing the motion of the mass.

2. Relevant equations

mx'' + γx' + kx = F0 cos(ω0t)

where γx' is the dampening force, k is the spring constant, and F0 cos(ω0t) is the external force.
3. The attempt at a solution

I know this is just a non-homogeneous second order ODE, but I am not sure where or how to get the spring constant, k, or ω. Thanks in advance for any help.

2. Aug 2, 2013

### dlgoff

What is the equation if there were no external force applied after the 5kg mass is attached?

3. Aug 2, 2013

### flyinjoe

I'm not quite sure what you are asking. Are you referring to the motion of an undamped spring with no resonance?

4. Aug 2, 2013

### dlgoff

No motion, just a hanging 5kg mass.

5. Aug 2, 2013

### haruspex

Yes, it's a badly worded question. A mass does not stretch a spring, a force does. It should say "a weight of 5g N ..."

6. Aug 3, 2013

### flyinjoe

The force when it's just hanging there is

F = m * g = 5 * (9.81) = 49.05

And if F = -kx, k should equal 490.5. Using the initial condition of γ(.04 m/s) = 2 N, γ = 50. (Where γx' is the force due to damping).

When I plug this in and solve the DE, I get really bizarre values for the constants (A, B, C1, C2).

Are my calculations correct?

7. Aug 3, 2013

### haruspex

What you've posted looks ok. Please post the rest of your working.

8. Aug 3, 2013

### flyinjoe

My general solution is

x(t) = c1e-5tcos(731t) + c2e-5tsin(731t) + 19/932 * cos(t/2) + 50/9599.6 * sin(t/2)

I haven't solved for constants yet.

9. Aug 4, 2013

### haruspex

I don't understand. You previously posted that you got weird values for the constants. Now you say you have not calculated them yet?
I'd rather you kept symbols in the equation rather than subbing in the numbers - it makes it easier to follow what you are doing. Writing x(t) = e-λt{A cos(αt) + B sin(αt)} + C cos(t/2) + D sin(t/2) I get λ = γ/m. You seem to have half that. And I get a somewhat larger value for D (haven't calculated C).