What Is a Harmonic Oscillator?

A harmonic oscillator is a wave that has a constant period and amplitude for all of its oscillations. These oscillations are particularly important in physics, and when solving differential equations. The expression for a harmonic oscillator is the simplest type of oscillation you will come across.

Graph of harmonic oscillator with period and phase shift

Theory

Harmonic Oscillator

A harmonic oscillator is a wave given by

y = A sin(cx + ϕ) + d

where

d = equilibrium, A = amplitude, ϕ c = phase, 2π c = period

The equilibrium tells you the balancing point of the graph, which means that the plot of the graph is as equally above this point as it is below it. You can find the equilibrium of a sine function by finding the average of the maximum and the minimum of the graph.

Formula

Equilibrium

d = ymax + ymin 2

The amplitude tells you the distance between the maximum and the minimum, and the equilibrium. You find the amplitude by taking the distance between the maximum and the minimum and divide it by two.

Formula

Amplitude

A = ymax ymin 2

The number c in front of x shows you how fast the graph is oscillating—that means it determines the period P of the graph. The relationship between P and c is P c = 2π. You find the period by finding the difference between two subsequent maxima or minima x1 and x2.

Formula

Period

P = 2π c = x2 x1

The phase tells you how much the graph is shifted along the x-axis in relation to the basic sine or cosine function. The value of the phase is ϕ c. For a sine function, this means that ϕ c is the distance between 0 and the closest point where a rising graph passes the equilibrium.

Formula

Phase

ϕ c

The phase is positive when ϕ c < 0. That means the graph is shifted towards the right.

The phase is negative when ϕ c > 0. That means the graph is shifted towards the left.

Example 1

Example of function of harmonic oscillator

Find an expression for the graph above. Use the sine function.

We begin by finding the equilibrium. The maximum is ymax = 6, while the minimum is ymin = 2. That means the equilibrium is

d = 6 + (2) 2 = 2

Next, you find the amplitude:

A = 6 (2) 2 = 4

You can read off the graph that the function has a maximum at x = 1 2 and a subsequent maximum at x = 9 2. This gives you a period of

9 2 1 2 = 8 2 = 4

Now that you have the period, you can find c as well:

p = 2π c = 9 2 1 2 = 4 c = 2π 4 = π 2

Finally you need to find the phase ϕ. You can see from the graph that the first time the graph rises past the equilibrium after x = 0 is when x = 7 2. That gives you

ϕ c = 7 2 ϕ = 7 2 π 2 = 7π 4

Since the graph is shifted towards the right, you have ϕ < 0, which means that you must change the sign into ϕ = 7π 4 . Now you can express the graph as a sine function:

y = A sin(cx + ϕ) + d = 4 sin (π 2x + 7π 4 ) + 2

y = A sin(cx + ϕ) + d = 4 sin (π 2x + 7π 4 ) + 2

Want to know more?Sign UpIt's free!