LearnViz Physics

Home / Topics / Oscillations & SHM

Oscillations & SHM

Springs, pendulums, resonance and the mathematics of vibration. 48 topics, from beginner to advanced. Open the interactive version with labs and quizzes

Oscillations are repeated back-and-forth motions, such as a mass on a spring or a swinging pendulum. Simple harmonic motion is the idealised case where the restoring force is proportional to displacement, and it gives simple expressions for period, frequency, displacement, velocity and energy. These ideas also underpin waves, resonance and many electrical circuits.

How the topics connect

Oscillations describe motion that repeats around an equilibrium, such as springs, pendulums and vibrating strings. Simple harmonic motion is the key model, with its sinusoidal motion and constant period. Damping, forcing and resonance build on it to explain real systems and why some vibrations grow dangerously large.

Real-world uses

Clocks and timekeeping

Use the period of a pendulum or a balance spring to keep time accurately, the principle behind mechanical watches and early clocks.

Vehicle suspension

Design springs and dampers so a car settles quickly after a bump without bouncing excessively.

Buildings and bridges

Check that a structure's natural frequency does not match wind or footfall frequencies, which could cause dangerous resonance.

Music and musical instruments

Relate the vibration frequency of a string or air column to the pitch you hear.

Clocks and timing

Pendulums and quartz crystals keep time because their periods are set by simple physical properties.

Engineering and safety

Engineers avoid resonance in bridges, buildings and machines by making sure their natural frequencies differ from driving frequencies.

Beginner

Periodic motion

Motion that repeats at regular intervals.

Motion that repeats exactly after equal time intervals T, called the period. Examples: planets, a pendulum, a heartbeat, an alternating current.

Worked example

The Earth's rotation has period 24 h.

Common mistake

Periodic is not always oscillatory.

Beginner

Oscillatory motion

Back-and-forth motion about an equilibrium.

Back-and-forth motion around an equilibrium position, caused by a restoring force. Energy continually converts between kinetic and potential.

Worked example

A swing, a guitar string.

Common mistake

Oscillation requires both a restoring force and inertia.

Beginner

Period, frequency, amplitude

Basic descriptors of an oscillation.

Key relationT = 1/f

Period T is time per cycle, frequency f = 1/T cycles per second (Hz), amplitude A is the maximum displacement. Energy depends on amplitude, not period, for SHM.

Worked example

A mass vibrating 5 times per second: f = 5 Hz, T = 0.2 s.

Common mistake

Peak-to-peak is 2A.

Beginner

Simple harmonic motion

Restoring force proportional to displacement.

Key relationF = −kx

SHM occurs when the restoring force is proportional and opposite to displacement, F = −kx. The motion is sinusoidal, and its period doesn't depend on amplitude.

Worked example

A mass on a spring, small-angle pendulum.

Common mistake

F ∝ −x is the key test.

Beginner

SHM displacement

Sinusoidal displacement in time.

Key relationx = A cos(ωt+φ)

x = A cos(ωt + φ), with φ fixed by the initial conditions. It's the projection of uniform circular motion.

Worked example

x₀ = A at t = 0 gives φ = 0.

Common mistake

Be careful with sine or cosine form; they differ by phase π/2.

Intermediate

SHM velocity

Velocity leads displacement by 90°.

Key relationv = −Aω sin(ωt+φ)

v = −Aω sin(ωt + φ), maximum Aω at the equilibrium and zero at the extremes. Also v = ω√(A² − x²).

Worked example

A = 0.1 m, ω = 10: v_max = 1 m/s.

Common mistake

Velocity peaks when the displacement is zero.

Intermediate

SHM acceleration

Proportional and opposite to displacement.

Key relationa = −ω²x

a = −ω²x, maximal at the ends (ω²A), zero at the centre, always directed to the centre.

Worked example

A = 0.05 m, ω = 20: a_max = 20 m/s².

Common mistake

Same sign as −x.

Beginner

Angular frequency

Rate of phase advance.

Key relationω = 2πf

ω = 2πf = 2π/T in rad/s; for a spring ω = √(k/m), for a pendulum √(g/L). It's not the same as the speed of the particle.

Worked example

f = 2 Hz means ω = 12.6 rad/s.

Common mistake

Don't mix Hz and rad/s.

Intermediate

Phase and phase constant

Starting point of the oscillation cycle.

The phase ωt + φ gives the stage in the cycle; φ tells where it starts. Two oscillations with the same ω but different φ are shifted in time.

Worked example

Starting at the centre moving up: φ = −π/2 in the cos form.

Common mistake

Phase is in radians.

Intermediate

Phase difference

Relative shift between two oscillations.

Phase difference Δφ tells how far one oscillation is ahead of another. 0 = in phase, π = antiphase, π/2 = quadrature (like velocity and displacement).

Worked example

AC current in an inductor lags voltage by 90°.

Common mistake

Δφ matters when combining waves.

Advanced

Phasor representation

Project a rotating vector to get SHM.

Represent x = A cos(ωt + φ) as a rotating arrow of length A at angle ωt + φ. Adding oscillations of the same frequency means adding arrows.

Worked example

Two SHMs of amplitude 3 and 4 in quadrature give 5.

Common mistake

Only the projection is physical.

Beginner

Mass–spring system

Mass on a spring oscillates with period set by m and k.

Key relationT = 2π√(m/k)

T = 2π√(m/k). Heavier mass or softer spring gives a longer period. It doesn't depend on amplitude (within Hooke's law).

Worked example

m = 0.5 kg, k = 50 N/m: T = 0.63 s.

Common mistake

Spring's own mass is ignored.

Intermediate

Vertical spring

Gravity only shifts the equilibrium, not the period.

Key relationspring

Gravity only shifts the equilibrium by mg/k; oscillations about that new point have the same period 2π√(m/k).

Worked example

m = 1 kg, k = 100 N/m: sag 9.8 cm, T = 0.63 s.

Common mistake

Measure x from the new equilibrium.

Intermediate

Springs in series/parallel oscillations

Equivalent stiffness changes the frequency.

Effective stiffness changes the frequency: parallel k = k₁ + k₂ (higher f), series 1/k = 1/k₁ + 1/k₂ (lower f).

Worked example

Two 20 N/m springs in parallel: ω rises by √2.

Common mistake

Check how the springs are connected to the mass.

Beginner

Simple pendulum

A small mass on a light string.

Key relationT = 2π√(L/g)

A mass m on a light string of length L: T = 2π√(L/g) for small angles. The period is independent of the mass.

Worked example

L = 1 m: T = 2.0 s.

Common mistake

Do not use for large angles or physical pendulums.

Intermediate

Small-angle approximation

Pendulum is nearly SHM for angles below about 15°.

Key relationsinθ ≈ θ

For θ ≲ 15°, sinθ ≈ θ (in rad) and the pendulum equation becomes θ̈ = −(g/L)θ, which is SHM.

Worked example

At 10°, the error is 0.5%.

Common mistake

Use radians.

Advanced

Pendulum at large amplitude

Period increases with amplitude.

Key relationT ≈ T₀(1+θ₀²/16)

For large θ₀ the period increases: T ≈ T₀(1 + θ₀²/16 + ...). At 60° it's 7% longer, and the motion isn't sinusoidal.

Worked example

At 90° T = 1.18 T₀.

Common mistake

Period isn't amplitude-independent for large swings.

Advanced

Physical pendulum

A rigid body swinging about a pivot.

Key relationT = 2π√(I/mgd)

A rigid body pivoted at distance d from its centre of mass has T = 2π√(I/mgd) with I about the pivot. The equivalent length is I/md.

Worked example

A uniform rod pivoted at its end: T = 2π√(2L/3g).

Common mistake

Use I about the pivot.

Advanced

Torsional pendulum

Oscillation from twisting of a wire.

Key relationT = 2π√(I/κ)

A body on a twisting wire has restoring torque −κθ, so T = 2π√(I/κ). It's used in clocks and the Cavendish experiment.

Worked example

I = 0.01 kg·m², κ = 0.04 N·m/rad: T = 3.1 s.

Common mistake

κ is the torsion constant.

Beginner

Second's pendulum

A pendulum with a two-second period, about one metre long.

A pendulum with T = 2 s has L = gT²/4π² ≈ 0.994 m. Used for timekeeping and for finding g.

Worked example

At the equator L is slightly shorter.

Common mistake

Don't assume 1 m exactly.

Intermediate

Simple pendulum in elevator

Effective gravity changes with acceleration of the support.

In an elevator accelerating up with a, the effective gravity is g + a; so T = 2π√(L/(g + a)). In free fall the pendulum doesn't swing.

Worked example

a = 2 m/s²: T is 9% shorter.

Common mistake

Use g_eff.

Intermediate

Energy in SHM

Total energy is constant, swapping between kinetic and potential.

Key relationE = ½kA²

Total energy E = ½kA² = ½mω²A² is constant, shared between kinetic ½mv² and potential ½kx². Energy doesn't depend on frequency alone.

Worked example

k = 40, A = 0.1: E = 0.2 J.

Common mistake

Doubling the amplitude quadruples the energy.

Intermediate

Kinetic and potential energy in SHM

Variation with displacement and time.

K = ½k(A² − x²), U = ½kx². K is maximum at the centre; U at the ends. They are equal at x = ±A/√2.

Worked example

At A/√2, speed is 0.71 v_max.

Common mistake

Each oscillates at twice the SHM frequency.

Advanced

Average energy over a cycle

Average kinetic equals average potential energy, each half the total.

Over a full period the average kinetic and potential energy are each E/2. This is the equipartition used in thermal physics.

Worked example

Time-average of cos² = ½.

Common mistake

Not equal at every instant.

Advanced

Differential equation of SHM

The standard second-order equation.

Key relationẍ + ω²x = 0

ẍ + ω²x = 0, with general solution x = A cos ωt + B sin ωt. Any system with this equation oscillates sinusoidally.

Worked example

LC circuit: q̈ + q/(LC) = 0.

Common mistake

Initial conditions fix A and B.

Intermediate

Damped oscillations

Friction gradually reduces amplitude.

Key relationx = Ae^{−bt/2m}cos(ω't)

With damping force −bv the amplitude decays as e^{−bt/2m}. The frequency ω' = √(ω₀² − (b/2m)²) is slightly lower than the natural frequency.

Worked example

A swing coming gradually to rest.

Common mistake

The envelope decays exponentially, not linearly.

Advanced

Underdamped, critical, overdamped

Three damping regimes with different return behaviour.

Light damping oscillates with decaying amplitude; critical damping returns to equilibrium fastest without overshoot; heavy damping returns slowly. Car suspensions are close to critical.

Worked example

Door closers use critical damping.

Common mistake

Overdamped isn't faster than critical.

Advanced

Quality factor

Number of radians over which energy decays by 1/e.

Key relationQ = ω₀m/b

Q = ω₀m/b measures how weakly an oscillator is damped: it's about 2π times the energy stored over energy lost per cycle. High Q means sharp resonance and long ringing.

Worked example

A tuning fork has Q of a few thousand.

Common mistake

Q has no unit.

Intermediate

Forced oscillations

System driven by an external periodic force.

A system driven at frequency ω_d settles to oscillate at ω_d (after transients) with amplitude depending on the closeness to its natural frequency. Maximum at resonance.

Worked example

A child being pushed on a swing.

Common mistake

Steady-state frequency follows the driver, not the natural one.

Intermediate

Resonance

Large amplitude when driving frequency matches natural frequency.

Key relationω_d ≈ ω₀

When ω_d ≈ ω₀, amplitude peaks and energy transfers efficiently. The peak height is limited by damping.

Worked example

Radio tuner selects a station by resonance.

Common mistake

Can cause destructive effects.

Beginner

Resonance examples

Swings, radio tuning, bridges and glasses shattering.

Radio tuning circuits, MRI nuclear resonance, swing pushing, glass-breaking sound, and the Tacoma Narrows bridge (actually aeroelastic flutter).

Worked example

Opera singer shattering a wine glass.

Common mistake

Not all failures are simple resonance.

Advanced

Amplitude vs frequency curve

Resonance peak sharpens with lower damping.

The response curve peaks near ω₀ with width ≈ ω₀/Q. Less damping gives a taller and narrower peak.

Worked example

Radio tuning with high Q has better selectivity.

Common mistake

Peak shifts slightly below ω₀ for heavy damping.

Advanced

LC oscillations

Charge in an LC circuit oscillates like a mass on a spring.

Key relationω = 1/√(LC)

In an LC circuit charge oscillates at ω = 1/√(LC), swapping energy between the capacitor's electric field and the inductor's magnetic field.

Worked example

L = 1 mH, C = 1 μF: f ≈ 5 kHz.

Common mistake

Resistance damps it.

Advanced

Analogy between mechanical and electrical oscillators

m↔L, k↔1/C, b↔R.

m ↔ L, k ↔ 1/C, b ↔ R, x ↔ q, v ↔ I. Results for one apply to the other.

Worked example

RLC circuit mirrors damped spring.

Common mistake

Use analogies to transfer intuition.

Advanced

Coupled oscillators

Two linked oscillators share energy and have normal modes.

Two oscillators with a connecting spring exchange energy back and forth, producing beats. Their motion can be split into normal modes.

Worked example

Two pendulums connected by a spring.

Common mistake

Energy exchange rate depends on the coupling.

Advanced

Normal modes

Collective patterns where all parts oscillate at the same frequency.

Patterns of motion where all parts oscillate at a single frequency. Any motion is a superposition of them. N coupled masses have N normal modes.

Worked example

Two masses: in-phase and out-of-phase modes.

Common mistake

Each mode has its own frequency.

Intermediate

Beats in oscillators

Two close frequencies produce periodic amplitude variation.

Key relationf_beat = ∣f₁−f₂∣

Two oscillations with nearby frequencies f₁ and f₂ interfere to give an amplitude that varies at the beat frequency |f₁ − f₂|.

Worked example

440 Hz and 444 Hz: 4 beats per second.

Common mistake

Beat frequency is the difference, not the average.

Intermediate

Superposition of SHMs

Combine oscillations along the same line or at right angles.

Collinear SHMs of the same frequency add into one SHM with a new amplitude and phase. SHMs at right angles give ellipses or Lissajous figures.

Worked example

x = 3 sin ωt + 4 cos ωt has amplitude 5.

Common mistake

Different frequencies give non-sinusoidal results.

Advanced

Lissajous figures

Paths from perpendicular SHMs with different frequencies.

Perpendicular oscillations with frequency ratio p:q trace closed curves. Equal frequencies give ellipses, circles or lines depending on phase difference.

Worked example

An oscilloscope in XY mode displays them.

Common mistake

Used for comparing frequencies.

Advanced

Anharmonic oscillation

Real potentials deviate from parabolic at large amplitude.

Real potentials are not exactly parabolic; for larger amplitudes the period depends on amplitude and harmonics appear.

Worked example

A pendulum at large angles, molecular vibrations.

Common mistake

Always examine whether SHM is valid.

Advanced

Nonlinear oscillators

Duffing and van der Pol oscillators show chaos and limit cycles.

With nonlinear restoring forces or driving, systems show amplitude-dependent frequency, jumps (Duffing), limit cycles (van der Pol) and chaos.

Worked example

Heartbeats modelled by limit cycles.

Common mistake

No superposition principle.

Advanced

Chaos and the double pendulum

Small changes in start give very different motion.

A double pendulum is deterministic but chaotic: tiny differences in start grow exponentially, so long-term prediction is impossible.

Worked example

Release two nearly identical double pendulums to see them diverge.

Common mistake

Chaotic doesn't mean random.

Advanced

Parametric resonance

Oscillation driven by varying a parameter, like pumping a swing.

Varying a parameter (e.g., length) at twice the natural frequency pumps energy into the oscillator. A child pumping a swing by standing and crouching.

Worked example

Used in parametric amplifiers.

Common mistake

Different from a driven force at ω₀.

Intermediate

Oscillation of a floating body

A buoyant object bobbing in liquid is SHM.

A floating cylinder displaced vertically by y feels a restoring force −ρAgy, so it performs SHM with T = 2π√(m/ρAg).

Worked example

A cork bobbing in water.

Common mistake

Neglects water motion and drag.

Intermediate

Liquid in a U-tube

Oscillates with period set by column length.

Key relationT = 2π√(L/2g)

A liquid column of total length L oscillates with T = 2π√(L/2g) when disturbed, because the restoring force is the weight of the extra liquid column.

Worked example

L = 0.5 m: T ≈ 1.4 s.

Common mistake

Independent of density.

Advanced

Tunnel through the Earth

A mass falling through a tunnel executes SHM with a period of about 84 minutes.

Inside a uniform Earth, g ∝ r, so a body falling through a tunnel executes SHM with T = 2π√(R/g) ≈ 84 minutes, the same as a low orbit.

Worked example

Travel through the planet in 42 minutes.

Common mistake

Neglects friction and Earth's rotation.

Advanced

Molecular vibrations

Atoms in molecules behave as springs, giving infrared spectra.

Atoms in a molecule oscillate like masses on springs, with frequencies in the infrared (10¹³ Hz). Absorption spectra reveal bond strengths.

Worked example

CO₂ absorbs infrared strongly, causing the greenhouse effect.

Common mistake

At high energy the potential is anharmonic.

Advanced

Quantum harmonic oscillator

Energy levels are equally spaced.

Key relationE_n = (n+½)ħω

A quantum oscillator has equally spaced energy levels E_n = (n + ½)ħω and a non-zero ground-state energy. It models phonons, photons and molecular vibrations.

Worked example

Vibration levels of H₂.

Common mistake

Energy cannot be zero due to uncertainty.

Frequently asked questions

Does the period of a simple pendulum depend on its mass?

No, for small swings the period depends only on its length and the local value of g. It does not depend on the mass or, for small angles, the amplitude.

What is the difference between frequency and angular frequency?

Frequency is the number of cycles per second, in hertz. Angular frequency is 2 pi times the frequency, measured in radians per second, and it appears in the equations of motion.

What is resonance?

Resonance happens when a system is driven at its natural frequency. The amplitude then becomes large, which can be useful, as in tuning a radio, or destructive, as in a bridge.

Why does a pendulum period not depend on its mass?

The restoring force grows in proportion to mass as well as the inertia, so the mass cancels out. Only the length and gravity matter for a simple pendulum.

What is resonance in simple words?

Resonance happens when you push a system at its natural frequency, so each push adds energy to the motion and the amplitude builds up.

Other areas

Measurement & Math Tools · Kinematics · Newton's Laws & Forces · Work, Energy & Power · Momentum & Collisions · Rotational Motion · Gravitation & Orbits · Waves & Sound · Fluids & Elasticity · Heat & Thermodynamics · Kinetic Theory & Statistical Physics · Electrostatics · Current Electricity & Circuits · Magnetism & Induction · AC Circuits & EM Waves · Optics · Quantum Mechanics · Atomic & Nuclear Physics · Relativity · Particle Physics & Cosmology