If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

### Course: AP®︎/College Physics 1>Unit 8

Lesson 1: Introduction to simple harmonic motion

# Equation for simple harmonic oscillators

David explains the equation that represents the motion of a simple harmonic oscillator and solves an example problem. Created by David SantoPietro.

## Want to join the conversation?

• Shouldn't the cosine function at 1 point compress and reach zero? I had his query because I thought that the block eventually reaches the equilibrium position.. It doesn't really have this constant oscillation between the maximum value and minimum value. Also, why has he used particularly he cosine function?
• Well, this is the idealized model, where the friction is neglected, so we assume that the block oscillates forever. As you have written it does not REALLY have this constant oscillation, but in this case it is "unreally".
He used cosine function just as an example. He assumed that at the time=0, the block is at the maximum value, but this was just an arbitrary assumption.
• What if the graph doesn't start at a miximum, minimum or 0?
• actually that situation is highly impossible....'cause in that case, the law of conservation of energy would not be valid anymore. just think about it.......if it started at 0.2 meters from the mean position, the amplitude keeps decreasing.....it can never keep increasing just like that......if it was pulled to 0.2 meters then the next time it may stretch upto only 0.18 meters probably. Even the example shown in the video is only hypothetical....no oscillation keeps going on on its own.......it stops at some time. So your given condition is actually never possible, even in a force free field.
• What does this function output again?
• Hello Ammar,

These oscillators can be tricky. We start with a physical movement such as a mass moving up and down on the end of a spring. We finish with trigonometry. At first this is very nonintuitive but I encourage you to keep working. This modeling of oscillators based on trigonometry is a very powerful technique.

Regards,

APD
• Will the spring vibrate infinitely in space or in vacumm
• As long as there is no friction, the vibration will continue indefinitely. In space, there will still be some internal friction in the spring itself as it stretches and compresses.
• Sine and Cosine are just shifted versions of each other. Does it really matter which trig function I use ?
• No, it does not. You just need to adjust the phase angle.
• Why don't you account for the phase angle? In my textbook it has the equation as x = A cos ( wt + (greek letter phi)). It says Greek letter phi = phase angle. Thank you
• In the video, the spring starts from the amplitude [At t=0]
Therefore we use x(t)=Acos(wt).

If we start from some distance 'x', the equation of motion will be
x(t)=Acos(wt + Φ)
At t=0
x will NOT be A,
It will be x = Acos(Φ).
Hope you understood...
• if the formula for cosine is: x(t)= A cos(wt), then what will be there for the sine?
• x(t) = Asin(wt)

The curve is sine if it starts at equilibrium position. It is cosine if it starts at an extreme position, ie the turning points.
• Let me preface this by saying that this is a question.

Where f(x) = A(cos(Bt - h)) + k, the B value, or horizontal stretch/compression factor, in order to equal 6 seconds, must be (π/3).
The standard oscillatory trigonometric equation has a period of (2π). The equation to determine the period of an oscillatory trigonometric equation is [ P = (2π) / |B| ].
Setting P = 6, we get:
[ P = 6 = (2π) / |B| ]
[ ( |B| / (2π) ) = ( 1 / 6 ) ]
[ |B| = ( (2π) / 6 ) ]
{ |B| = ( π / 3) }

Why is 6 seconds put in the video as the absolute value of the horizontal stretch/compression factor when that is not the case? The next example appears to have an incorrect period as well.
• You're way to smart for me, and I don't understand your equation, but I think that the six second period was just what he chose to use for the example.
• if the function starts from x=0, do we need replace cosine to sine so it would be like x(t)=Asin(wt)?
in my course book, the equation is x(t)=Asin(wt+ϕ) ? is there any difference between this equation and x(t)=Acos(wt)?
(1 vote)
• cos(wt) = sin(wt+pi/2). This is what we call a phase shift of pi/2. Basically, a cosine wave is a sine wave pushed forward by pi/2 radians. The best way to a SH oscillator is either Asin(wt+phi) or Acos(wt+mu). To determine the phase shift, (phi/mu) we need boundary conditions. For example, we need to know what the speed of the oscillator is at t=0. Using such a condition gives us the phase shift and allows us to fully understand the wave's motion.