In order for an object to oscillate, there must be a force acting on it. A constant force will just give an object constant accelleration (for instance, an object falling under the force of gravity). What we need is a force that depends on the position of the object (or the position of one part of the object relative to the rest of the object). The simplest such dependence is linear

F = -kx

whereA more complicated force is also possible (including the dependence on time, velocity, acceleration, and so on), but in physics we always start with the simplest case and treat the rest as a perturbation.

Let's apply the Newton's law of motion to our system--the acceleration of an object is equal to force divided by mass.

a = F/m

or, in our case

a = -kx/m

Considering that the acceleration is the second derivative of position with respect to time (we treat position *x* as a function of time *t*), we get

d^{2}x(t)/dt^{2} = -ω^{2}x(t)

where we have introduced a new parameter ω, a shorthand for sqrt(k/m) (square root of k/m).

To solve this differential equation we have to find a function x(t) whose second derivative, d^{2}x(t)/dt^{2}, is negatively proportional to the function itself. It so happens that there are two such functions, *sin* and *cos*, so the most general solution of our equation is

x(t) = a sin(ωt) + b cos(ωt)

where *a* and *b* are two arbitrary constants. Using some trigonometry, this solution can be also rewritten as:

x(t) = A sin (ωt + φ)

with another set of arbitrary constants, *A* and *φ*. In this form *A* is called the *amplitude* and *φ* is called the *phase*.

d sin(t)/dt = cos(t)

d cos(t)/dt = -sin(t)

so, for instance,d^{2}cos(t)/dt^{2} = -cos(t)

You also need the identity:

sin (a + b) = sin (a) cos (b) + cos (a) sin (b)

When applied to A sin (ωt + φ), it givesA sin (ωt) cos (φ) + A cos (ωt) sin (φ)

= A cos (φ) sin (ωt) + A sin (φ) cos (ωt)

= a sin(ωt) + b cos(ωt)

a = A cos (φ), b = A sin (φ)

The amplitude tells you how strong the oscillation is, the phase tells you at what stage of oscillation the system was at time t = 0. Since the origin of time is quite arbitrary, the absolute phase is physically meaningless. What matters is the relative phase when you are combining two or more sine waves (which we will do soon).

The sine function repeats itself indefinitely with the period 2π (we are using radians to measure angles). In particular, since sin (a + 2π) = sin (a), we have

x (t + 2π/ω) = A sin (ω (t + 2π/ω) + φ)

= A sin (ωt + 2π + φ) = x (t)

The oscillation repeats every 2π/ω seconds. In other words, there are ω/2π oscillations per second. The number of oscillations per second is called the *frequency*:

f = ω/2π = sqrt (k/m)/2π

We can now rewrite our solution in terms of frequency:

x (t) = A sin (2πft + φ)

Notice how the frequency of oscillations depends on k and m. The stiffer the object (higher k, stronger the force pulling it back to equilibrium), the higher the frequency. That's why when you increase the tension of a string in a guitar, you produce a higher pitch. On the other hand, the bigger the mass, the lower the frequency. That's why base strings are made thicker and heavier.

Incidentally, this also explains why small animal have high-pitched voices (a mouse doesn't roar--it squeaks). They have very little mass available, so they would need very low tension oscillator to produce low pitch. Imagine trying to excite a very tiny rubber band with virtually no tension applied to it (small k)! Even if you were successful in doing it, a slowly oscillating small object is very inefficient in converting vibrational energy to sound. That's because the air has enough time to flow around around a small object, rather than undergo compression. Without compression there is no sound wave. In fact a string in a base instrument radiates very little sound energy. It's the large resonating box that efficiently converts low-frequency oscillations into sound waves. So if a mouse wanted to roar, it would have to find a very large resonator.