Sub topic 4
The SHM equation a = -ω²x
This chapter assumes you know Newton's second law (F = ma), radians, and the derivatives of sine and cosine. Earlier chapters defined period, frequency, amplitude, restoring force, and Hooke's law. Here they combine into the one equation that defines simple harmonic motion.
The definition
An object moves with simple harmonic motion (SHM) when its acceleration is proportional to its displacement from equilibrium and points the opposite way:
a = -ω²x
- x is the displacement from the equilibrium position, in metres. It is signed, so it is positive on one side of equilibrium and negative on the other.
- a is the acceleration along the same axis, in m/s².
- ω² is a positive constant for the system. Its square root, ω, is the angular frequency, in rad/s.
Written with derivatives, the same statement is a differential equation:
d²x/dt² = -ω²x
This reads: the second derivative of position is a negative constant times position. Any system that obeys this equation, whatever it is made of, moves in the same way.
Deriving it from Hooke's law
Take a mass m on a horizontal, frictionless surface, attached to a spring of constant k. Let x = 0 be the spring's natural length and take the positive direction along the stretch.
- Hooke's law gives the spring force: F = -kx. The minus sign means the force opposes the displacement.
- The spring force is the only horizontal force, so Newton's second law gives ma = -kx.
- Divide by m: a = -(k/m)x.
- Compare with a = -ω²x. The two match if ω² = k/m.
The next chapters use this result for the spring-mass system. What matters here is the general pattern. A force that is linear in displacement, divided by a constant mass, gives an acceleration linear in displacement.
The chart shows the defining property. SHM is the case where a plotted against x is a straight line through the origin with negative slope. The slope is -ω².
Reading the equation
The minus sign
The minus sign makes the acceleration point back toward equilibrium. If x is positive, a is negative, and the mass speeds up toward the centre. If x is negative, a is positive, and the mass again accelerates toward the centre. With a plus sign the acceleration would push the object away from equilibrium and the displacement would grow exponentially instead of oscillating.
Why the constant is written as a square
Writing the constant as ω² is a convention, but a useful one. Any positive constant has a real square root. When you test x = A cos(ωt + φ) in the equation (next section), ω appears directly as the angular frequency in the argument of the cosine. The period then follows as T = 2π/ω, and the frequency as f = ω/2π = 1/T.
Units
Both sides of a = -ω²x must be in m/s². Since x is in metres, ω² must be in s⁻², so ω is in s⁻¹. By convention ω is quoted in rad/s, because radians are dimensionless and mark the argument of the cosine as an angle. Do not confuse ω with f. A system with f = 2 Hz has ω = 2π × 2 ≈ 12.57 rad/s.
Checking that a sinusoid solves it
You do not need the full solution method yet. You only need to verify a candidate. Try x(t) = A cos(ωt + φ):
- First derivative: dx/dt = -Aω sin(ωt + φ)
- Second derivative: d²x/dt² = -Aω² cos(ωt + φ)
The second derivative equals -ω² times x(t), so the equation holds. A sine function also works, and so does any sum of a sine and a cosine with the same ω. This is why a restoring force proportional to displacement produces sinusoidal motion. Only sines and cosines have a second derivative that is a negative multiple of the function itself.
The amplitude A and the phase φ do not appear in the equation. They are set by the starting conditions, which a later chapter covers. The angular frequency ω comes from the system alone, so the period does not depend on how far you pull the mass.
A recipe for testing whether a system is SHM
- Choose a coordinate that measures displacement from the equilibrium point, where the net force is zero.
- Write Newton's second law for that coordinate.
- Write the net force as a function of x.
- Check whether the force is linear in x with a negative coefficient: F = -Cx.
- If it is, divide by the mass and read off ω² = C/m.
The table shows how different force laws come out.
| Net force | Acceleration | SHM? | Comment |
|---|---|---|---|
| F = -kx | a = -(k/m)x | Yes | ω² = k/m |
| F = -kx³ | a = -(k/m)x³ | No | Period depends on amplitude |
| F = -kx + F₀ (constant) | a = -(k/m)(x - F₀/k) | Yes, about a shifted centre | Equilibrium is at x = F₀/k |
| F = +kx | a = +(k/m)x | No | Displacement grows exponentially |
The third row matters in practice. A constant extra force, such as gravity on a vertical spring, moves the equilibrium point but leaves ω unchanged. The recipe still works as long as you measure x from the new equilibrium.
Common errors
- Measuring x from the wrong origin. The equation holds only when x = 0 is the equilibrium position, where the net force is zero. Measured from the spring's natural length on a vertical spring, the equation gains an extra constant term.
- Mixing ω and f. The equation uses ω in rad/s. Using f in Hz where ω belongs gives errors by a factor of 2π, or 4π² when squared.
- Calling any back-and-forth motion SHM. A bouncing ball moves back and forth with a constant acceleration, so a is not proportional to x. A pendulum at large angles also fails the test, as a later chapter shows.
- Forgetting that a is a vector component. The sign of a depends on the chosen positive direction. The claim that matters is the relation between a and x, which holds for any axis choice as long as x and a use the same axis.
- Expecting amplitude to change the period. In SHM, doubling the amplitude doubles the maximum speed and the maximum acceleration, and the period stays the same. If the period changes with amplitude, the motion is not SHM.
Verifying the equation numerically
The script below takes the sinusoidal solution for a 0.5 kg mass on a 20 N/m spring, starting from rest at x = 0.10 m. It estimates the acceleration with a central finite difference of the position and compares it with -ω²x at several times. The two columns should agree.
import math
k = 20.0 # spring constant, N/m
m = 0.5 # mass, kg
A = 0.10 # amplitude, m
omega2 = k / m # omega squared, s^-2
omega = math.sqrt(omega2)
def x(t):
return A * math.cos(omega * t)
h = 1e-4 # finite-difference step, s
for t in (0.0, 0.2, 0.5):
a_numeric = (x(t + h) - 2 * x(t) + x(t - h)) / h**2
a_formula = -omega2 * x(t)
print(f"t = {t:.1f} s x = {x(t):+.4f} m "
f"a(numeric) = {a_numeric:+.3f} -w^2 x = {a_formula:+.3f}")At t = 0 the mass is at x = +0.1000 m and both acceleration values are about -4.000 m/s². At every time, the ratio a/x equals -40 s⁻², which is -ω².
Summary of what to carry forward
- SHM is defined by a = -ω²x, or equivalently d²x/dt² = -ω²x, with ω² a positive constant.
- For a spring, Hooke's law plus Newton's second law gives ω² = k/m.
- The solution is a sinusoid with angular frequency ω, so T = 2π/ω.
- The test for SHM is that the net force is linear in the displacement from equilibrium and opposes it.
Exercise
A 0.25 kg block on a frictionless surface is attached to a spring. At a displacement of x = +0.04 m from equilibrium, its acceleration is measured as -16 m/s². Assuming SHM, find ω², ω, and the period T. What is the spring constant k?
Show answer
From a = -ω²x, ω² = -a/x = 16 / 0.04 = 400 s⁻². So ω = √400 = 20 rad/s. The period is T = 2π/ω = 2π/20 ≈ 0.314 s. The spring constant is k = mω² = 0.25 × 400 = 100 N/m.
Exercise
A particle feels a net force F = -bx³ with b > 0. Is its motion SHM? Explain using the form of its acceleration.
Show answer
No. The acceleration is a = -(b/m)x³, and the ratio a/x = -(b/m)x² changes with x instead of being a constant. SHM requires a/x to equal the same constant -ω² at every displacement. The motion is still oscillatory, but its period depends on amplitude.