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.

## Physics library

### Course: Physics library>Unit 8

Lesson 2: Simple harmonic motion (with calculus)

# Harmonic motion part 2 (calculus)

We test whether Acos(wt) can describe the motion of the mass on a spring by substituting into the differential equation F=-kx. Created by Sal Khan.

## Want to join the conversation?

• in some books its given x= A sin wt and in some books it is x= Acos(wt). which one is right or are both of them correct??
• The thing is, the only difference between the two is where you start. The function A sin wt is just the function A cos wt displaced by 90 degrees (graph it on a calculator, you'll see). So, both are right. It just depends on how you decide to graph it.
If you start the oscillation by compressing a spring some distance and then releasing it, then x = A cos wt, because at time t=0, x=A (A being whatever distance you compressed the spring). But if you start the oscillation by suddenly applying a force to the spring at rest and then letting it oscillate, at t=0, x must equal 0. So in that case, x = A sin wt (sin0 = 0)
• what is the purpose of omega in the equation?
x(t) = A cos(wt)
• The omega is a constant in the equation that stretches the cosine wave left and right (along the x axis), just as the A at the front of equation scales the cosine wave up and down. The bigger the omega, the more squashed the cosine wave showing the spring's position (and thus quicker the spring's movement).
• Why w=square root of k/m not plus or minus square root of k/m ?. Isn't angular velocity a vector
• angular velocity is a vector but w is a magnitude of it
• why x(t)= A*cos(omega*t)? and wat is 'T'?
• x(t) = A*cos(omega*t) represents the function of the SHM. and T is the time period of the SHM, that is the time taken by the system to complete on cycle.. from A to O and to -A and again to O and again to A.
• If I keep a block attached to a horizontal spring on the floor of an elevator going up with an acceleration ‘a’, and then displace the block slightly by stretching the spring-block system horizontally, will the time period of oscillation change as compared to the (T=2π√m/k)?
I don't think it should, because the time period depends on the horizontal force, and the elevator changes it in the vertical direction, but my friend asserts that it should change, though she can't explain why. Which of us, if either, is correct?
• Here is a simulation of a mass on a vertical spring
Go to the simulation and try it out. You can measure the period of oscillation by clicking on the box for "stopwatch". To measure the period, measure the time for 10 or 20 bounces and divide by 10 or 20.
Now look over on the right side and you will see that you can change gravity from that of Earth to that of Jupiter. Go ahead and do that and see if gravity makes a difference to the period.

Now how does this apply to acceleration? When you are in an elevator accelerating up at a rate of a, that is exactly the same as if gravity increased from g to g+a. You can tell this by figuring out what your weight would be in the elevator - if you work it out you will see it will be m(g+a).

So if the period is the same on jupiter, that means it will also be the same in an accelerating elevator, and if it is different on jupiter, that means it will also be different in the elevator.

Once you know the answer by experiment, see if you can figure out why the answer is what it is.
• How would we solve a problem that is an oscillation but doesn't start where cos(wt) and sin(wt) start?
• That's a good question. The function would then be Asin(wt+k) where k is some constant.

If the graph is just shifted (horizontally) slightly, you add or subtract a constant that is equal to the amount by which it has been shifted on the x-axis.

When to add and when to subtract?
- Add when it is shifted to the left
- Subtract when it is shifted to the right

(1 vote)
• why acceleration= second derivative of the function x(t)?
(1 vote)
• Why do we have to take a double derivative?
• Because in the problem we are given the position of the particle. And it's known that if you differentiate the position of a particle (with respect to time), you get the velocity of the particle. You differentiate the result (the velocity of the particle) which then gives you the acceleration of the particle, which is why we have to take the double derivatie.
• at i understood with the differentiation of ω but why didn't the amplitude get squared?
(1 vote)
• The amplitude is just a constant. The ω was squared because it appeared inside of sin(ωt), and by the chain rule, (each time we differentiate a sin or cos) it falls out. It might be better if you saw the differentiation with and without A included in the original function:

f(t) = cos(ωt), f'(t) = -ω sin(ωt), f''(t) = -ω^2 cos(ωt).

Multiplying by a constant doesn't change the inner working of the derivative, so we just have:

x(t) = Acos(ωt), x'(t) = -Aω sin(ωt), x''(t) = -Aω^2 cos(ωt).

Hope this helped!