# Deriving equation of simple harmonic motion

1. Dec 27, 2011

### johnathon

Derivation of simple harmonic motion

I'm looking at the wikipedia page for simple harmonic motion (http://en.wikipedia.org/wiki/Simple_harmonic_motion) and I'm confused by this line:
$$c_1cos(\omega t) + c_2sin(\omega t)=A*cos(\omega t - \phi)$$
How did they get from the left hand side to the right hand side?
Also what is the significance of omega? Apparently it means angular frequency but why does it equal $$\sqrt{\frac{k}{m}}$$

Last edited: Dec 27, 2011
2. Dec 28, 2011

### JHamm

Do you know how to expand $\cos (\omega t - \phi)$?

3. Dec 28, 2011

### technician

The meaning of ω in SHM.
Harmonic motion is defined as oscillations that come about when a mass is displaced from its equilibrium position. Oscillations occur if the mass experiences a RESTORING force acting back towards the equilibrium position. SIMPLE harmonic motion occurs when the restoring force is proportional to the displacement.
i.e the defining equation for SHM is F = -kx (- because it is a restoring force and displacement is a vector) K is a constant and = F/x i.e it is a STIFFNESS of the system (units = N/m)

This means that the acceleration in SHM = F/m = -(k/m)x
SHM is very closely linked to circular motion..... you could say that SHM is circular motion viewed 'edge on'......All of the equations in SHM can be seen in the associated circular motion.
In particular the maximum acceleration in SHM (at max displacement) is equal to the acceleration in the circular motion...
This gives -(k/m)A = ω^2 A (radius of circle is equivalent to amplitude in SHM r = A..)
so ω^2 = k/m
The max velocity in SHM (at zero displacement) v = ωA .... the equivalent velocity in circular motion.

Hope this helps

4. Dec 28, 2011

### vanhees71

As already said, the equation of motion reads

$$m \ddot{x}=-k x,$$

where on the right-hand side Hook's Law for a spring has been applied. It's valid, if the elongation of the spring is not too large.

Setting [\itex]\omega=\sqrt{k/m}[/itex] gives

$$\ddot{x}+\omega^2 x=0.$$

This is a linear ordinary differential equation with constant coefficients. It's general solution is the superposition of two linearly independent solutions. Here, we have a real equation, and thus we chose two real solutions, leading to

$$x(t)=a_1 \cos(\omega t)+b_1 \sin(\omega t).$$

The two integration constants, $a_1$ and $a_2$, are fixed by appropriate initial conditions. In our case we need to specify $x(t_0)$ and $\dot{x}(t_0)$.

The other form of the solution can be found as follows: Just use the theorem for additions of angles in the cosine:

$$\cos(\alpha-\beta)=\cos \alpha \cos \beta+\sin \alpha \sin \beta.$$

From this you get

$$x(t)=a_1 \cos(\omega t)+b_1 \sin(\omega t) = A \cos(\omega t-\phi)=A [\cos(\omega t) \cos \phi + \sin(\omega t) \sin(\phi)].$$

The two expressions can only be equal if the two coefficients in front of the two linearly independent solutions are equal, and thus you find

$$a_1=A \cos \phi, \quad a_2=A \sin \phi.$$

Usually one choses $A>0$. From this you get

$$A=\sqrt{a_1^2+a_2^2}$$

and then

$$\phi=\mathrm{sign}(a_2) \arccos \left(\frac{a_1}{A} \right ).$$

This gives you the phase shift, $\phi$, in a range between $-\pi$ and [/itex]\pi[/itex].

Sometimes you find also an equation using the tangens, but this is not good since you don't get the full range of angles in an interval of the length of $2 \pi$ from it!

5. Dec 28, 2011

### johnathon

But I thought that the initial conditions were that $$x(0)=A$$ and $$x'(0)=0$$
So doing that I get:
$$a_1=A$$
$$b_1=0$$
So I'm left with:
$$x(t)=A*cos(\omega t)$$
Why's what I did wrong?

6. Dec 28, 2011

### Staff: Mentor

Nothing wrong with what you did, but it's just not general enough. You chose t = 0 to be the point where the object is at maximum displacement; under that assumption, your result is correct. But that assumption is arbitrary. You can set t = 0 at any point in the motion. That's why the most general description has a phase factor.

7. Dec 28, 2011

### johnathon

In what situations would you not want t=0 to be at max displacement? Would an example be when I release it at equilibrium but give it a bit of a push? And I'm still kind of confused at the what the phase angle is? Do you know of an example that links all the stuff together?

Last edited: Dec 28, 2011
8. Dec 28, 2011

### johnathon

And isn't using the addition formula defeating the purpose of a derivation because you're going from the solution then working backwards with that?

9. Dec 28, 2011

### Staff: Mentor

The point is that the starting point (t = 0) for describing the motion is arbitrary. If you get to choose the starting point, you can use whatever you like.
Sure. But don't get hung up on the idea of how the motion started. Something is oscillating in SHM. You can start your timer at any point in the motion--when it's at maximum displacement, when it's at equilibrium, or any point in between. You should be able to produce an expression that describes the position as a function of time.
The phase angle is just a way of describing where your starting point is for plotting the position as a function of time. If phase = 0, that means (using the cosine form) that you are starting at maximum displacement; if phase = 90°, it means you are starting at equilibrium. The motion is the same, just the description changes.

An example where you will want to use a phase angle might be: At t = 0 you are given the position and velocity of the object. You are asked to come up with an expression for the position at any time.
No. The general solution of the differential equation will be some combination of sine and cosine functions.

10. Dec 28, 2011

### technician

whatever version of the equations you use must give max acceleration at max displacement (the amplitude) and max velocity passing through the equilibrium point (displacement = 0)

11. Dec 28, 2011

### johnathon

Ah thanks, that makes a lot more sense

But what I'm trying to say is, if you hadn't seen the equation before how would you know that:
$$a_1cos(\omega t) + b_1sin(\omega t)=A*cos(\omega t-\phi)$$

12. Dec 28, 2011

### technician

Here is a diagram I use with my students to , hopefully, clear up the timing issue.
I have shown the 2 most common starting points....at the equilibrium position or the max displacement

#### Attached Files:

• ###### shm.jpg
File size:
93.6 KB
Views:
1,431
13. Dec 28, 2011

### johnathon

Thanks, I get the timing thing now. But I still don't get how you continued from:
$$x(t)=c_1cos(\omega t)+c_2sin(\omega t)$$
If I were to take initial conditions:
$$x(0)=x_0$$
$$x'(0)=v_0$$
I get:
$$x(t)=x_0cos(\omega t)+\frac{v_0}{\omega}sin(\omega t)$$

14. Dec 29, 2011

### johnathon

Ok. I draw out the cosine graph and I think I'm able to see why:
$$x_0=A*cos(\phi)$$
Is it because you're scaling the cosine function by the amplitude, so instead of going from -1 to 1 it's going from -A to A?
But I still can't figure out why:
$$\frac{v_0}{\omega}=A*sin(\phi)$$
I kind of see that v is the derivative of x and -sin is the derivative of cos so I see how that works. I just don't see how the 1/omega comes into it

15. Dec 29, 2011

### technician

I think you should have
x = ACos(ωt)
then v = dx/dt = -ωASin(ωt)
and then a = dv/dt = -ω^2.A.Cos(ωt)

16. Dec 29, 2011

### johnathon

But why does
$$\frac{v_0}{\omega}=A*sin(\phi)$$

17. Dec 29, 2011

### technician

Is it not just v = -ωASin(ωt) rearranged to be

v/ω = -ASin(ωt)

18. Dec 29, 2011

### johnathon

I'm looking at this:
http://people.ccmr.cornell.edu/~muchomas/P214/Notes/SHM/notes.pdf [Broken]
I completely get how the formula gets there now apart from one thing:
$$\phi=\omega t_{el}$$
where t_el is the time since the last maximum displacement.
Why is that?

Edit: Think I've finally got it. Is it because omega is the angular speed, so the angular speed multiplied by the time since the last max displacement will be the angle on the graph since the last displacement (which is the phase shift)?

Last edited by a moderator: May 5, 2017
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook