What Is the Simple Harmonic Motion Equation? 12 Formulas, 6 Systems, and 10 Worked Examples
The simple harmonic motion equation is x(t) = A cos(ωt + φ), where x is displacement, A is amplitude, ω is angular frequency, t is time, and φ is the phase constant. The equation solves the differential equation d²x/dt² = -ω²x.
For a reliable reference, consult OpenStax section on simple harmonic motion.
What Is Simple Harmonic Motion?
Simple harmonic motion (SHM) is periodic motion in which the restoring force is proportional to the displacement from equilibrium and points toward equilibrium. Examples include a mass on a spring, a pendulum at small angles, and the charge oscillation in an LC circuit.
OpenStax University Physics Volume 1 (Chapter 15) defines SHM as oscillation under a restoring force proportional to displacement. Christiaan Huygens published the small-oscillation period of the pendulum in Horologium Oscillatorium (1673). Robert Hooke published the spring force law in 1678.
What Are the Conditions for Simple Harmonic Motion?
Simple harmonic motion requires 4 conditions. The table below lists them. Each row names one condition, and the columns give its meaning and an example.
| Condition | Meaning | Example |
|---|---|---|
| Proportional restoring force | Force magnitude equals k × displacement | A spring stretched within its elastic limit |
| Force toward equilibrium | The negative sign in F = -kx | A spring pulls a stretched mass back |
| Constant parameters | Mass m and spring constant k stay unchanged | A fixed mass on a fixed spring |
| No damping or driving | No friction, drag, or external force | A mass on a frictionless surface |
What Do the Symbols in the SHM Equation Mean?
Each symbol represents 1 quantity with 1 SI unit. The table below lists 12 symbols. Each row names one quantity, and the columns give its symbol, SI unit, and meaning.
| Quantity | Symbol | SI unit | Meaning |
|---|---|---|---|
| Displacement | x | metre (m) | Position relative to equilibrium |
| Amplitude | A | metre (m) | Maximum displacement |
| Angular frequency | ω | radian per second (rad/s) | Rate of change of the phase |
| Time | t | second (s) | Elapsed time |
| Phase constant | φ | radian (rad) | Sets position and velocity at t = 0 |
| Frequency | f | hertz (Hz) | Cycles per second |
| Period | T | second (s) | Time for 1 cycle |
| Spring constant | k | newton per metre (N/m) | Force per unit extension |
| Mass | m | kilogram (kg) | Oscillating mass |
| Velocity | v | metre per second (m/s) | Rate of change of displacement |
| Acceleration | a | metre per second squared (m/s²) | Rate of change of velocity |
| Total energy | E | joule (J) | Sum of kinetic and potential energy |
The BIPM SI Brochure assigns the hertz to the frequency of periodic phenomena. The conversions are ω = 2πf, and 60 rpm equals 1 Hz, which equals 6.283 rad/s.
What Are the 12 Formulas of Simple Harmonic Motion?
The 12 formulas describe force, motion, period, and energy of a harmonic oscillator. The table below lists them. Each row names one quantity, and the columns give the formula and the condition of use.
| Quantity | Formula | Condition |
|---|---|---|
| Restoring force | F = -kx | Spring within the elastic limit |
| Differential equation | d²x/dt² = -ω²x | Any SHM system |
| Displacement | x(t) = A cos(ωt + φ) | Any SHM system |
| Velocity | v(t) = -Aω sin(ωt + φ) | Any SHM system |
| Acceleration | a(t) = -Aω² cos(ωt + φ) = -ω²x | Any SHM system |
| Angular frequency | ω = √(k/m) | Mass-spring system |
| Period | T = 2π√(m/k) | Mass-spring system |
| Frequency | f = (1/2π)√(k/m) | Mass-spring system |
| Velocity from position | v = ±ω√(A² – x²) | Any SHM system |
| Total energy | E = ½kA² | Mass-spring system |
| Kinetic energy | KE = ½mv² = ½k(A² – x²) | Mass-spring system |
| Potential energy | U = ½kx² | Mass-spring system |
How Is the Simple Harmonic Motion Equation Derived?
Combine Hooke's law with Newton's second law to obtain a differential equation, then substitute a cosine solution. Derive the equation in 5 steps:
- Write Hooke's law: F = -kx.
- Write Newton's second law: F = m d²x/dt².
- Equate the forces: m d²x/dt² = -kx.
- Divide by m and define ω² = k/m: d²x/dt² = -ω²x.
- Substitute x = A cos(ωt + φ). The second derivative equals -ω²A cos(ωt + φ), which equals -ω²x, so the equation holds.
A second-order differential equation has 2 independent constants. The constants are A and φ. An equivalent form is x(t) = C₁ cos ωt + C₂ sin ωt, with A = √(C₁² + C₂²).
Why Does Simple Harmonic Motion Describe So Many Systems?
Any smooth potential energy curve near a stable equilibrium approximates a parabola. Taylor (Classical Mechanics, 2005) shows that U(x) ≈ U(x₀) + ½U″(x₀)(x – x₀)², so the effective spring constant is k = U″(x₀). Examples include a pendulum bob, an atom in a crystal, and a diatomic molecule.
What Are the Equations for Displacement, Velocity, and Acceleration in SHM?
Displacement follows a cosine, velocity follows a negative sine, and acceleration follows a negative cosine. All 3 quantities oscillate at the same angular frequency ω. The table below gives the cosine and sine forms. Each row names one quantity, and the columns give both forms and the maximum value.
| Quantity | Cosine form | Sine form | Maximum value |
|---|---|---|---|
| Displacement | x = A cos(ωt + φ) | x = A sin(ωt + φ′) | A |
| Velocity | v = -Aω sin(ωt + φ) | v = Aω cos(ωt + φ′) | Aω |
| Acceleration | a = -Aω² cos(ωt + φ) | a = -Aω² sin(ωt + φ′) | Aω² |
The 2 phase constants relate by φ′ = φ + π/2.
What Is the Equation for Velocity in SHM?
The velocity equation is v = -Aω sin(ωt + φ), and the maximum speed is Aω at the equilibrium position. Velocity leads displacement by π/2 rad (90°). Speed equals zero at x = ±A.
What Is the Equation for Acceleration in SHM?
The acceleration equation is a = -ω²x, and the maximum magnitude is Aω² at x = ±A. Acceleration is in antiphase with displacement, which is a phase difference of π rad (180°). Acceleration equals zero at x = 0.
How Do Position, Velocity, and Acceleration Change Over 1 Period?
The table below follows an oscillator with φ = 0 through 1 period. Each row gives one time, and the columns give displacement, velocity, acceleration, kinetic energy, and potential energy.
| Time | x | v | a | KE | U |
|---|---|---|---|---|---|
| 0 | +A | 0 | -ω²A | 0 | E |
| T/4 | 0 | -Aω | 0 | E | 0 |
| T/2 | -A | 0 | +ω²A | 0 | E |
| 3T/4 | 0 | +Aω | 0 | E | 0 |
| T | +A | 0 | -ω²A | 0 | E |
What Are the Equations for Period, Frequency, and Angular Frequency?
The relations are ω = 2πf = 2π/T and T = 1/f, and the spring period is T = 2π√(m/k). The period of a mass-spring system is independent of amplitude and independent of g.
The table below uses a baseline period of 1.00 s. Each row names one change, and the columns give the effect and the new period.
| Change | Effect on period | New period |
|---|---|---|
| Mass doubles | Multiplies by √2 (1.414) | 1.41 s |
| Mass quadruples | Doubles | 2.00 s |
| Spring constant quadruples | Halves | 0.50 s |
| Amplitude doubles | No change | 1.00 s |
| Spring constant halves | Multiplies by √2 (1.414) | 1.41 s |
What Is the Energy Equation of SHM?
The total mechanical energy is E = ½kA² = ½mv² + ½kx², and it stays constant. Energy is proportional to A², so doubling the amplitude quadruples the energy. The time average of kinetic energy and the time average of potential energy are each E/2.
The table below lists 4 positions. Each row gives one position, and the columns give potential energy, kinetic energy, and speed.
| Position x | Potential energy | Kinetic energy | Speed |
|---|---|---|---|
| 0 | 0 | E | Aω |
| ±A/2 | E/4 | 3E/4 | 0.866 Aω |
| ±A/√2 (±0.707A) | E/2 | E/2 | 0.707 Aω |
| ±A | E | 0 | 0 |
How Do You Find Amplitude and Phase Constant From Initial Conditions?
Use the initial position x₀ and initial velocity v₀ at t = 0. The formulas are A = √(x₀² + (v₀/ω)²) and tan φ = -v₀/(ωx₀). The equivalent form is x(t) = x₀ cos ωt + (v₀/ω) sin ωt.
The table below lists 4 common starting conditions. Each row gives the initial state, and the columns give φ and the equation.
| Initial state | φ | Equation |
|---|---|---|
| x₀ = +A, v₀ = 0 | 0 | x = A cos ωt |
| x₀ = 0, v₀ > 0 | -π/2 | x = A sin ωt |
| x₀ = -A, v₀ = 0 | π | x = -A cos ωt |
| x₀ = 0, v₀ < 0 | +π/2 | x = -A sin ωt |
How Do You Read the SHM Equation From a Graph?
Read the amplitude, period, and starting point from the displacement-time graph. Follow 4 steps:
- Measure the maximum displacement to get A.
- Measure the time between 2 successive peaks to get T.
- Calculate ω = 2π/T.
- Compare x(0) and the initial slope with A to find φ.
The slope of the displacement-time graph gives velocity, and the slope of the velocity-time graph gives acceleration. A velocity-displacement graph forms an ellipse, with the equation x²/A² + v²/(Aω)² = 1.
What Are the SHM Equations for 6 Common Systems?
Each system has a restoring term proportional to displacement and a matching value of ω. The table below lists 6 systems. Each row names one system, and the columns give the equation of motion, ω, and T.
| System | Equation of motion | ω | T |
|---|---|---|---|
| Horizontal mass-spring | m x″ = -kx | √(k/m) | 2π√(m/k) |
| Vertical mass-spring | m x″ = -kx (x from the new equilibrium) | √(k/m) | 2π√(m/k) |
| Simple pendulum (small angle) | θ″ = -(g/L)θ | √(g/L) | 2π√(L/g) |
| Physical pendulum | I θ″ = -mgd θ | √(mgd/I) | 2π√(I/(mgd)) |
| Torsion pendulum | I θ″ = -κθ | √(κ/I) | 2π√(I/κ) |
| LC circuit | q″ = -q/(LC) | 1/√(LC) | 2π√(LC) |
In the table, L in the pendulum rows is length, d is the distance from the pivot to the center of mass, I is the moment of inertia, κ is the torsion constant, L in the LC row is inductance, and C is capacitance.
How Accurate Is the SHM Equation for a Pendulum?
The pendulum equation holds for small angles, because it replaces sin θ with θ. The exact period is T = 4√(L/g) K(sin(θ₀/2)), where K is the complete elliptic integral of the first kind. The table below lists the error of the small-angle formula. Each row gives one amplitude, and the columns give the ratio to the small-angle period and the percentage error.
| Amplitude θ₀ | Exact period ÷ small-angle period | Error of small-angle formula |
|---|---|---|
| 5° | 1.0005 | 0.05% |
| 10° | 1.0019 | 0.19% |
| 15° | 1.0043 | 0.43% |
| 30° | 1.0174 | 1.74% |
| 60° | 1.0732 | 7.32% |
| 90° | 1.1803 | 18.03% |
How Do Springs in Series and Parallel Change the Equation?
Parallel springs add their spring constants, and series springs add their compliances. The table below uses k₁ = k₂ = 100 N/m and m = 0.50 kg. Each row names one arrangement, and the columns give the equivalent spring constant, ω, and T.
| Arrangement | Equivalent k | ω | T |
|---|---|---|---|
| Parallel | k₁ + k₂ = 200 N/m | 20 rad/s | 0.314 s |
| Series | 1/(1/k₁ + 1/k₂) = 50 N/m | 10 rad/s | 0.628 s |
Does Gravity Change the Period of a Vertical Spring?
Gravity shifts the equilibrium position by mg/k and leaves the period unchanged. The oscillation takes place about the new equilibrium, and the equation x = A cos(ωt + φ) applies to the displacement from that point.
How Does the SHM Equation Relate to Uniform Circular Motion?
The displacement in SHM equals the projection of uniform circular motion onto a diameter. The circle has radius A, the angular speed is ω, and the angle is θ = ωt + φ. The projection x = A cos θ gives the SHM equation, and the projection of the velocity gives v = -Aω sin θ. OpenStax University Physics Volume 1 (Section 15.3) presents this relation.
What Is the Difference Between SHM and Damped Oscillation?
SHM has constant amplitude, and damped oscillation loses energy and has a decaying amplitude. The damped equation is m x″ + b x′ + kx = 0, where b is the damping coefficient. The underdamped solution is x = A e^(-γt) cos(ω_d t + φ), with γ = b/(2m) and ω_d = √(ω₀² – γ²).
The table below compares the 2 motions. Each row names one feature, and the columns describe each motion.
| Feature | SHM | Underdamped oscillation |
|---|---|---|
| Amplitude | Constant | Decreases exponentially |
| Total energy | Constant | Decreases |
| Angular frequency | ω₀ = √(k/m) | ω_d = √(ω₀² – γ²) |
| Equation | x = A cos(ωt + φ) | x = A e^(-γt) cos(ω_d t + φ) |
Damping has 3 regimes: underdamped (γ < ω₀), critically damped (γ = ω₀), and overdamped (γ > ω₀). Only the underdamped regime oscillates. A driven oscillator reaches its maximum amplitude near ω₀.
What Are 10 Worked Examples of the SHM Equation?
The table below presents 10 examples. Each row gives the given values, the calculation, and the result. Calculators use radian mode for the cosine and sine functions.
| Example | Given | Calculation | Result |
|---|---|---|---|
| 1. Find ω, T, f | m = 0.50 kg, k = 200 N/m | ω = √(200/0.50) = 20 rad/s, T = 2π/20, f = 1/T | ω = 20 rad/s, T = 0.314 s, f = 3.18 Hz |
| 2. Find x, v, a at t = 0.05 s | x = 0.10 cos(20t), in metres | ωt = 1.0 rad, cos 1.0 = 0.5403, sin 1.0 = 0.8415 | x = 0.0540 m, v = -1.68 m/s, a = -21.6 m/s² |
| 3. Find maximum speed, maximum acceleration, energy | A = 0.10 m, ω = 20 rad/s, k = 200 N/m | Aω, Aω², ½kA² | 2.0 m/s, 40 m/s², 1.0 J |
| 4. Find speed at x = 0.06 m | A = 0.10 m, ω = 20 rad/s | v = 20√(0.10² – 0.06²) = 20 × 0.08 | 1.60 m/s |
| 5. Write the equation | A = 0.20 m, T = 0.50 s, x(0) = +A | ω = 2π/0.50 = 4π rad/s | x = 0.20 cos(4πt), f = 2.0 Hz |
| 6. Find A and φ | x₀ = 0.05 m, v₀ = 0.40 m/s, ω = 10 rad/s | A = √(0.05² + 0.04²), tan φ = -0.40/(10 × 0.05) = -0.80 | A = 0.0640 m, φ = -0.675 rad |
| 7. Find the period of a pendulum | L = 1.00 m, g = 9.8 m/s² | T = 2π√(1.00/9.8) | T = 2.01 s, f = 0.50 Hz |
| 8. Find the vertical spring period | m = 2.0 kg, k = 100 N/m | Stretch = mg/k = 0.196 m, T = 2π√(2.0/100) | T = 0.889 s |
| 9. Find the LC frequency | L = 10 mH, C = 100 μF | ω = 1/√(0.010 × 0.000100) = 1,000 rad/s, f = ω/2π | f = 159 Hz |
| 10. Find k from the period | m = 0.25 kg, T = 0.40 s | k = 4π²m/T² = 39.48 × 0.25/0.16 | k = 61.7 N/m |
Example 4 checks against energy conservation. The kinetic energy is ½(0.50)(1.60²) = 0.64 J, the potential energy is ½(200)(0.06²) = 0.36 J, and the sum is 1.00 J, which matches Example 3.
Where Does Simple Harmonic Motion Occur in Real Systems?
Real oscillators approximate SHM at small amplitudes. The table below lists 4 systems. Each row names one system, and the columns give the frequency and a detail.
| System | Frequency | Detail |
|---|---|---|
| Quartz watch crystal (silicon dioxide, SiO2) | 32,768 Hz | The value equals 2¹⁵ Hz, and 15 divide-by-2 stages produce 1 Hz |
| Carbon monoxide (CO) bond vibration | About 6.4 × 10¹³ Hz | The stretching wavenumber is 2143 cm⁻¹, and small vibrations are approximately harmonic |
| Tuning fork | 440 Hz | ISO 16 sets the concert pitch A4 at 440 Hz |
| Seconds pendulum | 0.5 Hz | T = 2 s, and the length is about 0.994 m |
Does Simple Harmonic Motion Apply in Quantum Mechanics?
Quantum harmonic oscillators follow the potential U = ½mω²x² and have discrete energy levels. The energy formula is E_n = ħω(n + ½), where n = 0, 1, 2, and ħ = 1.0546 × 10⁻³⁴ J·s. The lowest energy is the zero-point energy ½ħω.
What Mistakes Occur When Using the SHM Equation?
Six mistakes cause most errors:
- Setting the calculator to degrees in place of radians
- Using frequency in place of angular frequency inside the cosine
- Dropping the negative sign in a = -ω²x
- Applying the pendulum formula to amplitudes above 15°
- Assuming that the period depends on amplitude
- Mixing the cosine and sine conventions for the phase constant
People Also Ask
What is the equation for simple harmonic motion?
The equation is x(t) = A cos(ωt + φ), which solves d²x/dt² = -ω²x.
What is the formula for the period of SHM?
The period is T = 2π√(m/k) for a mass-spring system and T = 2π√(L/g) for a simple pendulum at small angles.
What is the differential equation of SHM?
The differential equation is d²x/dt² = -ω²x, which states that acceleration is proportional to displacement and opposite in direction.
What is the phase constant in SHM?
The phase constant φ sets the displacement and velocity of the oscillator at t = 0.
Does the period of SHM depend on amplitude?
The period of ideal SHM is independent of amplitude.
What is the acceleration equation in SHM?
Acceleration equals a = -ω²x, and its maximum magnitude is Aω².
What Is the Simple Harmonic Motion Equation?
The simple harmonic motion equation is x(t) = A cos(ωt + φ), the solution of d²x/dt² = -ω²x. Velocity is v = -Aω sin(ωt + φ), acceleration is a = -ω²x, and the period of a mass-spring system is T = 2π√(m/k). The total energy E = ½kA² stays constant, and the phase constant φ follows from the initial position and velocity.

The University of the West Indies
My passion as a teacher and leader in education is to contribute to students’ enhanced learning by creation of a positive teaching/learning environment, where they are motivated to develop strong critical thinking, analytical and problem-solving skills.
As acting Vice-Principal and head of Physics, I have amassed five years of experience in leading meetings, implementing strategies to maintain discipline and school ethos, liaise with stakeholders in planning for future development of the institution; successfully negotiated the implementation of various projects for student development as well as supervising effective execution of such. For the past 19 years, I have incorporated discovery learning within the classroom through practical activities, problem solving and cooperative learning and have realized that students retention in Physics and Mathematics have increased significantly.
I am always cognizant that students have different learning styles, and as such teaching strategies during planning and delivery must take this crucial factor into consideration and be tailored to meet such differences.

