Physics Library
 An open source physics library
Encyclopedia | Forums | Docs | Random  

[parent] M06-01 Simple Harmonic Motion

(Definition)

Simple Harmonic Motion

Simple harmonic motion is the motion generated by a linear restoring acceleration:

|-------2--|
x¨=--−-ω-x.-
(1)

Equivalently,

|-----2------|
x¨+-ω--x-=-0.-
(2)

The displacement

x
(3)

is measured from equilibrium.

The constant

ω > 0
(4)

is the angular frequency.

The defining physical feature is that acceleration is:

  • proportional to displacement,
  • opposite in direction to displacement.

The solution is sinusoidal, but the deeper structure is broader than a sine wave.

Because the equation of motion is second order, the complete instantaneous state requires both position and velocity:

|--------------|
-state =-(x,-v).|
(5)

Once

x0 = x(0)
(6)

and

v  = v(0)
 0
(7)

are specified, the equation of motion determines the complete future and past motion.

PIC

Figure 1. A mass attached to an ideal spring provides the standard model of simple harmonic motion. Displacement from equilibrium produces a restoring force directed back toward equilibrium.

1 Spring-mass derivation

For an ideal spring,

|----------|
Fx--=-−-kx,-
(8)

where

k > 0
(9)

is the spring constant.

Newton’s second law gives

m ¨x = − kx.
(10)

Therefore

     k-
x¨+  m x = 0.
(11)

Define

|----------|
|    ∘ --- |
|ω =    k-.|
--------m---
(12)

Then

|------------|
x¨+ ω2x  = 0.|
--------------
(13)

The angular frequency has dimensions

[ω ] = T −1.
(14)

2 Why the force is called restoring

If

x > 0,
(15)

then

F  =  − kx < 0.
  x
(16)

If

x < 0,
(17)

then

Fx =  − kx > 0.
(18)

In either case, the force points toward

x = 0.
(19)

The equilibrium is therefore stable.

PIC

Figure 3. The Hooke-law force is a straight line through the origin with negative slope. Positive displacement produces negative force, and negative displacement produces positive force.

3 Solving the differential equation

Consider

x¨+ ω2x  = 0.
(20)

A general real solution is

|--------------------------|
|x(t) = C cosωt + D sin ωt.|
----------------------------
(21)

Differentiate:

|------------------------------|
v (t) = − ωC  sin ωt + ωD  cos ωt.|
--------------------------------
(22)

Differentiate again:

a(t) = − ω2C  cosωt − ω2D  sin ωt.
(23)

Thus

|----------------|
|a(t) = − ω2x (t),
-----------------
(24)

as required.

4 Position, velocity, and acceleration phase relations

For the special form

x (t) = A cos(ωt + δ),
(25)

the velocity is

v(t) = − ωA sin(ωt + δ),
(26)

and the acceleration is

          2
a (t) = − ω A cos(ωt + δ).
(27)

Therefore:

  • velocity is shifted by one-quarter cycle relative to displacement,
  • acceleration is opposite displacement,
  • velocity is largest in magnitude at equilibrium,
  • acceleration is largest in magnitude at the turning points.

PIC

Figure 2. Position, velocity divided by ω, and acceleration divided by ω2 are sinusoidal functions with fixed phase offsets.

5 Period and frequency

The motion repeats when the phase increases by

2π.
(28)

Thus

ωT  = 2π.
(29)

Therefore

|--------|
|    2 π |
|T = ---.|
------ω---
(30)

The ordinary frequency is

     1
f =  --,
     T
(31)

so

|-----ω--|
|f = ---.|
-----2π---
(32)

For the spring-mass oscillator,

|-------∘----|
|         m  |
T  = 2π   --.|
----------k---
(33)

The ideal linear oscillator period is independent of amplitude.

6 Initial conditions determine the motion

Let

x (0) = x ,    v(0) = v .
         0             0
(34)

Start with

x(t) = C cosωt + D sin ωt.
(35)

At

t = 0,
(36)

x0 = C.
(37)

From

v (t) = − ωC  sin ωt + ωD  cos ωt,
(38)

we obtain

v0 = ωD.
(39)

Therefore

|--------|
|     v0 |
-D-=--ω-.-
(40)

The initial-value solution is

----------------------------
|                 v0        |
x (t) = x0 cosωt + -- sin ωt. |
-------------------ω--------|
(41)

The corresponding velocity is

|------------------------------|
-v(t) =-− ωx0-sin-ωt +-v0cosωt.|
(42)

The factor

v0∕ω
(43)

is required both by the initial condition and by dimensional consistency.

7 Amplitude from initial position and velocity

Write the solution in the form

|--------------------|
x (t) = A sin(ωt + ϕ).|
----------------------
(44)

Use the angle-addition identity:

x(t) = A sin ωt cos ϕ + A cos ωt sin ϕ. (45)

Compare with

x (t) = v0 sin ωt + x0 cosωt.
        ω
(46)

Therefore

|-------------|
|         v0  |
A cos ϕ = ω , |
---------------
(47)

and

|------------|
A--sin-ϕ-=-x0.-
(48)

Square and add:

           v20
A2 = x20 + --2.
          ω
(49)

Hence

|----∘-------------|
|        2  ( v0)2 |
A  =   x 0 +  --  .|
--------------ω-----
(50)

Thus the amplitude is determined by the complete initial state, not by initial position alone.

8 Dimensional check

The two terms under the square root must have the same dimensions.

Because

[x0] = L,
(51)

and

[v0] = LT − 1,   [ω] = T− 1,
(52)

[  ]
 v0
 ω   = L.
(53)

Therefore

 2   ( v0)2
x0 +   --
       ω
(54)

has dimensions

L2,
(55)

as required for

A2.
(56)

Dimensional analysis provides a fast check on initial-condition formulas.

9 Phase from the initial state

From

A sin ϕ = x0
(57)

and

          v0
A cos ϕ = --,
          ω
(58)

the phase can be obtained with the quadrant-aware function

|--------------------|
|          (    v0)  |
|ϕ = atan2  x0, ω   .|
---------------------
(59)

Using a one-argument inverse tangent can lose quadrant information.

Different sine or cosine phase conventions produce equivalent formulas with correspondingly shifted phase constants.

10 Example 1: amplitude and phase from an initial state

Let

ω = 4.0 rad ∕s,
(60)

with

x0 = 0.30 m,     v0 = 0.80m ∕s.
(61)

Then

v0 = 0.20m.
ω
(62)

The amplitude is

A = ∘  -----2---------2-
   (0.30 ) + (0.20) (63)
= √ ----
  0.13 (64)
≈ 0.361 m. (65)

For the sine convention,

ϕ =  atan2 (0.30,0.20) ≈ 0.983 rad.
(66)

Thus

|------------------------------|
|x(t) ≈ 0.361 sin(4t + 0.983) m.|
--------------------------------
(67)

11 The state of the oscillator

The equation

¨x + ω2x = 0
(68)

is second order.

Define

v = ˙x.
(69)

Then it becomes two first-order equations:

ẋ = v, (70)
v = −ω2x. (71)

The pair

|------|
-(x,v)-|
(72)

is therefore a complete state description.

At a given position, velocity distinguishes whether the oscillator is:

  • moving toward increasing x,
  • moving toward decreasing x,
  • instantaneously at rest.

Position alone is not enough to specify the state.

12 State-space matrix form

Define the state vector

    [  ]
z =   x .
      v
(73)

Then

|----[-------]---|
|       0   1    |
|˙z =  − ω2  0  z.|
------------------
(74)

The exact state evolution is

|---------[-----------------]-------|
[    ]                sinωt- [   ]  |
|x (t)  =     cosωt      ω      x0 . |
| v(t)      − ωsin ωt  cosωt    v0   |
-------------------------------------
(75)

Thus the initial state uniquely determines the state at every later time.

13 The phase plane

Eliminate time using the amplitude relation.

For any time,

x = A sin(ωt + ϕ),
(76)

and

v = ωA  cos(ωt +  ϕ).
(77)

Therefore

|--------------|
| 2   v2     2 |
|x +  -2-= A  .|
------ω---------
(78)

Equivalently,

|----------------|
|x2-   -v2--     |
|A2 +  ω2A2 =  1.|
------------------
(79)

The trajectory in the

x − v
(80)

phase plane is an ellipse.

PIC

Figure 4. The SHO state moves around an ellipse in the position-velocity phase plane. Each point (x,v) specifies the complete instantaneous state.

14 Scaled phase plane

Define a scaled velocity coordinate

|-------|
|    v- |
u =  ω. |
---------
(81)

Then

|-2----2-----2-|
-x--+-u--=-A--.|
(82)

The phase-space ellipse becomes a circle.

The amplitude is simply the radius:

|----∘-------------|
|           ( v )2 |
|A =    x2 +  --  .|
--------------ω-----
(83)

In particular, at

t = 0,
(84)

|----∘-------------|
|           ( v0)2 |
A  =   x20 +  --  .|
--------------ω-----
(85)

PIC

Figure 5. In the scaled phase plane (x,v∕ω), the state moves on a circle. The amplitude is the distance from the origin to the state point, and the phase specifies its angular position on that circle.

15 Direction of motion in phase space

At

x = A,     v =  0,
(86)

the acceleration is

a = − ω2A  < 0.
(87)

Therefore the state begins moving toward negative velocity.

In an

x
(88)

horizontal,

v
(89)

vertical phase plane, the standard SHO trajectory is traversed clockwise.

The direction matters: the same position coordinate can occur twice per cycle with opposite velocities.

16 Mechanical energy

For a spring-mass oscillator,

     1-   2
K  = 2 mv  ,
(90)

and

U  = 1-kx2.
     2
(91)

The total mechanical energy is

|-------------------|
|    1    2   1  2  |
E  = --mv  +  -kx . |
-----2--------2------
(92)

Use

k = m ω2.
(93)

Then

E = 1
--
2m(          )
 v2 + ω2x2 (94)
= 1-
2mω2[        ]
  2   v2-
 x +  ω2. (95)

Since

 2   v2-    2
x +  ω2 = A  ,
(96)

|--------------|
|     1        |
|E =  -m ω2A2. |
------2---------
(97)

Since

k = m ω2,
(98)

|-----------|
|    1-  2  |
E  = 2 kA . |
-------------
(99)

Therefore

|-----∘------|
|       2E-  |
|A =     k . |
-------------
(100)

Amplitude is therefore a direct measure of the conserved energy.

17 Energy from initial conditions

At

t = 0,
(101)

E  = 1-mv2 +  1kx2.
     2    0   2  0
(102)

Set this equal to

1
-kA2.
2
(103)

Then

           m
A2 = x20 + --v20.
           k
(104)

Since

m-    1--
 k =  ω2,
(105)

|--------------|
|            2 |
|A2 = x20 + -v0.|
-----------ω2---
(106)

This gives an independent energy derivation of the amplitude formula.

18 Exchange of kinetic and potential energy

Using

x = A cos(ωt + δ),
(107)

     1   2    2
U  = -kA   cos (ωt +  δ),
     2
(108)

and

K  = 1-kA2 sin2 (ωt +  δ).
     2
(109)

Therefore

          1-  2
K  + U  = 2 kA  = E.
(110)

Energy continually transfers between kinetic and potential forms while the total remains constant.

PIC

Figure 6. Kinetic and potential energy exchange during an SHO cycle. Their sum remains constant for the ideal undamped oscillator.

19 Maximum speed and acceleration

At equilibrium,

x = 0,
(111)

so all the energy is kinetic:

1-mv2    = 1-kA2.
2    max   2
(112)

Thus

|------------|
-vmax-=-ωA.--|
(113)

At a turning point,

|x | = A,
(114)

so

|a| = ω2A.
(115)

Therefore

|------------|
|        2   |
-amax-=-ω-A.--
(116)

20 Example 2: speed from displacement

A spring-mass oscillator has

A = 0.20 m,     ω =  5.0 rad∕s.
(117)

Find the speed when

x = 0.12 m.
(118)

From the phase-plane equation,

 2   v2-    2
x +  ω2 = A  .
(119)

Thus

v2 = ω2(A2 − x2) (120)
= 25[     2         2]
 (0.20 ) − (0.12) (121)
= 0.64. (122)

Therefore

|--------------|
|v|-=-0.80m-∕s.-
(123)

The sign of

v
(124)

depends on which half of the phase-plane ellipse the oscillator occupies.

21 Superposition and linearity

The SHO equation

¨x + ω2x = 0
(125)

is linear.

If

x (t)
  1
(126)

and

x2(t)
(127)

are solutions, then

c1x1 + c2x2
(128)

is also a solution for constants

c1,    c2.
(129)

That is why

cosωt
(130)

and

sin ωt
(131)

can serve as a basis for all real SHO solutions.

Linearity is also the foundation for normal modes, Fourier methods, and wave mechanics.

22 Complex exponential representation

Euler’s identity gives

ei𝜃 = cos𝜃 + isin𝜃.
(132)

Therefore a convenient complex trial solution is

z (t) = Ceiωt.
(133)

Then

       2
¨z = − ω z,
(134)

so

     2
¨z + ω z = 0.
(135)

The physical displacement can be taken as the real part:

|----------[-----]-|
|x(t) = Re Cei ωt .|
--------------------
(136)

Complex notation becomes especially valuable for driven oscillators and waves.

23 Simple harmonic motion near a stable equilibrium

The harmonic oscillator is much more general than an ideal spring.

Suppose a one-dimensional system has potential energy

U (q)
(137)

with a stable equilibrium at

q = q0.
(138)

At equilibrium,

  ′
U  (q0) = 0.
(139)

For stability,

U ′′(q0) > 0.
(140)

Let

η =  q − q0.
(141)

Expand the potential near equilibrium:

U (q) ≈ U (q ) + 1-U ′′(q )η2.
            0   2     0
(142)

Then

       dU        ′′
F  = − dq- ≈ − U  (q0)η.
(143)

For mass

m,
(144)

       ′′
mη¨+ U  (q0)η = 0.
(145)

Therefore small motion near any smooth stable equilibrium is approximately simple harmonic, with

|----∘---------|
|       U′′(q0) |
|ω =    --m---.|
----------------
(146)

PIC

Figure 8. Near a smooth stable equilibrium, a general potential is approximately quadratic. The resulting restoring force is approximately linear, producing simple harmonic motion for sufficiently small displacement.

24 Small-angle pendulum

A pendulum of length

ℓ
(147)

obeys

¨𝜃 + g-sin𝜃 = 0.
    ℓ
(148)

For small angles measured in radians,

sin𝜃 ≈ 𝜃.
(149)

Then

|------------|
|¨   g-      |
-𝜃-+-ℓ𝜃-=--0.|
(150)

Therefore

-----------
|     ∘ -- |
|ω =    g, |
--------ℓ--|
(151)

and

|-------∘----|
|            |
|T = 2 π  -ℓ.|
|         g  |
-------------
(152)

The pendulum is therefore approximately a simple harmonic oscillator only in the small-angle regime.

PIC

Figure 7. For sufficiently small angular displacement, the tangential gravitational restoring term is linear in 𝜃, and the pendulum approaches simple harmonic motion.

25 Vertical spring and shifted equilibrium

For a vertical spring, gravity changes the equilibrium position but not the angular frequency of small ideal oscillations about that equilibrium.

Let downward displacement from the spring’s natural length be

y.
(153)

Newton’s law is

m ¨y = mg  − ky.
(154)

The equilibrium extension satisfies

kyeq = mg.
(155)

Define displacement from equilibrium:

x = y − yeq.
(156)

Then

m ¨x = − kx,
(157)

so

|----∘-----|
|       k  |
|ω =    m-.|
------------
(158)

Gravity shifts the equilibrium but does not change the ideal linear frequency.

26 Canonical phase space

The state

(x,v)
(159)

is a useful mechanical state-space description.

In Hamiltonian mechanics the canonical momentum is

p = mv.
(160)

The canonical phase-space state is

|------|
-(x,p).-
(161)

The Hamiltonian is

|----------------------|
|          -p2-  1-  2 |
|H (x, p) = 2m  + 2 kx .|
------------------------
(162)

Hamilton’s equations are

ẋ = ∂H--
∂p = p-
m, (163)
ṗ = −∂H
----
∂x = −kx. (164)

Combining them gives

x¨+  k-x = 0.
     m
(165)

Thus the elementary SHO is also one of the simplest examples of Hamiltonian phase-space dynamics.

27 What amplitude and phase really represent

The constants

A
(166)

and

ϕ
(167)

are another way to encode the same two pieces of state information carried by

x0
(168)

and

v0.
(169)

In the scaled phase plane:

  • amplitude is the radius of the orbit,
  • phase is the angular position of the state on that orbit.

For the ideal conservative oscillator:

  • amplitude remains constant,
  • phase advances uniformly at rate ω.

This geometric interpretation becomes useful when damping, forcing, coupled oscillators, and nonlinear oscillations are introduced.

28 Common mistakes

  1. Treating any periodic motion as simple harmonic motion.
  2. Forgetting that SHM requires acceleration proportional to negative displacement.
  3. Measuring displacement from the wrong equilibrium point.
  4. Confusing angular frequency ω with ordinary frequency f.
  5. Writing T = 1∕ω instead of T = 2π∕ω.
  6. Forgetting the factor 1∕ω multiplying initial velocity in the initial-value solution.
  7. Adding x02 directly to v 02 when computing amplitude.
  8. Using a one-argument inverse tangent and losing the correct phase quadrant.
  9. Assuming position alone completely specifies the oscillator state.
  10. Forgetting the sign of velocity when using the phase-plane ellipse.
  11. Assuming the phase-plane orbit is a circle in unscaled (x,v) coordinates.
  12. Forgetting that kinetic and potential energies vary while total energy remains constant.
  13. Applying the small-angle pendulum formula at large amplitude.
  14. Assuming gravity changes the ideal vertical spring frequency instead of shifting equilibrium.
  15. Confusing the mechanical state plane (x,v) with canonical phase space (x,p) without noting that p = mv.

29 Practice exercises

  1. Starting from Hooke’s law and Newton’s second law, derive the SHO equation and identify ω.
  2. Verify directly that x = C cos ωt + D sin ωt solves the SHO equation.
  3. Starting from x(0) = x0 and v(0) = v0, derive the initial-value solution.
  4. Derive A = ∘ -------------
  x20 + (v0∕ω)2 by comparing sine and cosine coefficients.
  5. Derive the same amplitude formula using conservation of energy.
  6. Explain why x02 + v 02 is not a valid expression for A2 if v 0 is a velocity.
  7. Derive the state-transition matrix for (x,v).
  8. Eliminate time between x(t) and v(t) to derive the phase-plane ellipse.
  9. Show that the scaled variables (x,v∕ω) move on a circle of radius A.
  10. Derive vmax = ωA and amax = ω2A.
  11. For A = 0.20 m, ω = 5 rad/s, and x = 0.12 m, reproduce the speed in Example 2.
  12. Show that K and U oscillate at twice the displacement angular frequency while their sum is constant.
  13. Derive the SHO approximation for motion near a smooth stable equilibrium U(q).
  14. Derive the small-angle pendulum angular frequency.
  15. Derive Hamilton’s equations for the harmonic oscillator and recover the Newtonian equation of motion.

30 Summary

Simple harmonic motion is defined by

|------------|
x¨+ ω2x  = 0.|
--------------
(170)

For a spring-mass system,

|----∘-----|
|       k  |
|ω =    --.|
--------m---
(171)

The initial state

|-------|
(x0,v0) |
---------
(172)

determines the entire motion:

|---------------------------|
x (t) = x  cosωt + v0 sin ωt. |
--------0----------ω--------|
(173)

The amplitude is

|------------------|
|    ∘ -----(---)--|
A  =   x2 +   v0 2.|
---------0----ω-----
(174)

The phase-plane orbit is

|--------------|
|     v2       |
|x2 + ---= A2. |
------ω2--------
(175)

The total mechanical energy is

|----------------------------|
|     1-   2  1-  2   1-   2 |
-E-=--2mv---+-2-kx--=-2-kA--.|
(176)

The same mathematics appears approximately near any smooth stable equilibrium.

This makes the harmonic oscillator one of the central local models of classical physics and the starting point for the broader study of oscillations.

References

References

[1]   PhysicsLibrary, simple harmonic oscillator, canonical object SimpleHarmonicOscillator.

[2]   A. P. French, Vibrations and Waves, W. W. Norton, 1971.

[3]   J. R. Taylor, Classical Mechanics, University Science Books, 2005.

[4]   D. Kleppner and R. Kolenkow, An Introduction to Mechanics, 2nd ed., Cambridge University Press, 2014.


"M06-01 Simple Harmonic Motion" is owned by bloftin.
(view preamble)
View style:
Other names:  M06-01
Also defines:  simple harmonic motion, angular frequency, amplitude, phase, oscillator state, phase plane, harmonic oscillator energy
Keywords:  simple harmonic motion, simple harmonic oscillator, oscillation, angular frequency, amplitude, phase, initial conditions, state space, phase plane, spring mass system, energy, stable equilibrium

This object's parent.

Attachments:
GRE Physics Companion: Simple Harmonic Motion (Example) by bloftin

Cross-references: matrix, Hooke's law, periodic motion, coupled oscillators, angular position, momentum, Hamiltonian, Newton's law, simple harmonic oscillator, mass, potential energy, system, mechanics, normal modes, speed, energy, total mechanical energy, relation, state vector, phase constants, function, formulas, square, identity, period, oscillator, frequency, turning points, magnitude, force, dimensions, velocity, position, equilibrium, displacement, acceleration
There are 3 references to this object.

This is version 1 of M06-01 Simple Harmonic Motion, born on 2026-10-17.
Object id is 1488, canonical name is M0601SimpleHarmonicMotion.
Accessed 3 times total.

Classification:
Physics Classification: 45.50.-j (Dynamics and kinematics of a particle and a system of particles)
 45.05.+x (General theory of classical mechanics of discrete systems)

Pending Errata and Addenda

None.

Discussion

No messages.

Interact