Contents 
There
are four different kinds of motion that we can encounter in Physics:
Linear
(in a straight line)
Circular
(going round in a circle)
Rotational
(spinning on an axis)
Oscillations (going backwards and forwards in a toandfro movement.)
Anything
that swings or bounces or vibrates in a regular toandfro motion is said to oscillate.
Examples include a swinging pendulum or a spring bouncing up and down.
It is said that the regularity of a swinging object was first described
by a teenage Galileo who watched a chandelier swinging during a church service
in Pisa.
Simple
Harmonic Motion
(SHM) describes the way that oscillating objects move.
Consider a
spring with a mass going from side to side.
A mass is mounted on a small railway truck, which is free to move from
side to side, and there is negligible friction in the truck. The system is
perfectly horizontal so that we don't have to worry about gravity.
The
rest or equilibrium position at O
is where the spring would hold the mass when it is not bouncing.
A is the position where the
spring is stretched the most, and B
is where the spring is squashed most.
At
A there is a large
restoring force because that is where the spring is stretched most.
As a result of this the mass is accelerated. It accelerates towards the rest position.
Which way is the restoring force? Why is there acceleration? In which direction is the acceleration? 
When the truck is released:
Its
velocity to the left increases.
The
acceleration decreases as the mass approached the rest position.
Because
of inertia, the mass overshoots the rest position.
Then
the spring is being compressed, and there is a restoring force to the right.
At
B the acceleration is at a
maximum, but this time to the right.
At both A and B, the potential energy is at a maximum; the kinetic energy is zero.
Write down the formulae that describe kinetic energy and the elastic potential energy in a spring. (The latter formula is NOT E_{p} = mgDh). 
As the mass
passes the equilibrium position, there is zero potential energy, but maximum
kinetic energy because this is the point at which the object has its greatest
velocity (upwards or downwards). Therefore
there is an interchange between potential
and kinetic energy. The
process is never 100 % efficient; some energy is lost as heat and the process is
not indefinite.

We can write down a relationship between the acceleration, a, and the displacement, x.
F= ma and F = kx
Therefore
a = F/m = kx/m
So we are saying that the acceleration is proportional to the displacement from the equilibrium position. However that is not the whole story. Acceleration is a vector, so we must be careful of the direction. The acceleration is towards the equilibrium position.

For
all cases:
If the acceleration of a body is directly proportional to its distance from a fixed point and is always directed towards that point, the motion is simple harmonic.
In
code we can write:
a ΅ x
ή
a =
 kx
where
k
is a
constant.
The minus sign is important as it tells us that the acceleration is towards the equilibrium position.
Since force, F, is directly proportional to acceleration by Newton II, we can also write:
F = kx
This is Hooke's Law. With a bouncing spring, this is obvious. However it is true for any system that oscillates with simple harmonic motion.
These
relationships are derived by linking SHM to circular motion.
Generally we measure the period, which is the time taken to make a complete oscillation or cycle. The frequency is the reciprocal of the period:
Acceleration
can be linked to displacement by:
a =  (2pf )^{2} x
This
satisfies the condition for SHM that
a =
kx;
in this case
k =
(2pf
)^{2}.
Angular
velocity
is a quantity that is borrowed from circular motion. It is sometimes called angular frequency. It is the angle turned per second. In SHM terms, we can consider it as the fraction of a cycle
per second. It can be, of course,
greater than 1:
w = 2pf
In
some texts you may see the equation for acceleration in SHM written as:
a
= 
w^{2 }
x
The
speed at any point in the
oscillation given by:
v^{2} = (2pf )^{2}(A^{2} x^{2})
ή v^{2} = 4p^{2}f ^{2}(A^{2} x^{2})
ή v = 2pf Φ(A^{2} x^{2})
In this relationship,
A
is the amplitude and
s
is the displacement
from the equilibrium position. If
x
= 0,
v has a maximum value; if
x = A,
v = 0.
The velocity is 0 at each extreme of the oscillation.
v_{max} = 2pfA
Note that the relationship only gives the speed (the magnitude of the velocity). This is because the displacement is squared, so the minus sign disappears. The relationship that gives velocity is:
v = Aw sin (wt)
The
displacement,
s, is given by:
s = ± A cos 2pft
The displacement can be shown graphically:
Note that the displacement follows the cosine function. That is because we have to start the oscillator by displacing it. It won't do it from the rest position.
The plus and minus sign here tells us that the motion is forwards and backwards. Which sign we give for direction is up to the individual. Generally left to right is forwards. All these equations are true for any simple harmonic motion. We can show the relationships graphically by showing displacement, velocity, and acceleration against time:
These
graphs are sinusoidal.
The displacement is
p/2 radians (90 ^{o} or Ό cycle)
behind the velocity. The
displacement and acceleration are
p
radians out of phase.
A particle moving with simple harmonic motion has velocities 4 cm s^{1} and 3 cm s^{1} at distances of 3 cm and 4 cm respectively from the equilibrium position. What is the amplitude of the oscillation? What is the velocity of the particle as it passes the equilibrium position? 
Answer
We
know that
v^{2}
= 4p^{2}f
^{
2}(A^{2} x^{2})
ή
v = 2pf
Φ(A^{2}
x^{2})
[A
 amplitude,
s
displacement]
When
x
= +3 cm,
v
= 4 cm s^{1}; when
x
= + 4 cm,
v
= 3 cm s^{1}.
We dont know what
f
is.
We can substitute the numbers
into the equations:
4^{2}
= 4p^{2}f
^{
2}(A^{2} 3^{2})
[1]
3^{2}
= 4p^{2}f
^{
2}(A^{2} 4^{2})
[2] 
To
get rid of the 4p^{2}f
^{2}
we need to divide [1] by [2]:
16 = A^{2
} 9
9 A^{2
} 16 
Rearranging:
ή
16(A^{2 } 16) = 9(A^{2
} 9)
ή
16A^{2
} 9A^{2 } =
256 81
ή
7A^{2} = 175
ή
A^{2}
= 175
Έ
7 = 25
ή
A
= 5 cm 
Now we can find the period by finding w. Since w = 2pf, we can rewrite the equation v^{2} = 4p^{2}f ^{2}(A^{2} x^{2}) as v^{2} = 4w^{2}(A^{2} x^{2}) :

Now
we can work out the velocity at the equilibrium point (s
= 0).
v^{2} = 1(25
0) = 25
ή
v
=
5
cm s^{1} 


A
punchbag of mass 0.60 kg is struck so that it oscillates with SHM. The
oscillation has a frequency of 2.6 Hz and an amplitude of 0.45 m. What is:
(a)
the maximum velocity of the bag;
(b)
the maximum kinetic energy of the bag? (c) What happens to the energy as the oscillations die away? 
You must make sure your calculator is set to radians. 
Consider the system at the start of the tutorial, the small railway truck on a perfectly horizontal track. The total mass of the truck is m kg, the maximum displacement is x m, and the spring constant of the spring is k N m^{1}. There is negligible friction.
From Hooke's Law we know that to displace the truck by x m to the right, we have to apply a force of F N. We can say that:
F = kx
Since the force from the spring is towards the rest position (i.e. from right to left), we need to take account of the direction by adding a minus sign:
F = kx
We also know from Newton II that:
F = ma
From linear motion we know that:
We are using x as code for displacement rather than s.
We combine this with Newton II to give:
We also combine this with Hooke's Law equation to write:
And this rearranges to:
The solution to this requires the mathematical concept of complex numbers (i^{2} = 1) and de Moivre's Theorem (No, I have not heard of it before and yes, I looked it up) and is beyond what we need to consider at this level.
Therefore we write the solution to the second order differential equation as:
Strictly speaking we should add a constant, k:
x = A cos (wt + k)
This equation shows that the displacement is positive. By convention, we start the oscillation with a positive displacement. Work has to be done to make the initial disturbance.
Note that other sinusoidal waveforms are often described by the equation:
x = A sin (wt)
By convention these waveforms start at zero displacement. Watch out for the context of the sinusoidal waveform.
Maths Note The differential of cos K x is given by the general equation:
where K is a constant.
Don't forget that the expression has to be multiplied by K, the constant.
Similarly the derivative of K sin x is this:

The constant represented by K in the maths note is w, the angular velocity. The velocity can be worked out:
And the acceleration:
A simple harmonic oscillator has a frequency of 3.0 Hz, and an amplitude of 0.080 m.
(a) Calculate the angular velocity and give the correct units.
For a time of 2.3 s, work out: (b) the displacement; (c) the velocity; (d) the acceleration. Give your answer to an appropriate number of significant figures. 
You must make sure your calculator is set to radians. 