# Frequency of Vibration of Two Masses Joined by a Spring

1. Apr 26, 2017

### flamespirit919

1. The problem statement, all variables and given/known data
Two masses $m_1$ and $m_2$ are joined by a spring of spring constant $k$. Show that the frequency of vibration of these masses along the line connecting them is:
$$\omega =\sqrt{\frac{k(m1+m2)}{m1m2}}$$

2. Relevant equations
$x(t)=Acos(\omega t)$
$\omega =\sqrt{\frac{k}{m}}$
$m\frac{d^2x}{dt^2}=-kx$

3. The attempt at a solution
So I have that the distance traveled by $m_1$ can be represented by the function $x_1(t)=Acos(\omega t)$ and similarly for the distance traveled by $m_2$ is $x_2(t)=Bcos(\omega t)$. The force the spring exerts on these two masses is $−kx_n(t)=m_n\frac{d^2x_n}{dt^2}$. But I have no idea how to relate these functions. Plugging in the values I get the two functions $$-kAcos(\omega t)=-m_1A\omega ^2cos(\omega t)$$ $$-kBcos(\omega t)=-m_2B\omega ^2cos(\omega t)$$

Simplifying I get $$k=m_1\omega ^2$$ $$k=m_2\omega^2$$
But, then I don't know what to do after this or if I am even in the right direction.

2. Apr 26, 2017

### TSny

You are taking the force on m1 to be -kx1. But the elongation of the spring depends on both x1 and x2, not just x1.

3. Apr 26, 2017

### kuruman

Suppose you say that $m_1$ is displaced to the right by amount $x_1$ from equilibrium and that $m_2$ is also displaced to the right by amount $x_2$ from equilibrium. What is the amount by which the spring is stretched or compressed from equilibrium? Can you write a differential equation of motion for each mass (Newton's 2nd law)?

4. Apr 26, 2017

### flamespirit919

So would it be $$-k(x_1+x_2)=(m_1+m_2)(\frac{d^2x_1}{dt^2}+\frac{d^2x_2}{dt^2})$$$$-k(Acos(\omega t)+Bcos(\omega t)=(m_1+m_2)(-A\omega ^2cos(\omega t)-B\omega ^2cos(\omega t)$$ Which simplifies to $$k=\omega ^2 (m_1+m_2)$$ But, what can I do with this? Or did I go about this the wrong way?

5. Apr 26, 2017

### kuruman

No. If, say, $x_1$ = 3 cm and $x_2 = 5$ cm, would the spring be stretched by 8 cm? Draw a picture to scale, first with the spring in equilibrium and then redraw it with one end displaced by 3 units to the right and the other by 5 units also to the right. By how many units is the spring stretched? Knowing the stretching of the spring from equilibrium, gives you the force on each mass. Write separate differential equations for each mass.

6. Apr 26, 2017

### flamespirit919

The spring would be stretched by 2 units. Would the equations then be $$-k(x_2-x_1)=m_1\frac{d^2x_1}{dt^2}$$$$-k(x_2-x_1)=m_2\frac{d^2x_2}{dt^2}$$

7. Apr 26, 2017

### TSny

Almost. Does the force of the spring on m1 have the same direction as the force on m2?

8. Apr 26, 2017

### flamespirit919

No, so would it be $$k(x_2-x_1)=m_1\frac{d^2x_1}{dt^2}$$$$-k(x_2-x_1)=m_2\frac{d^2x_2}{dt^2}$$ Assuming that $m_1$ is on the left and $m_2$ is on the right.

Last edited: Apr 26, 2017
9. Apr 26, 2017

### TSny

Looks like some typos in your latest equations on the left side. Please check to see if you typed them the way you wanted.

10. Apr 26, 2017

### flamespirit919

Whoops. They should be fixed now.

11. Apr 26, 2017

### TSny

Looks good. Can you see a way to solve these equations?

12. Apr 26, 2017

### flamespirit919

I tried setting them equal to each other $$-m_1A\omega ^2cos(\omega t)=m_2B\omega ^2cos(\omega t)$$ But I end up with $$-m_1A=m_2B$$ I don't know what I can do after this.

13. Apr 27, 2017

### TSny

OK. This gives you a relation between A and B in the assumptions x1 = Acosωt and x2 = Bcosωt. Try to combine this result with the first differential equation k(x2 - x1) = m1d2x1/dt2.

14. Apr 27, 2017

### flamespirit919

Thank you! I wasn't sure which equation to plug the values into. Here's what I did $$k(Bcos(\omega t)-Acos(\omega t))=-m_1A\omega ^2cos(wt)$$$$k(Bcos(\omega t)+\frac{m_2B}{m_1}cos(\omega t)=m_2B\omega ^2cos(\omega t)$$$$kBcos(\omega t)(1+\frac{m_2}{m_1})=m_2B\omega ^2cos(\omega t)$$$$k(1+\frac{m_2}{m_1})=m_2\omega ^2$$$$k(m_1+m_2)=m_1m_2\omega ^2$$$$\omega ^2=\frac{k(m_1+m_2)}{m_1m_2}$$$$\omega =\sqrt{\frac{k(m_1+m_2)}{m_1m_2}}$$Did I do all my math right?

15. Apr 27, 2017

### zwierz

Let $x_1<x_2$ be coordinates of masses $m_1,m_2$ respectively. Then
$m_2\ddot x_2=-(x_2-x_1-l)k,\quad m_1\ddot x_1=(x_2-x_1-l)k$, here $l$ is the length of relaxed spring. Divide each equation by corresponding mass and subtract the second equation from the first one
$\ddot\xi=-(k/m_2+k/m_1)\xi+const,\quad \xi=x_2-x_1$ so that $\omega^2= k/m_2+k/m_1$

16. Apr 27, 2017

### TSny

Yes, I believe so.

Note that in your approach, you assumed x1 and x2 have time dependences of cosωt. That might be OK.

@zwierz shows how to get a differential equation that directly gives you the frequency without having to make any prior assumptions about the nature of the motion.