# Differential equations: period of a mass on a hanging spring

1. Jun 22, 2009

### OEP

Hey guys. This was a homework problem (I could never figure it out) and I asked my instructor for help as well as researching on the Internet, but still no dice. It seems basic enough but it bothers me that I still don't know how to solve it.

1. The problem statement, all variables and given/known data

Show that the period of the simple harmonic motion of a mass hanging from a spring is $$2 \pi \sqrt{l/g}$$, where $$l$$ denotes the distance beyond the spring's natural length when the mass is at equilibrium.

2. Relevant equations

I figured the differential equation we should solve is a simple mass-on-a-spring case but with the external force being mass-gravity. That is:
$$my'' + ky = mg$$.

3. The attempt at a solution

The general solution looks something like:

$$c_1 cos(\sqrt{\frac{k}{m}}t) + c_2 sin(\sqrt{\frac{k}{m}}t) + y_p$$

For now, let's say:

$$\omega := \sqrt{\frac{k}{m}}$$

Now we need to solve for $$y_p$$.

I did this in the two ways I know how, that being method of undetermined coefficients and variation of parameters. Both of them ended in some pretty nonsensical solutions (0 = mg??).

For the sake of comparison, after using the method of variation of parameters, I ended up with this particular solution and resulting position function:

$$y_p = \frac{g}{\omega(1+\omega)}$$

(I know that can't be right since it's a constant.)

$$y(t) = (L - \frac{g}{\omega(1+\omega)}) cos(\omega t) + \frac{g}{\omega(1+\omega)}$$

Where L is the natural length of the spring (I used the initial conditions y(0) = L, y'(0) = 0).

Anyone want to take a whack at it or point me to where someone already has?

2. Jun 22, 2009

### Dick

You usually want to do this by working in a variable where u=0 is the equilibrium position. Then mu''+ku=0. I.e. y=u+mg/k. What's wrong with that? A particular solution in the variable y is y=mg/k, isn't it? No call for variation of parameters or anything.

3. Jun 23, 2009

### HallsofIvy

"where $$l$$ denotes the distance beyond the spring's natural length when the mass is at equilibrium."
The initial conditions "y(0)= L, y'(0)= 0" give no motion at all! The spring is sitting motionless at its natural length so there is no force on it. You want y(0)= L+ l, y'(0)= 0.

4. Jun 23, 2009

### OEP

I get the feeling there's some sort of progression of logic that does involve variation of parameters given that this is from a math book and is from a chapter that is trying to teach how to use MUC/VoP.

There wouldn't be? I thought of it like this:

y(0) = L would be like if the spring were hanging with no mass on it. The spring, under its own weight, wouldn't stretch noticeably beyond its natural length. As soon as you attach a mass to it and let the oscillations settle, the mass would be at length L + l.

5. Jun 23, 2009

### Dick

A particular solution IS a constant. If you used VOP and got yp=g/(w*(w+1)) you came pretty close but you made a mistake. Not surprising, VOP is complicated. You should have gotten g/w^2=g/sqrt(k/m)^2=g/(k/m)=mg/k. But VOP is massive overkill for that. You can tell a constant is a solution by inspection.

Last edited: Jun 23, 2009
6. Jun 23, 2009

### OEP

Thanks :)

Since you mentioned that, I remembered another time where I solved for a particular solution mg/k with just algebra, but it didn't occur to me to use it as y_p.